Switched to use libgnomecanvas (not the C++ one).
git-svn-id: svn://localhost/trunk/ardour2@30 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -25,7 +25,7 @@ gtkardour.Merge ( [libraries['ardour'],
|
||||
libraries['pbd3'],
|
||||
libraries['gtkmm2'],
|
||||
libraries['sigc2'],
|
||||
libraries['libgnomecanvasmm'],
|
||||
# libraries['libgnomecanvasmm'],
|
||||
libraries['sysmidi'],
|
||||
libraries['sndfile'],
|
||||
libraries['lrdf'],
|
||||
@@ -125,7 +125,7 @@ ardour_ui.cc
|
||||
ardour_ui2.cc
|
||||
ardour_ui_dialogs.cc
|
||||
audio_time_axis.cc
|
||||
automation_line.c
|
||||
automation_line.cc
|
||||
canvas-imageframe.cc
|
||||
about.cc
|
||||
editor.cc
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <gtkmm/window.h>
|
||||
#include <gtkmm/pixmap.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
class ARDOUR_UI;
|
||||
|
||||
|
||||
@@ -35,14 +35,9 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
|
||||
#include <pbd/xml++.h>
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
#include <gtkmm2ext/pix.h>
|
||||
#include <gtkmm2ext/spinner.h>
|
||||
#include <gtkmm2ext/pixmap_button.h>
|
||||
#include <gtkmm2ext/popup_selector.h>
|
||||
#include <gtkmm2ext/click_box.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <ardour/ardour.h>
|
||||
|
||||
@@ -486,8 +486,8 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||
#endif
|
||||
|
||||
if (timestretch_rect == 0) {
|
||||
timestretch_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
timestretch_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -497,8 +497,8 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
||||
NULL);
|
||||
}
|
||||
|
||||
gtk_canvas_item_show (timestretch_rect);
|
||||
gtk_canvas_item_raise_to_top (timestretch_rect);
|
||||
gnome_canvas_item_show (timestretch_rect);
|
||||
gnome_canvas_item_raise_to_top (timestretch_rect);
|
||||
|
||||
x1 = start / editor.get_current_zoom();
|
||||
x2 = (end - 1) / editor.get_current_zoom();
|
||||
@@ -518,7 +518,7 @@ AudioTimeAxisView::hide_timestretch ()
|
||||
TimeAxisView::hide_timestretch ();
|
||||
|
||||
if (timestretch_rect) {
|
||||
gtk_canvas_item_hide (timestretch_rect);
|
||||
gnome_canvas_item_hide (timestretch_rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1312,7 +1312,7 @@ AudioTimeAxisView::toggle_gain_track ()
|
||||
if (showit != gain_track->marked_for_display()) {
|
||||
if (showit) {
|
||||
gain_track->set_marked_for_display (true);
|
||||
gtk_canvas_item_show (gain_track->canvas_display);
|
||||
gnome_canvas_item_show (gain_track->canvas_display);
|
||||
gain_track->get_state_node()->add_property ("shown", X_("yes"));
|
||||
} else {
|
||||
gain_track->set_marked_for_display (false);
|
||||
@@ -1348,7 +1348,7 @@ AudioTimeAxisView::toggle_pan_track ()
|
||||
if (showit != pan_track->marked_for_display()) {
|
||||
if (showit) {
|
||||
pan_track->set_marked_for_display (true);
|
||||
gtk_canvas_item_show (pan_track->canvas_display);
|
||||
gnome_canvas_item_show (pan_track->canvas_display);
|
||||
pan_track->get_state_node()->add_property ("shown", X_("yes"));
|
||||
} else {
|
||||
pan_track->set_marked_for_display (false);
|
||||
@@ -1623,7 +1623,7 @@ AudioTimeAxisView::redirect_menu_item_toggled (AudioTimeAxisView::RedirectAutoma
|
||||
|
||||
if (showit) {
|
||||
ran->view->set_marked_for_display (true);
|
||||
gtk_canvas_item_show (ran->view->canvas_display);
|
||||
gnome_canvas_item_show (ran->view->canvas_display);
|
||||
} else {
|
||||
rai->redirect->mark_automation_visible (ran->what, true);
|
||||
ran->view->set_marked_for_display (false);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __ardour_trackview_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <gtkmm2ext/popup_selector.h>
|
||||
#include <list>
|
||||
@@ -299,7 +299,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
|
||||
void add_redirect_automation_curve (ARDOUR::Redirect*, uint32_t);
|
||||
void add_existing_redirect_automation_curves (ARDOUR::Redirect*);
|
||||
|
||||
GtkCanvasItem *timestretch_rect;
|
||||
GnomeCanvasItem *timestretch_rect;
|
||||
|
||||
void timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, GtkCanvasItem* parent,
|
||||
AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, tv, parent, c, point_callback, line_callback),
|
||||
session (s)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define __ardour_gtk_automation_gain_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include "automation_line.h"
|
||||
@@ -17,10 +17,10 @@ class TimeAxisView;
|
||||
class AutomationGainLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
|
||||
AutomationGainLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, 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)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
: line (al)
|
||||
{
|
||||
model = al.the_list().end();
|
||||
@@ -61,8 +61,8 @@ ControlPoint::ControlPoint (AutomationLine& al, gint (*event_handler)(GtkCanvasI
|
||||
_size = 4.0;
|
||||
selected = false;
|
||||
|
||||
item = gtk_canvas_item_new (line.canvas_group(),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
item = gnome_canvas_item_new (line.canvas_group(),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"draw", (gboolean) TRUE,
|
||||
"fill", (gboolean) FALSE,
|
||||
"fill_color_rgba", color_map[cControlPointFill],
|
||||
@@ -93,8 +93,8 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool dummy_arg_to_force_s
|
||||
_size = other._size;
|
||||
selected = false;
|
||||
|
||||
item = gtk_canvas_item_new (line.canvas_group(),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
item = gnome_canvas_item_new (line.canvas_group(),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"fill", (gboolean) FALSE,
|
||||
"outline_color_rgba", color_map[cEnteredControlPointOutline],
|
||||
"outline_pixels", (gint) 1,
|
||||
@@ -114,19 +114,19 @@ ControlPoint::~ControlPoint ()
|
||||
void
|
||||
ControlPoint::hide ()
|
||||
{
|
||||
gtk_canvas_item_hide (item);
|
||||
gnome_canvas_item_hide (item);
|
||||
}
|
||||
|
||||
void
|
||||
ControlPoint::show()
|
||||
{
|
||||
gtk_canvas_item_show (item);
|
||||
gnome_canvas_item_show (item);
|
||||
}
|
||||
|
||||
void
|
||||
ControlPoint::set_visible (bool yn)
|
||||
{
|
||||
gtk_canvas_item_set (item, "draw", (gboolean) yn, NULL);
|
||||
gnome_canvas_item_set (item, "draw", (gboolean) yn, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -142,10 +142,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
||||
{
|
||||
if (entered) {
|
||||
if (selected) {
|
||||
gtk_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPointSelected], NULL);
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPointSelected], NULL);
|
||||
set_visible(true);
|
||||
} else {
|
||||
gtk_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPoint], NULL);
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cEnteredControlPoint], NULL);
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
@@ -153,10 +153,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
|
||||
|
||||
} else {
|
||||
if (selected) {
|
||||
gtk_canvas_item_set (item, "outline_color_rgba", color_map[cControlPointSelected], NULL);
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPointSelected], NULL);
|
||||
set_visible(true);
|
||||
} else {
|
||||
gtk_canvas_item_set (item, "outline_color_rgba", color_map[cControlPoint], NULL);
|
||||
gnome_canvas_item_set (item, "outline_color_rgba", color_map[cControlPoint], NULL);
|
||||
if (hide_too) {
|
||||
set_visible(false);
|
||||
}
|
||||
@@ -171,11 +171,11 @@ ControlPoint::set_size (double sz)
|
||||
|
||||
#if 0
|
||||
if (_size > 6.0) {
|
||||
gtk_canvas_item_set (item,
|
||||
gnome_canvas_item_set (item,
|
||||
"fill", (gboolean) TRUE,
|
||||
NULL);
|
||||
} else {
|
||||
gtk_canvas_item_set (item,
|
||||
gnome_canvas_item_set (item,
|
||||
"fill", (gboolean) FALSE,
|
||||
NULL);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (item,
|
||||
gnome_canvas_item_set (item,
|
||||
"x1", x1,
|
||||
"x2", x2,
|
||||
"y1", y - half_size,
|
||||
@@ -220,9 +220,9 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
|
||||
|
||||
/*****/
|
||||
|
||||
AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* parent, AutomationList& al,
|
||||
gint (*point_handler)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_handler)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
AutomationLine::AutomationLine (string name, TimeAxisView& tv, GnomeCanvasItem* parent, AutomationList& al,
|
||||
gint (*point_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_handler)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
: trackview (tv),
|
||||
_name (name),
|
||||
alist (al)
|
||||
@@ -238,14 +238,14 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* pa
|
||||
terminal_points_can_slide = true;
|
||||
_height = 0;
|
||||
|
||||
group = gtk_canvas_item_new (GTK_CANVAS_GROUP(parent),
|
||||
gtk_canvas_group_get_type(),
|
||||
group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(parent),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
|
||||
line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_line_get_type(),
|
||||
line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", (guint) 1,
|
||||
NULL);
|
||||
|
||||
@@ -260,7 +260,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, GtkCanvasItem* pa
|
||||
AutomationLine::~AutomationLine ()
|
||||
{
|
||||
if (point_coords) {
|
||||
gtk_canvas_points_unref (point_coords);
|
||||
gnome_canvas_points_unref (point_coords);
|
||||
}
|
||||
|
||||
vector_delete (&control_points);
|
||||
@@ -288,7 +288,7 @@ AutomationLine::set_point_size (double sz)
|
||||
void
|
||||
AutomationLine::show ()
|
||||
{
|
||||
gtk_canvas_item_show (line);
|
||||
gnome_canvas_item_show (line);
|
||||
|
||||
if (points_visible) {
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
@@ -302,7 +302,7 @@ AutomationLine::show ()
|
||||
void
|
||||
AutomationLine::hide ()
|
||||
{
|
||||
gtk_canvas_item_hide (line);
|
||||
gnome_canvas_item_hide (line);
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->hide();
|
||||
}
|
||||
@@ -331,7 +331,7 @@ void
|
||||
AutomationLine::set_line_color (uint32_t color)
|
||||
{
|
||||
_line_color = color;
|
||||
gtk_canvas_item_set (line, "fill_color_rgba", color, NULL);
|
||||
gnome_canvas_item_set (line, "fill_color_rgba", color, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -486,7 +486,7 @@ AutomationLine::reset_line_coords (ControlPoint& cp)
|
||||
void
|
||||
AutomationLine::update_line ()
|
||||
{
|
||||
gtk_canvas_item_set (line, "points", point_coords, NULL);
|
||||
gnome_canvas_item_set (line, "points", point_coords, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -667,7 +667,7 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp)
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
|
||||
AutomationLine::determine_visible_control_points (GnomeCanvasPoints* points)
|
||||
{
|
||||
uint32_t xi, yi, view_index, pi;
|
||||
int n;
|
||||
@@ -684,7 +684,7 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
|
||||
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
|
||||
(*i)->hide();
|
||||
}
|
||||
gtk_canvas_item_hide (line);
|
||||
gnome_canvas_item_hide (line);
|
||||
|
||||
if (points == 0 || points->num_points == 0) {
|
||||
return;
|
||||
@@ -831,7 +831,7 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
|
||||
|
||||
if (point_coords) {
|
||||
if (point_coords->num_points < (int) npoints) {
|
||||
gtk_canvas_points_unref (point_coords);
|
||||
gnome_canvas_points_unref (point_coords);
|
||||
point_coords = get_canvas_points ("autoline", npoints);
|
||||
} else {
|
||||
point_coords->num_points = npoints;
|
||||
@@ -850,10 +850,10 @@ AutomationLine::determine_visible_control_points (GtkCanvasPoints* points)
|
||||
}
|
||||
|
||||
// cerr << "set al2 points, nc = " << point_coords->num_points << endl;
|
||||
gtk_canvas_item_set (line, "points", point_coords, NULL);
|
||||
gnome_canvas_item_set (line, "points", point_coords, NULL);
|
||||
|
||||
if (_visible) {
|
||||
gtk_canvas_item_show (line);
|
||||
gnome_canvas_item_show (line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -879,13 +879,13 @@ AutomationLine::get_verbose_cursor_string (float fraction)
|
||||
}
|
||||
|
||||
bool
|
||||
AutomationLine::invalid_point (GtkCanvasPoints* p, uint32_t index)
|
||||
AutomationLine::invalid_point (GnomeCanvasPoints* p, uint32_t index)
|
||||
{
|
||||
return p->coords[index*2] == max_frames && p->coords[(index*2)+1] == DBL_MAX;
|
||||
}
|
||||
|
||||
void
|
||||
AutomationLine::invalidate_point (GtkCanvasPoints* p, uint32_t index)
|
||||
AutomationLine::invalidate_point (GnomeCanvasPoints* p, uint32_t index)
|
||||
{
|
||||
p->coords[index*2] = max_frames;
|
||||
p->coords[(index*2)+1] = DBL_MAX;
|
||||
@@ -1201,7 +1201,7 @@ AutomationLine::list_changed (Change ignored)
|
||||
void
|
||||
AutomationLine::reset_callback (const AutomationList& events)
|
||||
{
|
||||
GtkCanvasPoints *tmp_points;
|
||||
GnomeCanvasPoints *tmp_points;
|
||||
uint32_t npoints = events.size();
|
||||
|
||||
if (npoints == 0) {
|
||||
@@ -1209,7 +1209,7 @@ AutomationLine::reset_callback (const AutomationList& events)
|
||||
delete *i;
|
||||
}
|
||||
control_points.clear ();
|
||||
gtk_canvas_item_hide (line);
|
||||
gnome_canvas_item_hide (line);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1231,7 +1231,7 @@ AutomationLine::reset_callback (const AutomationList& events)
|
||||
tmp_points->num_points = npoints;
|
||||
|
||||
determine_visible_control_points (tmp_points);
|
||||
gtk_canvas_points_unref (tmp_points);
|
||||
gnome_canvas_points_unref (tmp_points);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include <pbd/undo.h>
|
||||
@@ -48,7 +48,7 @@ class Selection;
|
||||
class ControlPoint
|
||||
{
|
||||
public:
|
||||
ControlPoint (AutomationLine& al, gint (*event_handler)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
ControlPoint (AutomationLine& al, gint (*event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
|
||||
~ControlPoint ();
|
||||
|
||||
@@ -70,7 +70,7 @@ class ControlPoint
|
||||
void set_size (double);
|
||||
void set_visible (bool);
|
||||
|
||||
GtkCanvasItem* item;
|
||||
GnomeCanvasItem* item;
|
||||
AutomationLine& line;
|
||||
uint32_t view_index;
|
||||
ARDOUR::AutomationList::iterator model;
|
||||
@@ -87,9 +87,9 @@ class ControlPoint
|
||||
class AutomationLine : public sigc::trackable
|
||||
{
|
||||
public:
|
||||
AutomationLine (string name, TimeAxisView&, GtkCanvasItem *, ARDOUR::AutomationList&,
|
||||
gint (*point_event_handler)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_event_handler)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
AutomationLine (string name, TimeAxisView&, GnomeCanvasItem *, ARDOUR::AutomationList&,
|
||||
gint (*point_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_event_handler)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
|
||||
virtual ~AutomationLine ();
|
||||
|
||||
@@ -130,17 +130,17 @@ class AutomationLine : public sigc::trackable
|
||||
|
||||
TimeAxisView& trackview;
|
||||
|
||||
GtkCanvasGroup* canvas_group() const { return GTK_CANVAS_GROUP(group); }
|
||||
GtkCanvasItem* parent_group() const { return _parent_group; }
|
||||
GtkCanvasItem* grab_item() const { return line; }
|
||||
GnomeCanvasGroup* canvas_group() const { return GNOME_CANVAS_GROUP(group); }
|
||||
GnomeCanvasItem* parent_group() const { return _parent_group; }
|
||||
GnomeCanvasItem* grab_item() const { return line; }
|
||||
|
||||
void show_selection();
|
||||
void hide_selection ();
|
||||
|
||||
void set_point_size (double size);
|
||||
|
||||
static void invalidate_point (GtkCanvasPoints*, uint32_t index);
|
||||
static bool invalid_point (GtkCanvasPoints*, uint32_t index);
|
||||
static void invalidate_point (GnomeCanvasPoints*, uint32_t index);
|
||||
static bool invalid_point (GnomeCanvasPoints*, uint32_t index);
|
||||
|
||||
virtual string get_verbose_cursor_string (float);
|
||||
virtual void view_to_model_y (double&) = 0;
|
||||
@@ -167,15 +167,15 @@ class AutomationLine : public sigc::trackable
|
||||
bool no_draw : 1;
|
||||
bool points_visible : 1;
|
||||
|
||||
GtkCanvasItem* _parent_group;
|
||||
GtkCanvasItem* group;
|
||||
GtkCanvasItem* line; /* line */
|
||||
GtkCanvasPoints* point_coords; /* coordinates for canvas line */
|
||||
GnomeCanvasItem* _parent_group;
|
||||
GnomeCanvasItem* group;
|
||||
GnomeCanvasItem* line; /* line */
|
||||
GnomeCanvasPoints* point_coords; /* coordinates for canvas line */
|
||||
vector<ControlPoint*> control_points; /* visible control points */
|
||||
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer);
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer);
|
||||
|
||||
void determine_visible_control_points (GtkCanvasPoints*);
|
||||
void determine_visible_control_points (GnomeCanvasPoints*);
|
||||
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, GtkCanvasItem* parent,
|
||||
AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, tv, parent, c, point_callback, line_callback),
|
||||
session (s)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define __ardour_gtk_automation_pan_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include "automation_line.h"
|
||||
@@ -16,17 +16,17 @@ class TimeAxisView;
|
||||
class AutomationPanLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
|
||||
AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
|
||||
void view_to_model_y (double&);
|
||||
void model_to_view_y (double&);
|
||||
|
||||
private:
|
||||
ARDOUR::Session& session;
|
||||
vector<GtkCanvasItem*> lines;
|
||||
vector<GnomeCanvasItem*> lines;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
|
||||
auto_play_item = 0;
|
||||
ignore_state_request = false;
|
||||
|
||||
base_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
|
||||
@@ -47,7 +47,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||
void set_samples_per_unit (double);
|
||||
std::string name() const { return _name; }
|
||||
|
||||
virtual void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
virtual void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
|
||||
void clear_lines ();
|
||||
void add_line (AutomationLine&);
|
||||
@@ -77,7 +77,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
||||
|
||||
protected:
|
||||
ARDOUR::Route& route;
|
||||
GtkCanvasItem* base_rect;
|
||||
GnomeCanvasItem* base_rect;
|
||||
string _name;
|
||||
string _state_name;
|
||||
bool in_destructor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* gtk-canvas-curve.h: GtkCanvas item for constrained spline curves
|
||||
/* libgnomecanvas/gnome-canvas-curve.h: GnomeCanvas item for constrained spline curves
|
||||
*
|
||||
* Copyright (C) 2003 Paul Davis <pbd@op.net>
|
||||
*
|
||||
@@ -19,29 +19,28 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CANVAS_CURVE_H__
|
||||
#define __GTK_CANVAS_CURVE_H__
|
||||
#ifndef __GNOME_CANVAS_CURVE_H__
|
||||
#define __GNOME_CANVAS_CURVE_H__
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_CURVE (gtk_canvas_curve_get_type ())
|
||||
#define GTK_CANVAS_CURVE(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_CURVE, GtkCanvasCurve))
|
||||
#define GTK_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_CURVE, GtkCanvasCurveClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_CURVE))
|
||||
#define GTK_CANVAS_IS_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_CURVE))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_CURVE (gnome_canvas_curve_get_type ())
|
||||
#define GNOME_CANVAS_CURVE(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurve))
|
||||
#define GNOME_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE, GnomeCanvasCurveClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_CURVE(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_CURVE))
|
||||
#define GNOME_CANVAS_IS_CANVAS_CURVE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_CURVE))
|
||||
|
||||
typedef struct _GtkCanvasCurve GtkCanvasCurve;
|
||||
typedef struct _GtkCanvasCurveClass GtkCanvasCurveClass;
|
||||
typedef struct _GnomeCanvasCurve GnomeCanvasCurve;
|
||||
typedef struct _GnomeCanvasCurveClass GnomeCanvasCurveClass;
|
||||
|
||||
struct _GtkCanvasCurve
|
||||
struct _GnomeCanvasCurve
|
||||
{
|
||||
GtkCanvasItem item;
|
||||
GnomeCanvasItem item;
|
||||
double x1, y1, x2, y2;
|
||||
void* curve_arg;
|
||||
float* vector;
|
||||
@@ -55,12 +54,12 @@ struct _GtkCanvasCurve
|
||||
guint32 bbox_lrx, bbox_lry;
|
||||
};
|
||||
|
||||
struct _GtkCanvasCurveClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasCurveClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_canvas_curve_get_type (void);
|
||||
GtkType gnome_canvas_curve_get_type (void);
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif /* __GTK_CANVAS_CURVE_H__ */
|
||||
#endif /* __GNOME_CANVAS_CURVE_H__ */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Image item type for GtkCanvas widget
|
||||
/* Image item type for GnomeCanvas widget
|
||||
*
|
||||
* GtkCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
|
||||
* GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
|
||||
* copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
|
||||
*
|
||||
* Copyright (C) 1998 The Free Software Foundation
|
||||
@@ -17,8 +17,8 @@
|
||||
#include "libart_lgpl/art_pixbuf.h"
|
||||
#include "libart_lgpl/art_rgb_pixbuf_affine.h"
|
||||
#include "canvas-imageframe.h"
|
||||
#include <gtk-canvas/gtk-canvas-util.h>
|
||||
#include <gtk-canvas/gtk-canvastypebuiltins.h>
|
||||
#include <libgnomecanvas/gnome-canvas-util.h>
|
||||
#include <libgnomecanvas/gnome-canvastypebuiltins.h>
|
||||
|
||||
|
||||
enum {
|
||||
@@ -33,82 +33,82 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
static void gtk_canvas_imageframe_class_init(GtkCanvasImageFrameClass* class) ;
|
||||
static void gtk_canvas_imageframe_init(GtkCanvasImageFrame* image) ;
|
||||
static void gtk_canvas_imageframe_destroy(GtkObject* object) ;
|
||||
static void gtk_canvas_imageframe_set_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
|
||||
static void gtk_canvas_imageframe_get_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
|
||||
static void gnome_canvas_imageframe_class_init(GnomeCanvasImageFrameClass* class) ;
|
||||
static void gnome_canvas_imageframe_init(GnomeCanvasImageFrame* image) ;
|
||||
static void gnome_canvas_imageframe_destroy(GtkObject* object) ;
|
||||
static void gnome_canvas_imageframe_set_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
|
||||
static void gnome_canvas_imageframe_get_arg(GtkObject* object, GtkArg* arg, guint arg_id) ;
|
||||
|
||||
static void gtk_canvas_imageframe_update(GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) ;
|
||||
static void gtk_canvas_imageframe_realize(GtkCanvasItem *item) ;
|
||||
static void gtk_canvas_imageframe_unrealize(GtkCanvasItem *item) ;
|
||||
static void gtk_canvas_imageframe_draw(GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) ;
|
||||
static double gtk_canvas_imageframe_point(GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item) ;
|
||||
static void gtk_canvas_imageframe_translate(GtkCanvasItem *item, double dx, double dy) ;
|
||||
static void gtk_canvas_imageframe_bounds(GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2) ;
|
||||
static void gtk_canvas_imageframe_render(GtkCanvasItem *item, GtkCanvasBuf *buf) ;
|
||||
static void gnome_canvas_imageframe_update(GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags) ;
|
||||
static void gnome_canvas_imageframe_realize(GnomeCanvasItem *item) ;
|
||||
static void gnome_canvas_imageframe_unrealize(GnomeCanvasItem *item) ;
|
||||
static void gnome_canvas_imageframe_draw(GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width, int height) ;
|
||||
static double gnome_canvas_imageframe_point(GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item) ;
|
||||
static void gnome_canvas_imageframe_translate(GnomeCanvasItem *item, double dx, double dy) ;
|
||||
static void gnome_canvas_imageframe_bounds(GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2) ;
|
||||
static void gnome_canvas_imageframe_render(GnomeCanvasItem *item, GnomeCanvasBuf *buf) ;
|
||||
|
||||
static GtkCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
|
||||
GtkType
|
||||
gtk_canvas_imageframe_get_type (void)
|
||||
gnome_canvas_imageframe_get_type (void)
|
||||
{
|
||||
static GtkType imageframe_type = 0;
|
||||
|
||||
if (!imageframe_type) {
|
||||
GtkTypeInfo imageframe_info = {
|
||||
"GtkCanvasImageFrame",
|
||||
sizeof (GtkCanvasImageFrame),
|
||||
sizeof (GtkCanvasImageFrameClass),
|
||||
(GtkClassInitFunc) gtk_canvas_imageframe_class_init,
|
||||
(GtkObjectInitFunc) gtk_canvas_imageframe_init,
|
||||
"GnomeCanvasImageFrame",
|
||||
sizeof (GnomeCanvasImageFrame),
|
||||
sizeof (GnomeCanvasImageFrameClass),
|
||||
(GtkClassInitFunc) gnome_canvas_imageframe_class_init,
|
||||
(GtkObjectInitFunc) gnome_canvas_imageframe_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
imageframe_type = gtk_type_unique (gtk_canvas_item_get_type (), &imageframe_info);
|
||||
imageframe_type = gtk_type_unique (gnome_canvas_item_get_type (), &imageframe_info);
|
||||
}
|
||||
|
||||
return imageframe_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_class_init (GtkCanvasImageFrameClass *class)
|
||||
gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkCanvasItemClass *item_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GtkCanvasItemClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_canvas_item_get_type ());
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::pixbuf", GTK_TYPE_BOXED, GTK_ARG_WRITABLE, ARG_PIXBUF);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::width", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::drawwidth", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_DRAWWIDTH);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
|
||||
gtk_object_add_arg_type ("GtkCanvasImageFrame::anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::pixbuf", GTK_TYPE_BOXED, GTK_ARG_WRITABLE, ARG_PIXBUF);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::width", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_WIDTH);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::drawwidth", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_DRAWWIDTH);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
|
||||
gtk_object_add_arg_type ("GnomeCanvasImageFrame::anchor", GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR);
|
||||
|
||||
object_class->destroy = gtk_canvas_imageframe_destroy;
|
||||
object_class->set_arg = gtk_canvas_imageframe_set_arg;
|
||||
object_class->get_arg = gtk_canvas_imageframe_get_arg;
|
||||
object_class->destroy = gnome_canvas_imageframe_destroy;
|
||||
object_class->set_arg = gnome_canvas_imageframe_set_arg;
|
||||
object_class->get_arg = gnome_canvas_imageframe_get_arg;
|
||||
|
||||
item_class->update = gtk_canvas_imageframe_update;
|
||||
item_class->realize = gtk_canvas_imageframe_realize;
|
||||
item_class->unrealize = gtk_canvas_imageframe_unrealize;
|
||||
item_class->draw = gtk_canvas_imageframe_draw;
|
||||
item_class->point = gtk_canvas_imageframe_point;
|
||||
item_class->translate = gtk_canvas_imageframe_translate;
|
||||
item_class->bounds = gtk_canvas_imageframe_bounds;
|
||||
item_class->render = gtk_canvas_imageframe_render;
|
||||
item_class->update = gnome_canvas_imageframe_update;
|
||||
item_class->realize = gnome_canvas_imageframe_realize;
|
||||
item_class->unrealize = gnome_canvas_imageframe_unrealize;
|
||||
item_class->draw = gnome_canvas_imageframe_draw;
|
||||
item_class->point = gnome_canvas_imageframe_point;
|
||||
item_class->translate = gnome_canvas_imageframe_translate;
|
||||
item_class->bounds = gnome_canvas_imageframe_bounds;
|
||||
item_class->render = gnome_canvas_imageframe_render;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_init (GtkCanvasImageFrame *image)
|
||||
gnome_canvas_imageframe_init (GnomeCanvasImageFrame *image)
|
||||
{
|
||||
image->x = 0.0;
|
||||
image->y = 0.0;
|
||||
@@ -116,18 +116,18 @@ gtk_canvas_imageframe_init (GtkCanvasImageFrame *image)
|
||||
image->height = 0.0;
|
||||
image->drawwidth = 0.0;
|
||||
image->anchor = GTK_ANCHOR_CENTER;
|
||||
GTK_CANVAS_ITEM(image)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
GNOME_CANVAS_ITEM(image)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_destroy (GtkObject *object)
|
||||
gnome_canvas_imageframe_destroy (GtkObject *object)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (GTK_CANVAS_IS_CANVAS_IMAGEFRAME (object));
|
||||
g_return_if_fail (GNOME_CANVAS_IS_CANVAS_IMAGEFRAME (object));
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (object);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (object);
|
||||
|
||||
image->cwidth = 0;
|
||||
image->cheight = 0;
|
||||
@@ -146,12 +146,12 @@ gtk_canvas_imageframe_destroy (GtkObject *object)
|
||||
|
||||
/* Get's the image bounds expressed as item-relative coordinates. */
|
||||
static void
|
||||
get_bounds_item_relative (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
|
||||
get_bounds_item_relative (GnomeCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GnomeCanvasItem *item;
|
||||
double x, y;
|
||||
|
||||
item = GTK_CANVAS_ITEM (image);
|
||||
item = GNOME_CANVAS_ITEM (image);
|
||||
|
||||
/* Get item coordinates */
|
||||
|
||||
@@ -207,15 +207,15 @@ get_bounds_item_relative (GtkCanvasImageFrame *image, double *px1, double *py1,
|
||||
}
|
||||
|
||||
static void
|
||||
get_bounds (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
|
||||
get_bounds (GnomeCanvasImageFrame *image, double *px1, double *py1, double *px2, double *py2)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GnomeCanvasItem *item;
|
||||
double i2c[6];
|
||||
ArtDRect i_bbox, c_bbox;
|
||||
|
||||
item = GTK_CANVAS_ITEM (image);
|
||||
item = GNOME_CANVAS_ITEM (image);
|
||||
|
||||
gtk_canvas_item_i2c_affine (item, i2c);
|
||||
gnome_canvas_item_i2c_affine (item, i2c);
|
||||
|
||||
get_bounds_item_relative (image, &i_bbox.x0, &i_bbox.y0, &i_bbox.x1, &i_bbox.y1);
|
||||
art_drect_affine_transform (&c_bbox, &i_bbox, i2c);
|
||||
@@ -229,11 +229,11 @@ get_bounds (GtkCanvasImageFrame *image, double *px1, double *py1, double *px2, d
|
||||
|
||||
/* deprecated */
|
||||
static void
|
||||
recalc_bounds (GtkCanvasImageFrame *image)
|
||||
recalc_bounds (GnomeCanvasImageFrame *image)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GnomeCanvasItem *item;
|
||||
|
||||
item = GTK_CANVAS_ITEM (image);
|
||||
item = GNOME_CANVAS_ITEM (image);
|
||||
|
||||
get_bounds (image, &item->x1, &item->y1, &item->x2, &item->y2);
|
||||
|
||||
@@ -242,19 +242,19 @@ recalc_bounds (GtkCanvasImageFrame *image)
|
||||
item->x2 = image->cx + image->cwidth;
|
||||
item->y2 = image->cy + image->cheight;
|
||||
|
||||
gtk_canvas_group_child_bounds (GTK_CANVAS_GROUP (item->parent), item);
|
||||
gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasItem *item;
|
||||
GnomeCanvasImageFrame *image;
|
||||
int update;
|
||||
int calc_bounds;
|
||||
|
||||
item = GTK_CANVAS_ITEM (object);
|
||||
image = GTK_CANVAS_IMAGEFRAME (object);
|
||||
item = GNOME_CANVAS_ITEM (object);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (object);
|
||||
|
||||
update = FALSE;
|
||||
calc_bounds = FALSE;
|
||||
@@ -305,22 +305,22 @@ gtk_canvas_imageframe_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
|
||||
#ifdef OLD_XFORM
|
||||
if (update)
|
||||
(* GTK_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
|
||||
(* GNOME_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
|
||||
|
||||
if (calc_bounds)
|
||||
recalc_bounds (image);
|
||||
#else
|
||||
if (update)
|
||||
gtk_canvas_item_request_update (item);
|
||||
gnome_canvas_item_request_update (item);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (object);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (object);
|
||||
|
||||
switch (arg_id) {
|
||||
|
||||
@@ -355,14 +355,14 @@ gtk_canvas_imageframe_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
gnome_canvas_imageframe_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
ArtDRect i_bbox, c_bbox;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
if (parent_class->update)
|
||||
(* parent_class->update) (item, affine, clip_path, flags);
|
||||
@@ -391,7 +391,7 @@ gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
|
||||
c_bbox.x1++;
|
||||
c_bbox.y1++;
|
||||
|
||||
gtk_canvas_update_bbox (item, c_bbox.x0, c_bbox.y0, c_bbox.x1, c_bbox.y1);
|
||||
gnome_canvas_update_bbox (item, c_bbox.x0, c_bbox.y0, c_bbox.x1, c_bbox.y1);
|
||||
|
||||
if (image->pixbuf) {
|
||||
w = image->pixbuf->width;
|
||||
@@ -409,11 +409,11 @@ gtk_canvas_imageframe_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_realize (GtkCanvasItem *item)
|
||||
gnome_canvas_imageframe_realize (GnomeCanvasItem *item)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
if (parent_class->realize)
|
||||
(* parent_class->realize) (item);
|
||||
@@ -421,22 +421,22 @@ gtk_canvas_imageframe_realize (GtkCanvasItem *item)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_unrealize (GtkCanvasItem *item)
|
||||
gnome_canvas_imageframe_unrealize (GnomeCanvasItem *item)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME(item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME(item);
|
||||
|
||||
if (parent_class->unrealize)
|
||||
(* parent_class->unrealize) (item);
|
||||
}
|
||||
|
||||
static void
|
||||
recalc_if_needed (GtkCanvasImageFrame *image)
|
||||
recalc_if_needed (GnomeCanvasImageFrame *image)
|
||||
{}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_draw (GtkCanvasItem *item, GdkDrawable *drawable,
|
||||
gnome_canvas_imageframe_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
fprintf(stderr, "please don't use the CanvasImageFrame item in a non-aa Canvas\n") ;
|
||||
@@ -444,14 +444,14 @@ gtk_canvas_imageframe_draw (GtkCanvasItem *item, GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_canvas_imageframe_point (GtkCanvasItem *item, double x, double y,
|
||||
int cx, int cy, GtkCanvasItem **actual_item)
|
||||
gnome_canvas_imageframe_point (GnomeCanvasItem *item, double x, double y,
|
||||
int cx, int cy, GnomeCanvasItem **actual_item)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
int x1, y1, x2, y2;
|
||||
int dx, dy;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
*actual_item = item;
|
||||
|
||||
@@ -492,12 +492,12 @@ gtk_canvas_imageframe_point (GtkCanvasItem *item, double x, double y,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_translate (GtkCanvasItem *item, double dx, double dy)
|
||||
gnome_canvas_imageframe_translate (GnomeCanvasItem *item, double dx, double dy)
|
||||
{
|
||||
#ifdef OLD_XFORM
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
image->x += dx;
|
||||
image->y += dy;
|
||||
@@ -507,11 +507,11 @@ gtk_canvas_imageframe_translate (GtkCanvasItem *item, double dx, double dy)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
gnome_canvas_imageframe_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
*x1 = image->x;
|
||||
*y1 = image->y;
|
||||
@@ -559,19 +559,19 @@ gtk_canvas_imageframe_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_imageframe_render (GtkCanvasItem *item, GtkCanvasBuf *buf)
|
||||
gnome_canvas_imageframe_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasImageFrame *image;
|
||||
GnomeCanvasImageFrame *image;
|
||||
|
||||
image = GTK_CANVAS_IMAGEFRAME (item);
|
||||
image = GNOME_CANVAS_IMAGEFRAME (item);
|
||||
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
|
||||
#ifdef VERBOSE
|
||||
{
|
||||
char str[128];
|
||||
art_affine_to_string (str, image->affine);
|
||||
g_print ("gtk_canvas_imageframe_render %s\n", str);
|
||||
g_print ("gnome_canvas_imageframe_render %s\n", str);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Image item type for GtkCanvas widget
|
||||
/* Image item type for GnomeCanvas widget
|
||||
*
|
||||
* GtkCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
|
||||
* GnomeCanvas is basically a port of the Tk toolkit's most excellent canvas widget. Tk is
|
||||
* copyrighted by the Regents of the University of California, Sun Microsystems, and other parties.
|
||||
*
|
||||
* Copyright (C) 1998 The Free Software Foundation
|
||||
@@ -9,19 +9,18 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GTK_CANVAS_IMAGEFRAME_H__
|
||||
#define __GTK_CANVAS_IMAGEFRAME_H__
|
||||
#ifndef __GNOME_CANVAS_IMAGEFRAME_H__
|
||||
#define __GNOME_CANVAS_IMAGEFRAME_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtk/gtkpacker.h> /* why the hell is GtkAnchorType here and not in gtkenums.h? */
|
||||
#include <libart_lgpl/art_misc.h>
|
||||
#include <libart_lgpl/art_pixbuf.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
|
||||
/* Image item for the canvas. Images are positioned by anchoring them to a point.
|
||||
@@ -39,18 +38,18 @@ BEGIN_GTK_CANVAS_DECLS
|
||||
*/
|
||||
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME (gtk_canvas_imageframe_get_type ())
|
||||
#define GTK_CANVAS_IMAGEFRAME(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME, GtkCanvasImageFrame))
|
||||
#define GTK_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME, GtkCanvasImageFrameClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_IMAGEFRAME(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME))
|
||||
#define GTK_CANVAS_IS_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_IMAGEFRAME))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME (gnome_canvas_imageframe_get_type ())
|
||||
#define GNOME_CANVAS_IMAGEFRAME(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME, GnomeCanvasImageFrame))
|
||||
#define GNOME_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME, GnomeCanvasImageFrameClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_IMAGEFRAME(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME))
|
||||
#define GNOME_CANVAS_IS_CANVAS_IMAGEFRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_IMAGEFRAME))
|
||||
|
||||
|
||||
typedef struct _GtkCanvasImageFrame GtkCanvasImageFrame;
|
||||
typedef struct _GtkCanvasImageFrameClass GtkCanvasImageFrameClass;
|
||||
typedef struct _GnomeCanvasImageFrame GnomeCanvasImageFrame;
|
||||
typedef struct _GnomeCanvasImageFrameClass GnomeCanvasImageFrameClass;
|
||||
|
||||
struct _GtkCanvasImageFrame {
|
||||
GtkCanvasItem item;
|
||||
struct _GnomeCanvasImageFrame {
|
||||
GnomeCanvasItem item;
|
||||
|
||||
double x, y; /* Position at anchor, item relative */
|
||||
double width, height; /* Size of image, item relative */
|
||||
@@ -66,15 +65,15 @@ struct _GtkCanvasImageFrame {
|
||||
double affine[6]; /* The item -> canvas affine */
|
||||
};
|
||||
|
||||
struct _GtkCanvasImageFrameClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasImageFrameClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
/* Standard Gtk function */
|
||||
GtkType gtk_canvas_imageframe_get_type (void);
|
||||
GtkType gnome_canvas_imageframe_get_type (void);
|
||||
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "canvas-ruler.h"
|
||||
#include "rgb_macros.h"
|
||||
@@ -17,78 +17,78 @@ enum {
|
||||
|
||||
};
|
||||
|
||||
static void gtk_canvas_ruler_class_init (GtkCanvasRulerClass *class);
|
||||
static void gtk_canvas_ruler_init (GtkCanvasRuler *ruler);
|
||||
static void gtk_canvas_ruler_set_arg (GtkObject *object,
|
||||
static void gnome_canvas_ruler_class_init (GnomeCanvasRulerClass *class);
|
||||
static void gnome_canvas_ruler_init (GnomeCanvasRuler *ruler);
|
||||
static void gnome_canvas_ruler_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void gtk_canvas_ruler_get_arg (GtkObject *object,
|
||||
static void gnome_canvas_ruler_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void gtk_canvas_ruler_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gtk_canvas_ruler_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gtk_canvas_ruler_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
|
||||
static void gtk_canvas_ruler_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
|
||||
static void gtk_canvas_ruler_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
static void gnome_canvas_ruler_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gnome_canvas_ruler_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gnome_canvas_ruler_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
|
||||
static void gnome_canvas_ruler_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
|
||||
static void gnome_canvas_ruler_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
|
||||
static GtkCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
|
||||
GtkType
|
||||
gtk_canvas_ruler_get_type (void)
|
||||
gnome_canvas_ruler_get_type (void)
|
||||
{
|
||||
static GtkType ruler_type = 0;
|
||||
|
||||
if (!ruler_type) {
|
||||
GtkTypeInfo ruler_info = {
|
||||
"GtkCanvasRuler",
|
||||
sizeof (GtkCanvasRuler),
|
||||
sizeof (GtkCanvasRulerClass),
|
||||
(GtkClassInitFunc) gtk_canvas_ruler_class_init,
|
||||
(GtkObjectInitFunc) gtk_canvas_ruler_init,
|
||||
"GnomeCanvasRuler",
|
||||
sizeof (GnomeCanvasRuler),
|
||||
sizeof (GnomeCanvasRulerClass),
|
||||
(GtkClassInitFunc) gnome_canvas_ruler_class_init,
|
||||
(GtkObjectInitFunc) gnome_canvas_ruler_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
ruler_type = gtk_type_unique (gtk_canvas_item_get_type (), &ruler_info);
|
||||
ruler_type = gtk_type_unique (gnome_canvas_item_get_type (), &ruler_info);
|
||||
}
|
||||
|
||||
return ruler_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_class_init (GtkCanvasRulerClass *class)
|
||||
gnome_canvas_ruler_class_init (GnomeCanvasRulerClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkCanvasItemClass *item_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GtkCanvasItemClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_canvas_item_get_type ());
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::frames_per_unit", GTK_TYPE_LONG, GTK_ARG_READWRITE, ARG_FRAMES_PER_UNIT);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::fill_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR);
|
||||
gtk_object_add_arg_type ("GtkCanvasRuler::tick_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TICK_COLOR);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::frames_per_unit", GTK_TYPE_LONG, GTK_ARG_READWRITE, ARG_FRAMES_PER_UNIT);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::fill_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR);
|
||||
gtk_object_add_arg_type ("GnomeCanvasRuler::tick_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_TICK_COLOR);
|
||||
|
||||
object_class->set_arg = gtk_canvas_ruler_set_arg;
|
||||
object_class->get_arg = gtk_canvas_ruler_get_arg;
|
||||
object_class->set_arg = gnome_canvas_ruler_set_arg;
|
||||
object_class->get_arg = gnome_canvas_ruler_get_arg;
|
||||
|
||||
item_class->update = gtk_canvas_ruler_update;
|
||||
item_class->bounds = gtk_canvas_ruler_bounds;
|
||||
item_class->point = gtk_canvas_ruler_point;
|
||||
item_class->render = gtk_canvas_ruler_render;
|
||||
item_class->draw = gtk_canvas_ruler_draw;
|
||||
item_class->update = gnome_canvas_ruler_update;
|
||||
item_class->bounds = gnome_canvas_ruler_bounds;
|
||||
item_class->point = gnome_canvas_ruler_point;
|
||||
item_class->render = gnome_canvas_ruler_render;
|
||||
item_class->draw = gnome_canvas_ruler_draw;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_init (GtkCanvasRuler *ruler)
|
||||
gnome_canvas_ruler_init (GnomeCanvasRuler *ruler)
|
||||
{
|
||||
ruler->x1 = 0.0;
|
||||
ruler->y1 = 0.0;
|
||||
@@ -98,11 +98,11 @@ gtk_canvas_ruler_init (GtkCanvasRuler *ruler)
|
||||
ruler->fill_color = 0;
|
||||
ruler->tick_color = 0;
|
||||
|
||||
GTK_CANVAS_ITEM(ruler)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
GNOME_CANVAS_ITEM(ruler)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
|
||||
gnome_canvas_ruler_reset_bounds (GnomeCanvasItem *item)
|
||||
|
||||
{
|
||||
double x1, x2, y1, y2;
|
||||
@@ -111,14 +111,14 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
|
||||
int Ix1, Ix2, Iy1, Iy2;
|
||||
double i2w[6];
|
||||
|
||||
gtk_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
i1.x = x1;
|
||||
i1.y = y1;
|
||||
i2.x = x2;
|
||||
i2.y = y2;
|
||||
|
||||
gtk_canvas_item_i2w_affine (item, i2w);
|
||||
gnome_canvas_item_i2w_affine (item, i2w);
|
||||
art_affine_point (&w1, &i1, i2w);
|
||||
art_affine_point (&w2, &i2, i2w);
|
||||
|
||||
@@ -127,7 +127,7 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
|
||||
Iy1 = (int) rint(w1.y);
|
||||
Iy2 = (int) rint(w2.y);
|
||||
|
||||
gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -135,15 +135,15 @@ gtk_canvas_ruler_reset_bounds (GtkCanvasItem *item)
|
||||
*/
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasItem *item;
|
||||
GnomeCanvasRuler *ruler;
|
||||
int redraw;
|
||||
int calc_bounds;
|
||||
|
||||
item = GTK_CANVAS_ITEM (object);
|
||||
ruler = GTK_CANVAS_RULER (object);
|
||||
item = GNOME_CANVAS_ITEM (object);
|
||||
ruler = GNOME_CANVAS_RULER (object);
|
||||
|
||||
redraw = FALSE;
|
||||
calc_bounds = FALSE;
|
||||
@@ -203,21 +203,21 @@ gtk_canvas_ruler_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
if (calc_bounds) {
|
||||
gtk_canvas_ruler_reset_bounds (item);
|
||||
gnome_canvas_ruler_reset_bounds (item);
|
||||
}
|
||||
|
||||
if (redraw) {
|
||||
gtk_canvas_item_request_update (item);
|
||||
gnome_canvas_item_request_update (item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasRuler *ruler;
|
||||
|
||||
ruler = GTK_CANVAS_RULER (object);
|
||||
ruler = GNOME_CANVAS_RULER (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_X1:
|
||||
@@ -248,50 +248,50 @@ gtk_canvas_ruler_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
gnome_canvas_ruler_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
{
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasRuler *ruler;
|
||||
double x;
|
||||
double y;
|
||||
|
||||
ruler = GTK_CANVAS_RULER (item);
|
||||
ruler = GNOME_CANVAS_RULER (item);
|
||||
|
||||
if (parent_class->update)
|
||||
(* parent_class->update) (item, affine, clip_path, flags);
|
||||
|
||||
gtk_canvas_ruler_reset_bounds (item);
|
||||
gnome_canvas_ruler_reset_bounds (item);
|
||||
|
||||
x = ruler->x1;
|
||||
y = ruler->y1;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &ruler->bbox_ulx, &ruler->bbox_uly);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &ruler->bbox_ulx, &ruler->bbox_uly);
|
||||
|
||||
x = ruler->x2;
|
||||
y = ruler->y2;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &ruler->bbox_lrx, &ruler->bbox_lry);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &ruler->bbox_lrx, &ruler->bbox_lry);
|
||||
|
||||
UINT_TO_RGB (ruler->tick_color, &ruler->tick_r, &ruler->tick_g, &ruler->tick_b);
|
||||
UINT_TO_RGB (ruler->fill_color, &ruler->fill_r, &ruler->fill_g, &ruler->fill_b);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_render (GtkCanvasItem *item,
|
||||
GtkCanvasBuf *buf)
|
||||
gnome_canvas_ruler_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasRuler *ruler;
|
||||
int end, begin;
|
||||
|
||||
ruler = GTK_CANVAS_RULER (item);
|
||||
ruler = GNOME_CANVAS_RULER (item);
|
||||
|
||||
if (parent_class->render) {
|
||||
(*parent_class->render) (item, buf);
|
||||
}
|
||||
|
||||
if (buf->is_bg) {
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
buf->is_bg = FALSE;
|
||||
}
|
||||
|
||||
@@ -312,14 +312,14 @@ gtk_canvas_ruler_render (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_draw (GtkCanvasItem *item,
|
||||
gnome_canvas_ruler_draw (GnomeCanvasItem *item,
|
||||
GdkDrawable *drawable,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
{
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasRuler *ruler;
|
||||
|
||||
ruler = GTK_CANVAS_RULER (item);
|
||||
ruler = GNOME_CANVAS_RULER (item);
|
||||
|
||||
if (parent_class->draw) {
|
||||
(* parent_class->draw) (item, drawable, x, y, width, height);
|
||||
@@ -330,9 +330,9 @@ gtk_canvas_ruler_draw (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_ruler_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
gnome_canvas_ruler_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
{
|
||||
GtkCanvasRuler *ruler = GTK_CANVAS_RULER (item);
|
||||
GnomeCanvasRuler *ruler = GNOME_CANVAS_RULER (item);
|
||||
|
||||
*x1 = ruler->x1;
|
||||
*y1 = ruler->y1;
|
||||
@@ -341,19 +341,19 @@ gtk_canvas_ruler_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_canvas_ruler_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
|
||||
gnome_canvas_ruler_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
|
||||
{
|
||||
GtkCanvasRuler *ruler;
|
||||
GnomeCanvasRuler *ruler;
|
||||
double x1, y1, x2, y2;
|
||||
double dx, dy;
|
||||
|
||||
ruler = GTK_CANVAS_RULER (item);
|
||||
ruler = GNOME_CANVAS_RULER (item);
|
||||
|
||||
*actual_item = item;
|
||||
|
||||
/* Find the bounds for the rectangle plus its outline width */
|
||||
|
||||
gtk_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_ruler_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
/* Is point inside rectangle */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* gtk-canvas-ruler.h: GtkCanvas item for simple rects
|
||||
/* libgnomecanvas/gnome-canvas-ruler.h: GnomeCanvas item for simple rects
|
||||
*
|
||||
* Copyright (C) 2001 Paul Davis <pbd@op.net>
|
||||
*
|
||||
@@ -19,31 +19,30 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CANVAS_RULER_H__
|
||||
#define __GTK_CANVAS_RULER_H__
|
||||
#ifndef __GNOME_CANVAS_RULER_H__
|
||||
#define __GNOME_CANVAS_RULER_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
#include "libgnomecanvas/libgnomecanvas.h"
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_RULER (gtk_canvas_ruler_get_type ())
|
||||
#define GTK_CANVAS_RULER(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_RULER, GtkCanvasRuler))
|
||||
#define GTK_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_RULER, GtkCanvasRulerClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_RULER(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_RULER))
|
||||
#define GTK_CANVAS_IS_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_RULER))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_RULER (gnome_canvas_ruler_get_type ())
|
||||
#define GNOME_CANVAS_RULER(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRuler))
|
||||
#define GNOME_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER, GnomeCanvasRulerClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_RULER(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_RULER))
|
||||
#define GNOME_CANVAS_IS_CANVAS_RULER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_RULER))
|
||||
|
||||
typedef struct _GtkCanvasRuler GtkCanvasRuler;
|
||||
typedef struct _GtkCanvasRulerClass GtkCanvasRulerClass;
|
||||
typedef struct _GnomeCanvasRuler GnomeCanvasRuler;
|
||||
typedef struct _GnomeCanvasRulerClass GnomeCanvasRulerClass;
|
||||
|
||||
struct _GtkCanvasRuler
|
||||
struct _GnomeCanvasRuler
|
||||
{
|
||||
GtkCanvasItem item;
|
||||
GnomeCanvasItem item;
|
||||
double x1, y1, x2, y2;
|
||||
uint32_t fill_color;
|
||||
uint32_t tick_color;
|
||||
@@ -57,12 +56,12 @@ struct _GtkCanvasRuler
|
||||
guint32 bbox_lrx, bbox_lry;
|
||||
};
|
||||
|
||||
struct _GtkCanvasRulerClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasRulerClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_canvas_ruler_get_type (void);
|
||||
GtkType gnome_canvas_ruler_get_type (void);
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif /* __GTK_CANVAS_RULER_H__ */
|
||||
#endif /* __GNOME_CANVAS_RULER_H__ */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "canvas-simpleline.h"
|
||||
#include "rgb_macros.h"
|
||||
@@ -14,76 +14,76 @@ enum {
|
||||
ARG_COLOR_RGBA
|
||||
};
|
||||
|
||||
static void gtk_canvas_simpleline_class_init (GtkCanvasSimpleLineClass *class);
|
||||
static void gtk_canvas_simpleline_init (GtkCanvasSimpleLine *simpleline);
|
||||
static void gtk_canvas_simpleline_set_arg (GtkObject *object,
|
||||
static void gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class);
|
||||
static void gnome_canvas_simpleline_init (GnomeCanvasSimpleLine *simpleline);
|
||||
static void gnome_canvas_simpleline_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void gtk_canvas_simpleline_get_arg (GtkObject *object,
|
||||
static void gnome_canvas_simpleline_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void gtk_canvas_simpleline_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gtk_canvas_simpleline_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gtk_canvas_simpleline_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
|
||||
static void gtk_canvas_simpleline_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
|
||||
static void gtk_canvas_simpleline_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
static void gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gnome_canvas_simpleline_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
|
||||
static void gnome_canvas_simpleline_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
|
||||
static void gnome_canvas_simpleline_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
|
||||
static GtkCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
|
||||
GtkType
|
||||
gtk_canvas_simpleline_get_type (void)
|
||||
gnome_canvas_simpleline_get_type (void)
|
||||
{
|
||||
static GtkType simpleline_type = 0;
|
||||
|
||||
if (!simpleline_type) {
|
||||
GtkTypeInfo simpleline_info = {
|
||||
"GtkCanvasSimpleLine",
|
||||
sizeof (GtkCanvasSimpleLine),
|
||||
sizeof (GtkCanvasSimpleLineClass),
|
||||
(GtkClassInitFunc) gtk_canvas_simpleline_class_init,
|
||||
(GtkObjectInitFunc) gtk_canvas_simpleline_init,
|
||||
"GnomeCanvasSimpleLine",
|
||||
sizeof (GnomeCanvasSimpleLine),
|
||||
sizeof (GnomeCanvasSimpleLineClass),
|
||||
(GtkClassInitFunc) gnome_canvas_simpleline_class_init,
|
||||
(GtkObjectInitFunc) gnome_canvas_simpleline_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
simpleline_type = gtk_type_unique (gtk_canvas_item_get_type (), &simpleline_info);
|
||||
simpleline_type = gtk_type_unique (gnome_canvas_item_get_type (), &simpleline_info);
|
||||
}
|
||||
|
||||
return simpleline_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_class_init (GtkCanvasSimpleLineClass *class)
|
||||
gnome_canvas_simpleline_class_init (GnomeCanvasSimpleLineClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkCanvasItemClass *item_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GtkCanvasItemClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_canvas_item_get_type ());
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleLine::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleLine::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleLine::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleLine::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleLine::color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_COLOR_RGBA);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleLine::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleLine::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleLine::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleLine::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleLine::color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_COLOR_RGBA);
|
||||
|
||||
object_class->set_arg = gtk_canvas_simpleline_set_arg;
|
||||
object_class->get_arg = gtk_canvas_simpleline_get_arg;
|
||||
object_class->set_arg = gnome_canvas_simpleline_set_arg;
|
||||
object_class->get_arg = gnome_canvas_simpleline_get_arg;
|
||||
|
||||
item_class->update = gtk_canvas_simpleline_update;
|
||||
item_class->bounds = gtk_canvas_simpleline_bounds;
|
||||
item_class->point = gtk_canvas_simpleline_point;
|
||||
item_class->render = gtk_canvas_simpleline_render;
|
||||
item_class->draw = gtk_canvas_simpleline_draw;
|
||||
item_class->update = gnome_canvas_simpleline_update;
|
||||
item_class->bounds = gnome_canvas_simpleline_bounds;
|
||||
item_class->point = gnome_canvas_simpleline_point;
|
||||
item_class->render = gnome_canvas_simpleline_render;
|
||||
item_class->draw = gnome_canvas_simpleline_draw;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_init (GtkCanvasSimpleLine *simpleline)
|
||||
gnome_canvas_simpleline_init (GnomeCanvasSimpleLine *simpleline)
|
||||
{
|
||||
simpleline->x1 = 0.0;
|
||||
simpleline->y1 = 0.0;
|
||||
@@ -91,26 +91,26 @@ gtk_canvas_simpleline_init (GtkCanvasSimpleLine *simpleline)
|
||||
simpleline->y2 = 0.0;
|
||||
simpleline->color = RGBA_TO_UINT(98,123,174,241);
|
||||
simpleline->horizontal = TRUE; /* reset in the _update() method */
|
||||
GTK_CANVAS_ITEM(simpleline)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
GNOME_CANVAS_ITEM(simpleline)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_bounds_world (GtkCanvasItem *item, int* ix1, int* iy1, int* ix2, int* iy2)
|
||||
gnome_canvas_simpleline_bounds_world (GnomeCanvasItem *item, int* ix1, int* iy1, int* ix2, int* iy2)
|
||||
{
|
||||
double x1, x2, y1, y2;
|
||||
ArtPoint i1, i2;
|
||||
ArtPoint w1, w2;
|
||||
double i2w[6];
|
||||
GtkCanvasSimpleLine *simpleline = GTK_CANVAS_SIMPLELINE(item);
|
||||
GnomeCanvasSimpleLine *simpleline = GNOME_CANVAS_SIMPLELINE(item);
|
||||
|
||||
gtk_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
i1.x = x1;
|
||||
i1.y = y1;
|
||||
i2.x = x2;
|
||||
i2.y = y2;
|
||||
|
||||
gtk_canvas_item_i2w_affine (item, i2w);
|
||||
gnome_canvas_item_i2w_affine (item, i2w);
|
||||
art_affine_point (&w1, &i1, i2w);
|
||||
art_affine_point (&w2, &i2, i2w);
|
||||
|
||||
@@ -131,12 +131,12 @@ gtk_canvas_simpleline_bounds_world (GtkCanvasItem *item, int* ix1, int* iy1, int
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_reset_bounds (GtkCanvasItem *item)
|
||||
gnome_canvas_simpleline_reset_bounds (GnomeCanvasItem *item)
|
||||
{
|
||||
int Ix1, Ix2, Iy1, Iy2;
|
||||
|
||||
gtk_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
|
||||
gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
gnome_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
|
||||
gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -144,15 +144,15 @@ gtk_canvas_simpleline_reset_bounds (GtkCanvasItem *item)
|
||||
*/
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasItem *item;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
int redraw;
|
||||
int calc_bounds;
|
||||
|
||||
item = GTK_CANVAS_ITEM (object);
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (object);
|
||||
item = GNOME_CANVAS_ITEM (object);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (object);
|
||||
|
||||
redraw = FALSE;
|
||||
calc_bounds = FALSE;
|
||||
@@ -200,22 +200,22 @@ gtk_canvas_simpleline_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
|
||||
if (calc_bounds) {
|
||||
|
||||
gtk_canvas_item_request_update (item);
|
||||
gnome_canvas_item_request_update (item);
|
||||
|
||||
} else if (redraw) {
|
||||
|
||||
int Ix1, Ix2, Iy1, Iy2;
|
||||
gtk_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
|
||||
gtk_canvas_request_redraw (item->canvas, Ix1, Iy1, Ix2, Iy2);
|
||||
gnome_canvas_simpleline_bounds_world (item, &Ix1, &Iy1, &Ix2, &Iy2);
|
||||
gnome_canvas_request_redraw (item->canvas, Ix1, Iy1, Ix2, Iy2);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (object);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_X1:
|
||||
@@ -240,47 +240,47 @@ gtk_canvas_simpleline_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
gnome_canvas_simpleline_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
double x;
|
||||
double y;
|
||||
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (item);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (item);
|
||||
|
||||
if (parent_class->update)
|
||||
(* parent_class->update) (item, affine, clip_path, flags);
|
||||
|
||||
gtk_canvas_simpleline_reset_bounds (item);
|
||||
gnome_canvas_simpleline_reset_bounds (item);
|
||||
|
||||
x = simpleline->x1;
|
||||
y = simpleline->y1;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &simpleline->bbox_ulx, &simpleline->bbox_uly);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &simpleline->bbox_ulx, &simpleline->bbox_uly);
|
||||
|
||||
x = simpleline->x2;
|
||||
y = simpleline->y2;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &simpleline->bbox_lrx, &simpleline->bbox_lry);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &simpleline->bbox_lrx, &simpleline->bbox_lry);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_render (GtkCanvasItem *item,
|
||||
GtkCanvasBuf *buf)
|
||||
gnome_canvas_simpleline_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
int end, begin;
|
||||
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (item);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (item);
|
||||
|
||||
if (parent_class->render) {
|
||||
(*parent_class->render) (item, buf);
|
||||
}
|
||||
|
||||
if (buf->is_bg) {
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
buf->is_bg = FALSE;
|
||||
}
|
||||
|
||||
@@ -302,14 +302,14 @@ gtk_canvas_simpleline_render (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_draw (GtkCanvasItem *item,
|
||||
gnome_canvas_simpleline_draw (GnomeCanvasItem *item,
|
||||
GdkDrawable *drawable,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (item);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (item);
|
||||
|
||||
if (parent_class->draw) {
|
||||
(* parent_class->draw) (item, drawable, x, y, width, height);
|
||||
@@ -320,9 +320,9 @@ gtk_canvas_simpleline_draw (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simpleline_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
gnome_canvas_simpleline_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline = GTK_CANVAS_SIMPLELINE (item);
|
||||
GnomeCanvasSimpleLine *simpleline = GNOME_CANVAS_SIMPLELINE (item);
|
||||
|
||||
*x1 = simpleline->x1;
|
||||
*y1 = simpleline->y1;
|
||||
@@ -331,19 +331,19 @@ gtk_canvas_simpleline_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_canvas_simpleline_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
|
||||
gnome_canvas_simpleline_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
|
||||
{
|
||||
GtkCanvasSimpleLine *simpleline;
|
||||
GnomeCanvasSimpleLine *simpleline;
|
||||
double x1, y1, x2, y2;
|
||||
double dx, dy;
|
||||
|
||||
simpleline = GTK_CANVAS_SIMPLELINE (item);
|
||||
simpleline = GNOME_CANVAS_SIMPLELINE (item);
|
||||
|
||||
*actual_item = item;
|
||||
|
||||
/* Find the bounds for the rectangle plus its outline width */
|
||||
|
||||
gtk_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_simpleline_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
/* Is point inside rectangle */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* gtk-canvas-simpleline.h: GtkCanvas item for simple rects
|
||||
/* libgnomecanvas/gnome-canvas-simpleline.h: GnomeCanvas item for simple rects
|
||||
*
|
||||
* Copyright (C) 2001 Paul Davis <pbd@op.net>
|
||||
*
|
||||
@@ -19,31 +19,30 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CANVAS_SIMPLELINE_H__
|
||||
#define __GTK_CANVAS_SIMPLELINE_H__
|
||||
#ifndef __GNOME_CANVAS_SIMPLELINE_H__
|
||||
#define __GNOME_CANVAS_SIMPLELINE_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_SIMPLELINE (gtk_canvas_simpleline_get_type ())
|
||||
#define GTK_CANVAS_SIMPLELINE(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLine))
|
||||
#define GTK_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE, GtkCanvasSimpleLineClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_SIMPLELINE(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
|
||||
#define GTK_CANVAS_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLELINE))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE (gnome_canvas_simpleline_get_type ())
|
||||
#define GNOME_CANVAS_SIMPLELINE(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLine))
|
||||
#define GNOME_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE, GnomeCanvasSimpleLineClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_SIMPLELINE(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE))
|
||||
#define GNOME_CANVAS_IS_CANVAS_SIMPLELINE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLELINE))
|
||||
|
||||
typedef struct _GtkCanvasSimpleLine GtkCanvasSimpleLine;
|
||||
typedef struct _GtkCanvasSimpleLineClass GtkCanvasSimpleLineClass;
|
||||
typedef struct _GnomeCanvasSimpleLine GnomeCanvasSimpleLine;
|
||||
typedef struct _GnomeCanvasSimpleLineClass GnomeCanvasSimpleLineClass;
|
||||
|
||||
struct _GtkCanvasSimpleLine
|
||||
struct _GnomeCanvasSimpleLine
|
||||
{
|
||||
GtkCanvasItem item;
|
||||
GnomeCanvasItem item;
|
||||
double x1, y1, x2, y2;
|
||||
uint32_t color;
|
||||
gboolean horizontal;
|
||||
@@ -55,12 +54,12 @@ struct _GtkCanvasSimpleLine
|
||||
guint32 bbox_lrx, bbox_lry;
|
||||
};
|
||||
|
||||
struct _GtkCanvasSimpleLineClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasSimpleLineClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_canvas_simpleline_get_type (void);
|
||||
GtkType gnome_canvas_simpleline_get_type (void);
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif /* __GTK_CANVAS_SIMPLELINE_H__ */
|
||||
#endif /* __GNOME_CANVAS_SIMPLELINE_H__ */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "canvas-simplerect.h"
|
||||
#include "rgb_macros.h"
|
||||
@@ -20,81 +20,81 @@ enum {
|
||||
|
||||
};
|
||||
|
||||
static void gtk_canvas_simplerect_class_init (GtkCanvasSimpleRectClass *class);
|
||||
static void gtk_canvas_simplerect_init (GtkCanvasSimpleRect *simplerect);
|
||||
static void gtk_canvas_simplerect_set_arg (GtkObject *object,
|
||||
static void gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class);
|
||||
static void gnome_canvas_simplerect_init (GnomeCanvasSimpleRect *simplerect);
|
||||
static void gnome_canvas_simplerect_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void gtk_canvas_simplerect_get_arg (GtkObject *object,
|
||||
static void gnome_canvas_simplerect_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void gtk_canvas_simplerect_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gtk_canvas_simplerect_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gtk_canvas_simplerect_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
|
||||
static void gtk_canvas_simplerect_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
|
||||
static void gtk_canvas_simplerect_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
static void gnome_canvas_simplerect_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
|
||||
static void gnome_canvas_simplerect_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
|
||||
static void gnome_canvas_simplerect_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
|
||||
static GtkCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
|
||||
GtkType
|
||||
gtk_canvas_simplerect_get_type (void)
|
||||
gnome_canvas_simplerect_get_type (void)
|
||||
{
|
||||
static GtkType simplerect_type = 0;
|
||||
|
||||
if (!simplerect_type) {
|
||||
GtkTypeInfo simplerect_info = {
|
||||
"GtkCanvasSimpleRect",
|
||||
sizeof (GtkCanvasSimpleRect),
|
||||
sizeof (GtkCanvasSimpleRectClass),
|
||||
(GtkClassInitFunc) gtk_canvas_simplerect_class_init,
|
||||
(GtkObjectInitFunc) gtk_canvas_simplerect_init,
|
||||
"GnomeCanvasSimpleRect",
|
||||
sizeof (GnomeCanvasSimpleRect),
|
||||
sizeof (GnomeCanvasSimpleRectClass),
|
||||
(GtkClassInitFunc) gnome_canvas_simplerect_class_init,
|
||||
(GtkObjectInitFunc) gnome_canvas_simplerect_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
simplerect_type = gtk_type_unique (gtk_canvas_item_get_type (), &simplerect_info);
|
||||
simplerect_type = gtk_type_unique (gnome_canvas_item_get_type (), &simplerect_info);
|
||||
}
|
||||
|
||||
return simplerect_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_class_init (GtkCanvasSimpleRectClass *class)
|
||||
gnome_canvas_simplerect_class_init (GnomeCanvasSimpleRectClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkCanvasItemClass *item_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GtkCanvasItemClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_canvas_item_get_type ());
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_FILL);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::draw", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::fill_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR_RGBA);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_COLOR_RGBA);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_pixels", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_PIXELS);
|
||||
gtk_object_add_arg_type ("GtkCanvasSimpleRect::outline_what", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_WHAT);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::x1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::y1", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y1);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::x2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::y2", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y2);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::fill", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_FILL);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::draw", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::fill_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FILL_COLOR_RGBA);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_color_rgba", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_COLOR_RGBA);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_pixels", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_PIXELS);
|
||||
gtk_object_add_arg_type ("GnomeCanvasSimpleRect::outline_what", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_OUTLINE_WHAT);
|
||||
|
||||
object_class->set_arg = gtk_canvas_simplerect_set_arg;
|
||||
object_class->get_arg = gtk_canvas_simplerect_get_arg;
|
||||
object_class->set_arg = gnome_canvas_simplerect_set_arg;
|
||||
object_class->get_arg = gnome_canvas_simplerect_get_arg;
|
||||
|
||||
item_class->update = gtk_canvas_simplerect_update;
|
||||
item_class->bounds = gtk_canvas_simplerect_bounds;
|
||||
item_class->point = gtk_canvas_simplerect_point;
|
||||
item_class->render = gtk_canvas_simplerect_render;
|
||||
item_class->draw = gtk_canvas_simplerect_draw;
|
||||
item_class->update = gnome_canvas_simplerect_update;
|
||||
item_class->bounds = gnome_canvas_simplerect_bounds;
|
||||
item_class->point = gnome_canvas_simplerect_point;
|
||||
item_class->render = gnome_canvas_simplerect_render;
|
||||
item_class->draw = gnome_canvas_simplerect_draw;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_init (GtkCanvasSimpleRect *simplerect)
|
||||
gnome_canvas_simplerect_init (GnomeCanvasSimpleRect *simplerect)
|
||||
{
|
||||
simplerect->x1 = 0.0;
|
||||
simplerect->y1 = 0.0;
|
||||
@@ -108,13 +108,13 @@ gtk_canvas_simplerect_init (GtkCanvasSimpleRect *simplerect)
|
||||
simplerect->outline_pixels = 1;
|
||||
simplerect->outline_what = 0xf;
|
||||
|
||||
GTK_CANVAS_ITEM(simplerect)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
GNOME_CANVAS_ITEM(simplerect)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
gnome_canvas_simplerect_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
GnomeCanvasSimpleRect *simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
*x1 = simplerect->x1;
|
||||
*y1 = simplerect->y1;
|
||||
@@ -124,9 +124,9 @@ gtk_canvas_simplerect_bounds (GtkCanvasItem *item, double *x1, double *y1, doubl
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
gnome_canvas_simplerect_reset_bounds (GnomeCanvasItem *item)
|
||||
{
|
||||
GtkCanvasSimpleRect* simplerect;
|
||||
GnomeCanvasSimpleRect* simplerect;
|
||||
double x1, x2, y1, y2;
|
||||
double old_x1, old_x2, old_y1, old_y2;
|
||||
double a, b;
|
||||
@@ -136,9 +136,9 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
old_x2 = item->x2;
|
||||
old_y2 = item->y2;
|
||||
|
||||
gtk_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gtk_canvas_item_i2w (item, &x1, &y1);
|
||||
gtk_canvas_item_i2w (item, &x2, &y2);
|
||||
gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_item_i2w (item, &x1, &y1);
|
||||
gnome_canvas_item_i2w (item, &x2, &y2);
|
||||
|
||||
item->x1 = x1;
|
||||
item->y1 = y1;
|
||||
@@ -147,10 +147,10 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
|
||||
/* now compute bounding box in canvas units */
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x1, y1, &simplerect->bbox_ulx, &simplerect->bbox_uly);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x2, y2, &simplerect->bbox_lrx, &simplerect->bbox_lry);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x1, y1, &simplerect->bbox_ulx, &simplerect->bbox_uly);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x2, y2, &simplerect->bbox_lrx, &simplerect->bbox_lry);
|
||||
|
||||
/* now queue redraws for changed areas */
|
||||
|
||||
@@ -160,7 +160,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
|
||||
a = MIN(item->x1, old_x1);
|
||||
b = MAX(item->x1, old_x1);
|
||||
gtk_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
|
||||
gnome_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
|
||||
}
|
||||
|
||||
if (item->x2 != old_x2) {
|
||||
@@ -169,7 +169,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
|
||||
a = MIN(item->x2, old_x2);
|
||||
b = MAX(item->x2, old_x2);
|
||||
gtk_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
|
||||
gnome_canvas_request_redraw (item->canvas, a - 1, item->y1, b + 1, item->y2);
|
||||
}
|
||||
|
||||
if (item->y1 != old_y1) {
|
||||
@@ -178,7 +178,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
|
||||
a = MIN(item->y1, old_y1);
|
||||
b = MAX(item->y1, old_y1);
|
||||
gtk_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
|
||||
gnome_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
|
||||
}
|
||||
|
||||
if (item->y2 != old_y2) {
|
||||
@@ -187,7 +187,7 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
|
||||
a = MIN(item->y2, old_y2);
|
||||
b = MAX(item->y2, old_y2);
|
||||
gtk_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
|
||||
gnome_canvas_request_redraw (item->canvas, item->x1, a - 1, item->x2, b + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,15 +196,15 @@ gtk_canvas_simplerect_reset_bounds (GtkCanvasItem *item)
|
||||
*/
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasItem *item;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
int update;
|
||||
int bounds_changed;
|
||||
|
||||
item = GTK_CANVAS_ITEM (object);
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (object);
|
||||
item = GNOME_CANVAS_ITEM (object);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (object);
|
||||
|
||||
update = FALSE;
|
||||
bounds_changed = FALSE;
|
||||
@@ -288,16 +288,16 @@ gtk_canvas_simplerect_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
simplerect->full_draw_on_update = update;
|
||||
|
||||
if (update || bounds_changed) {
|
||||
gtk_canvas_item_request_update (item);
|
||||
gnome_canvas_item_request_update (item);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (object);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_X1:
|
||||
@@ -337,20 +337,20 @@ gtk_canvas_simplerect_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
gnome_canvas_simplerect_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
unsigned char foo;
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
if (parent_class->update)
|
||||
(* parent_class->update) (item, affine, clip_path, flags);
|
||||
|
||||
gtk_canvas_simplerect_reset_bounds (item);
|
||||
gnome_canvas_simplerect_reset_bounds (item);
|
||||
|
||||
if (simplerect->full_draw_on_update) {
|
||||
gtk_canvas_request_redraw (item->canvas,
|
||||
gnome_canvas_request_redraw (item->canvas,
|
||||
simplerect->bbox_ulx,
|
||||
simplerect->bbox_uly,
|
||||
simplerect->bbox_lrx+1,
|
||||
@@ -366,17 +366,17 @@ gtk_canvas_simplerect_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_
|
||||
#ifdef SIMPLERECT_FAST_RENDERER
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
GtkCanvasBuf *buf)
|
||||
gnome_canvas_simplerect_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
int end, begin;
|
||||
int ey, sy;
|
||||
unsigned int i;
|
||||
ArtIRect intersection;
|
||||
ArtIRect self;
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
if (parent_class->render) {
|
||||
(*parent_class->render) (item, buf);
|
||||
@@ -393,7 +393,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
// randb = random() % 255;
|
||||
// PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
|
||||
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
buf->is_bg = FALSE;
|
||||
}
|
||||
|
||||
@@ -458,15 +458,15 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
#else /* SIMPLERECT_FAST_RENDERER */
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
GtkCanvasBuf *buf)
|
||||
gnome_canvas_simplerect_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
int end, begin;
|
||||
int ey, sy;
|
||||
unsigned int i;
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
if (parent_class->render) {
|
||||
(*parent_class->render) (item, buf);
|
||||
@@ -483,7 +483,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
// randb = random() % 255;
|
||||
// PAINT_BOX(buf, randr, randg, randb, 255, buf->rect.x0, buf->rect.y0, buf->rect.x1, buf->rect.y1);
|
||||
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
buf->is_bg = FALSE;
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ gtk_canvas_simplerect_render (GtkCanvasItem *item,
|
||||
#endif /* SIMPLERECT_FAST_RENDERER */
|
||||
|
||||
static void
|
||||
gtk_canvas_simplerect_draw (GtkCanvasItem *item,
|
||||
gnome_canvas_simplerect_draw (GnomeCanvasItem *item,
|
||||
GdkDrawable *drawable,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
@@ -547,19 +547,19 @@ gtk_canvas_simplerect_draw (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_canvas_simplerect_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
|
||||
gnome_canvas_simplerect_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
|
||||
{
|
||||
GtkCanvasSimpleRect *simplerect;
|
||||
GnomeCanvasSimpleRect *simplerect;
|
||||
double x1, y1, x2, y2;
|
||||
double dx, dy;
|
||||
|
||||
simplerect = GTK_CANVAS_SIMPLERECT (item);
|
||||
simplerect = GNOME_CANVAS_SIMPLERECT (item);
|
||||
|
||||
*actual_item = item;
|
||||
|
||||
/* Find the bounds for the rectangle plus its outline width */
|
||||
|
||||
gtk_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_simplerect_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
/* Is point inside rectangle */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* gtk-canvas-simplerect.h: GtkCanvas item for simple rects
|
||||
/* libgnomecanvas/gnome-canvas-simplerect.h: GnomeCanvas item for simple rects
|
||||
*
|
||||
* Copyright (C) 2001 Paul Davis <pbd@op.net>
|
||||
*
|
||||
@@ -19,31 +19,30 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CANVAS_SIMPLERECT_H__
|
||||
#define __GTK_CANVAS_SIMPLERECT_H__
|
||||
#ifndef __GNOME_CANVAS_SIMPLERECT_H__
|
||||
#define __GNOME_CANVAS_SIMPLERECT_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_SIMPLERECT (gtk_canvas_simplerect_get_type ())
|
||||
#define GTK_CANVAS_SIMPLERECT(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT, GtkCanvasSimpleRect))
|
||||
#define GTK_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT, GtkCanvasSimpleRectClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_SIMPLERECT(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT))
|
||||
#define GTK_CANVAS_IS_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_SIMPLERECT))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT (gnome_canvas_simplerect_get_type ())
|
||||
#define GNOME_CANVAS_SIMPLERECT(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT, GnomeCanvasSimpleRect))
|
||||
#define GNOME_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT, GnomeCanvasSimpleRectClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_SIMPLERECT(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT))
|
||||
#define GNOME_CANVAS_IS_CANVAS_SIMPLERECT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_SIMPLERECT))
|
||||
|
||||
typedef struct _GtkCanvasSimpleRect GtkCanvasSimpleRect;
|
||||
typedef struct _GtkCanvasSimpleRectClass GtkCanvasSimpleRectClass;
|
||||
typedef struct _GnomeCanvasSimpleRect GnomeCanvasSimpleRect;
|
||||
typedef struct _GnomeCanvasSimpleRectClass GnomeCanvasSimpleRectClass;
|
||||
|
||||
struct _GtkCanvasSimpleRect
|
||||
struct _GnomeCanvasSimpleRect
|
||||
{
|
||||
GtkCanvasItem item;
|
||||
GnomeCanvasItem item;
|
||||
double x1, y1, x2, y2;
|
||||
gboolean fill;
|
||||
gboolean draw;
|
||||
@@ -61,12 +60,12 @@ struct _GtkCanvasSimpleRect
|
||||
guint32 bbox_lrx, bbox_lry;
|
||||
};
|
||||
|
||||
struct _GtkCanvasSimpleRectClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasSimpleRectClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_canvas_simplerect_get_type (void);
|
||||
GtkType gnome_canvas_simplerect_get_type (void);
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif /* __GTK_CANVAS_SIMPLERECT_H__ */
|
||||
#endif /* __GNOME_CANVAS_SIMPLERECT_H__ */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -50,100 +50,100 @@ enum {
|
||||
ARG_REGION_START
|
||||
};
|
||||
|
||||
static void gtk_canvas_waveview_class_init (GtkCanvasWaveViewClass *class);
|
||||
static void gtk_canvas_waveview_init (GtkCanvasWaveView *waveview);
|
||||
static void gtk_canvas_waveview_set_arg (GtkObject *object,
|
||||
static void gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class);
|
||||
static void gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview);
|
||||
static void gnome_canvas_waveview_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
static void gtk_canvas_waveview_get_arg (GtkObject *object,
|
||||
static void gnome_canvas_waveview_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint arg_id);
|
||||
|
||||
static void gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gtk_canvas_waveview_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item);
|
||||
static void gnome_canvas_waveview_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags);
|
||||
static void gnome_canvas_waveview_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2);
|
||||
static double gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item);
|
||||
|
||||
static void gtk_canvas_waveview_render (GtkCanvasItem *item, GtkCanvasBuf *buf);
|
||||
static void gtk_canvas_waveview_draw (GtkCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
static void gnome_canvas_waveview_render (GnomeCanvasItem *item, GnomeCanvasBuf *buf);
|
||||
static void gnome_canvas_waveview_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int w, int h);
|
||||
|
||||
static void gtk_canvas_waveview_set_data_src (GtkCanvasWaveView *, void *);
|
||||
static void gtk_canvas_waveview_set_channel (GtkCanvasWaveView *, guint32);
|
||||
static void gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *, void *);
|
||||
static void gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *, guint32);
|
||||
|
||||
static gint32 gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_sample, gulong end_sample);
|
||||
static gint32 gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample);
|
||||
|
||||
static GtkCanvasItemClass *parent_class;
|
||||
static GnomeCanvasItemClass *parent_class;
|
||||
|
||||
GtkType
|
||||
gtk_canvas_waveview_get_type (void)
|
||||
gnome_canvas_waveview_get_type (void)
|
||||
{
|
||||
static GtkType waveview_type = 0;
|
||||
|
||||
if (!waveview_type) {
|
||||
GtkTypeInfo waveview_info = {
|
||||
"GtkCanvasWaveView",
|
||||
sizeof (GtkCanvasWaveView),
|
||||
sizeof (GtkCanvasWaveViewClass),
|
||||
(GtkClassInitFunc) gtk_canvas_waveview_class_init,
|
||||
(GtkObjectInitFunc) gtk_canvas_waveview_init,
|
||||
"GnomeCanvasWaveView",
|
||||
sizeof (GnomeCanvasWaveView),
|
||||
sizeof (GnomeCanvasWaveViewClass),
|
||||
(GtkClassInitFunc) gnome_canvas_waveview_class_init,
|
||||
(GtkObjectInitFunc) gnome_canvas_waveview_init,
|
||||
NULL, /* reserved_1 */
|
||||
NULL, /* reserved_2 */
|
||||
(GtkClassInitFunc) NULL
|
||||
};
|
||||
|
||||
waveview_type = gtk_type_unique (gtk_canvas_item_get_type (), &waveview_info);
|
||||
waveview_type = gtk_type_unique (gnome_canvas_item_get_type (), &waveview_info);
|
||||
}
|
||||
|
||||
return waveview_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_class_init (GtkCanvasWaveViewClass *class)
|
||||
gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
||||
{
|
||||
GtkObjectClass *object_class;
|
||||
GtkCanvasItemClass *item_class;
|
||||
GnomeCanvasItemClass *item_class;
|
||||
|
||||
object_class = (GtkObjectClass *) class;
|
||||
item_class = (GtkCanvasItemClass *) class;
|
||||
item_class = (GnomeCanvasItemClass *) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_canvas_item_get_type ());
|
||||
parent_class = gtk_type_class (gnome_canvas_item_get_type ());
|
||||
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::data_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_DATA_SRC);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::channel", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CHANNEL);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LENGTH_FUNCTION);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::sourcefile_length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_SOURCEFILE_LENGTH_FUNCTION);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::peak_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PEAK_FUNCTION);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::gain_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_FUNCTION);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::gain_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_SRC);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::cache", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::cache_updater", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE_UPDATER);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::samples_per_unit", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_SAMPLES_PER_PIXEL);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::amplitude_above_axis", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_AMPLITUDE_ABOVE_AXIS);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::wave_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_WAVE_COLOR);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::rectified", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_RECTIFIED);
|
||||
gtk_object_add_arg_type ("GtkCanvasWaveView::region_start", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_REGION_START);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::data_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_DATA_SRC);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::channel", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CHANNEL);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LENGTH_FUNCTION);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::sourcefile_length_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_SOURCEFILE_LENGTH_FUNCTION);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::peak_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_PEAK_FUNCTION);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::gain_function", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_FUNCTION);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::gain_src", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_GAIN_SRC);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::cache", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::cache_updater", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_CACHE_UPDATER);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::samples_per_unit", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_SAMPLES_PER_PIXEL);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::amplitude_above_axis", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_AMPLITUDE_ABOVE_AXIS);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::x", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_X);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::y", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_Y);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::height", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_HEIGHT);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::wave_color", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_WAVE_COLOR);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::rectified", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_RECTIFIED);
|
||||
gtk_object_add_arg_type ("GnomeCanvasWaveView::region_start", GTK_TYPE_UINT, GTK_ARG_READWRITE, ARG_REGION_START);
|
||||
|
||||
object_class->set_arg = gtk_canvas_waveview_set_arg;
|
||||
object_class->get_arg = gtk_canvas_waveview_get_arg;
|
||||
object_class->set_arg = gnome_canvas_waveview_set_arg;
|
||||
object_class->get_arg = gnome_canvas_waveview_get_arg;
|
||||
|
||||
item_class->update = gtk_canvas_waveview_update;
|
||||
item_class->bounds = gtk_canvas_waveview_bounds;
|
||||
item_class->point = gtk_canvas_waveview_point;
|
||||
item_class->render = gtk_canvas_waveview_render;
|
||||
item_class->draw = gtk_canvas_waveview_draw;
|
||||
item_class->update = gnome_canvas_waveview_update;
|
||||
item_class->bounds = gnome_canvas_waveview_bounds;
|
||||
item_class->point = gnome_canvas_waveview_point;
|
||||
item_class->render = gnome_canvas_waveview_render;
|
||||
item_class->draw = gnome_canvas_waveview_draw;
|
||||
}
|
||||
|
||||
GtkCanvasWaveViewCache*
|
||||
gtk_canvas_waveview_cache_new ()
|
||||
GnomeCanvasWaveViewCache*
|
||||
gnome_canvas_waveview_cache_new ()
|
||||
{
|
||||
GtkCanvasWaveViewCache *c;
|
||||
GnomeCanvasWaveViewCache *c;
|
||||
|
||||
c = g_malloc (sizeof (GtkCanvasWaveViewCache));
|
||||
c = g_malloc (sizeof (GnomeCanvasWaveViewCache));
|
||||
|
||||
c->allocated = 2048;
|
||||
c->data = g_malloc (sizeof (GtkCanvasWaveViewCacheEntry) * c->allocated);
|
||||
c->data = g_malloc (sizeof (GnomeCanvasWaveViewCacheEntry) * c->allocated);
|
||||
c->data_size = 0;
|
||||
c->start = 0;
|
||||
c->end = 0;
|
||||
@@ -152,14 +152,14 @@ gtk_canvas_waveview_cache_new ()
|
||||
}
|
||||
|
||||
void
|
||||
gtk_canvas_waveview_cache_destroy (GtkCanvasWaveViewCache* cache)
|
||||
gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache* cache)
|
||||
{
|
||||
g_free (cache->data);
|
||||
g_free (cache);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_init (GtkCanvasWaveView *waveview)
|
||||
gnome_canvas_waveview_init (GnomeCanvasWaveView *waveview)
|
||||
{
|
||||
waveview->x = 0.0;
|
||||
waveview->y = 0.0;
|
||||
@@ -182,13 +182,13 @@ gtk_canvas_waveview_init (GtkCanvasWaveView *waveview)
|
||||
|
||||
waveview->wave_color = RGBA_TO_UINT(44,35,126,255);
|
||||
|
||||
GTK_CANVAS_ITEM(waveview)->object.flags |= GTK_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
GNOME_CANVAS_ITEM(waveview)->object.flags |= GNOME_CANVAS_ITEM_NO_AUTO_REDRAW;
|
||||
}
|
||||
|
||||
#define DEBUG_CACHE 0
|
||||
|
||||
static gint32
|
||||
gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
|
||||
gnome_canvas_waveview_ensure_cache (GnomeCanvasWaveView *waveview, gulong start_sample, gulong end_sample)
|
||||
{
|
||||
gulong required_cache_entries;
|
||||
gulong rf1, rf2,rf3, required_frames;
|
||||
@@ -200,7 +200,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
gulong present_frames;
|
||||
gulong present_entries;
|
||||
gulong copied;
|
||||
GtkCanvasWaveViewCache *cache;
|
||||
GnomeCanvasWaveViewCache *cache;
|
||||
float* gain;
|
||||
|
||||
cache = waveview->cache;
|
||||
@@ -267,7 +267,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
#endif
|
||||
|
||||
if (required_cache_entries > cache->allocated) {
|
||||
cache->data = g_realloc (cache->data, sizeof (GtkCanvasWaveViewCacheEntry) * required_cache_entries);
|
||||
cache->data = g_realloc (cache->data, sizeof (GnomeCanvasWaveViewCacheEntry) * required_cache_entries);
|
||||
cache->allocated = required_cache_entries;
|
||||
// cache->start = 0;
|
||||
// cache->end = 0;
|
||||
@@ -309,7 +309,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
|
||||
memmove (&cache->data[0],
|
||||
&cache->data[cache->data_size - present_entries],
|
||||
present_entries * sizeof (GtkCanvasWaveViewCacheEntry));
|
||||
present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
|
||||
|
||||
#if DEBUG_CACHE
|
||||
fprintf (stderr, "satisfied %lu of %lu frames, offset = %lu, will start at %lu (ptr = 0x%x)\n",
|
||||
@@ -340,7 +340,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
|
||||
memmove (&cache->data[cache->data_size - present_entries],
|
||||
&cache->data[0],
|
||||
present_entries * sizeof (GtkCanvasWaveViewCacheEntry));
|
||||
present_entries * sizeof (GnomeCanvasWaveViewCacheEntry));
|
||||
|
||||
#if DEBUG_CACHE
|
||||
fprintf (stderr, "existing material at start of current cache, move to start of end cache\n");
|
||||
@@ -399,7 +399,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
#if DEBUG_CACHE
|
||||
fprintf (stderr, "zero fill cache for %lu at %lu\n", cache->allocated - npeaks, npeaks);
|
||||
#endif
|
||||
memset (&cache->data[npeaks], 0, sizeof (GtkCanvasWaveViewCacheEntry) * (cache->allocated - npeaks));
|
||||
memset (&cache->data[npeaks], 0, sizeof (GnomeCanvasWaveViewCacheEntry) * (cache->allocated - npeaks));
|
||||
cache->data_size = npeaks;
|
||||
} else {
|
||||
cache->data_size = cache->allocated;
|
||||
@@ -434,7 +434,7 @@ gtk_canvas_waveview_ensure_cache (GtkCanvasWaveView *waveview, gulong start_samp
|
||||
}
|
||||
|
||||
void
|
||||
gtk_canvas_waveview_set_data_src (GtkCanvasWaveView *waveview, void *data_src)
|
||||
gnome_canvas_waveview_set_data_src (GnomeCanvasWaveView *waveview, void *data_src)
|
||||
{
|
||||
|
||||
if (waveview->cache_updater) {
|
||||
@@ -451,7 +451,7 @@ gtk_canvas_waveview_set_data_src (GtkCanvasWaveView *waveview, void *data_src)
|
||||
}
|
||||
|
||||
void
|
||||
gtk_canvas_waveview_set_channel (GtkCanvasWaveView *waveview, guint32 chan)
|
||||
gnome_canvas_waveview_set_channel (GnomeCanvasWaveView *waveview, guint32 chan)
|
||||
{
|
||||
if (waveview->channel == chan) {
|
||||
return;
|
||||
@@ -461,7 +461,7 @@ gtk_canvas_waveview_set_channel (GtkCanvasWaveView *waveview, guint32 chan)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
|
||||
gnome_canvas_waveview_reset_bounds (GnomeCanvasItem *item)
|
||||
|
||||
{
|
||||
double x1, x2, y1, y2;
|
||||
@@ -470,14 +470,14 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
|
||||
int Ix1, Ix2, Iy1, Iy2;
|
||||
double i2w[6];
|
||||
|
||||
gtk_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
i1.x = x1;
|
||||
i1.y = y1;
|
||||
i2.x = x2;
|
||||
i2.y = y2;
|
||||
|
||||
gtk_canvas_item_i2w_affine (item, i2w);
|
||||
gnome_canvas_item_i2w_affine (item, i2w);
|
||||
art_affine_point (&w1, &i1, i2w);
|
||||
art_affine_point (&w2, &i2, i2w);
|
||||
|
||||
@@ -486,7 +486,7 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
|
||||
Iy1 = (int) rint(w1.y);
|
||||
Iy2 = (int) rint(w2.y);
|
||||
|
||||
gtk_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
gnome_canvas_update_bbox (item, Ix1, Iy1, Ix2, Iy2);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -494,27 +494,27 @@ gtk_canvas_waveview_reset_bounds (GtkCanvasItem *item)
|
||||
*/
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasItem *item;
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasItem *item;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
int redraw;
|
||||
int calc_bounds;
|
||||
|
||||
item = GTK_CANVAS_ITEM (object);
|
||||
waveview = GTK_CANVAS_WAVEVIEW (object);
|
||||
item = GNOME_CANVAS_ITEM (object);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (object);
|
||||
|
||||
redraw = FALSE;
|
||||
calc_bounds = FALSE;
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_DATA_SRC:
|
||||
gtk_canvas_waveview_set_data_src (waveview, GTK_VALUE_POINTER(*arg));
|
||||
gnome_canvas_waveview_set_data_src (waveview, GTK_VALUE_POINTER(*arg));
|
||||
redraw = TRUE;
|
||||
break;
|
||||
|
||||
case ARG_CHANNEL:
|
||||
gtk_canvas_waveview_set_channel (waveview, GTK_VALUE_UINT(*arg));
|
||||
gnome_canvas_waveview_set_channel (waveview, GTK_VALUE_UINT(*arg));
|
||||
redraw = TRUE;
|
||||
break;
|
||||
|
||||
@@ -621,21 +621,21 @@ gtk_canvas_waveview_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
if (calc_bounds) {
|
||||
gtk_canvas_waveview_reset_bounds (item);
|
||||
gnome_canvas_waveview_reset_bounds (item);
|
||||
}
|
||||
|
||||
if (redraw) {
|
||||
gtk_canvas_item_request_update (item);
|
||||
gnome_canvas_item_request_update (item);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
gnome_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
{
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
|
||||
waveview = GTK_CANVAS_WAVEVIEW (object);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (object);
|
||||
|
||||
switch (arg_id) {
|
||||
case ARG_DATA_SRC:
|
||||
@@ -710,19 +710,19 @@ gtk_canvas_waveview_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
gnome_canvas_waveview_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
|
||||
{
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
double x, y;
|
||||
|
||||
waveview = GTK_CANVAS_WAVEVIEW (item);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||
|
||||
// check_cache (waveview, "start of update");
|
||||
|
||||
if (parent_class->update)
|
||||
(* parent_class->update) (item, affine, clip_path, flags);
|
||||
|
||||
gtk_canvas_waveview_reset_bounds (item);
|
||||
gnome_canvas_waveview_reset_bounds (item);
|
||||
|
||||
/* get the canvas coordinates of the view. Do NOT use affines
|
||||
for this, because they do not round to the integer units used
|
||||
@@ -732,16 +732,16 @@ gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_pa
|
||||
x = waveview->x;
|
||||
y = waveview->y;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &waveview->bbox_ulx, &waveview->bbox_uly);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &waveview->bbox_ulx, &waveview->bbox_uly);
|
||||
|
||||
waveview->samples = waveview->length_function (waveview->data_src);
|
||||
|
||||
x = waveview->x + (waveview->samples / waveview->samples_per_unit);
|
||||
y = waveview->y + waveview->height;
|
||||
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c (GTK_CANVAS(item->canvas), x, y, &waveview->bbox_lrx, &waveview->bbox_lry);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c (GNOME_CANVAS(item->canvas), x, y, &waveview->bbox_lrx, &waveview->bbox_lry);
|
||||
|
||||
/* cache the half-height and the end point in canvas units */
|
||||
|
||||
@@ -756,10 +756,10 @@ gtk_canvas_waveview_update (GtkCanvasItem *item, double *affine, ArtSVP *clip_pa
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_render (GtkCanvasItem *item,
|
||||
GtkCanvasBuf *buf)
|
||||
gnome_canvas_waveview_render (GnomeCanvasItem *item,
|
||||
GnomeCanvasBuf *buf)
|
||||
{
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
gulong s1, s2;
|
||||
int clip_length = 0;
|
||||
int pymin, pymax;
|
||||
@@ -767,7 +767,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
|
||||
double half_height;
|
||||
int x, end, begin;
|
||||
|
||||
waveview = GTK_CANVAS_WAVEVIEW (item);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||
|
||||
// check_cache (waveview, "start of render");
|
||||
|
||||
@@ -776,7 +776,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
if (buf->is_bg) {
|
||||
gtk_canvas_buf_ensure_buf (buf);
|
||||
gnome_canvas_buf_ensure_buf (buf);
|
||||
buf->is_bg = FALSE;
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
|
||||
waveview->reload_cache_in_render = FALSE;
|
||||
}
|
||||
|
||||
cache_index = gtk_canvas_waveview_ensure_cache (waveview, s1, s2);
|
||||
cache_index = gnome_canvas_waveview_ensure_cache (waveview, s1, s2);
|
||||
|
||||
// check_cache (waveview, "post-ensure");
|
||||
|
||||
@@ -924,14 +924,14 @@ gtk_canvas_waveview_render (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_draw (GtkCanvasItem *item,
|
||||
gnome_canvas_waveview_draw (GnomeCanvasItem *item,
|
||||
GdkDrawable *drawable,
|
||||
int x, int y,
|
||||
int width, int height)
|
||||
{
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
|
||||
waveview = GTK_CANVAS_WAVEVIEW (item);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||
|
||||
if (parent_class->draw) {
|
||||
(* parent_class->draw) (item, drawable, x, y, width, height);
|
||||
@@ -942,9 +942,9 @@ gtk_canvas_waveview_draw (GtkCanvasItem *item,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_canvas_waveview_bounds (GtkCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
gnome_canvas_waveview_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y2)
|
||||
{
|
||||
GtkCanvasWaveView *waveview = GTK_CANVAS_WAVEVIEW (item);
|
||||
GnomeCanvasWaveView *waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||
|
||||
*x1 = waveview->x;
|
||||
*y1 = waveview->y;
|
||||
@@ -954,22 +954,22 @@ gtk_canvas_waveview_bounds (GtkCanvasItem *item, double *x1, double *y1, double
|
||||
|
||||
#if 0
|
||||
x = 0; y = 0;
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(item->canvas), x, y, &a, &b);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x, y, &a, &b);
|
||||
x = *x2;
|
||||
y = *y2;
|
||||
gtk_canvas_item_i2w (item, &x, &y);
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(item->canvas), x, y, &c, &d);
|
||||
gnome_canvas_item_i2w (item, &x, &y);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(item->canvas), x, y, &c, &d);
|
||||
printf ("item bounds now (%g,%g),(%g,%g)\n", a, b, c, d);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int cy, GtkCanvasItem **actual_item)
|
||||
gnome_canvas_waveview_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item)
|
||||
{
|
||||
/* XXX for now, point is never inside the wave
|
||||
GtkCanvasWaveView *waveview;
|
||||
GnomeCanvasWaveView *waveview;
|
||||
double x1, y1, x2, y2;
|
||||
double dx, dy;
|
||||
*/
|
||||
@@ -977,13 +977,13 @@ gtk_canvas_waveview_point (GtkCanvasItem *item, double x, double y, int cx, int
|
||||
return DBL_MAX;
|
||||
|
||||
#if 0
|
||||
waveview = GTK_CANVAS_WAVEVIEW (item);
|
||||
waveview = GNOME_CANVAS_WAVEVIEW (item);
|
||||
|
||||
*actual_item = item;
|
||||
|
||||
/* Find the bounds for the rectangle plus its outline width */
|
||||
|
||||
gtk_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
|
||||
gnome_canvas_waveview_bounds (item, &x1, &y1, &x2, &y2);
|
||||
|
||||
/* Is point inside rectangle */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* gtk-canvas-waveview.h: GtkCanvas item for displaying wave data
|
||||
/* libgnomecanvas/gnome-canvas-waveview.h: GnomeCanvas item for displaying wave data
|
||||
*
|
||||
* Copyright (C) 2001 Paul Davis <pbd@op.net>
|
||||
*
|
||||
@@ -19,56 +19,55 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CANVAS_WAVEVIEW_H__
|
||||
#define __GTK_CANVAS_WAVEVIEW_H__
|
||||
#ifndef __GNOME_CANVAS_WAVEVIEW_H__
|
||||
#define __GNOME_CANVAS_WAVEVIEW_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <gtk-canvas/gtk-canvas-defs.h>
|
||||
#include "gtk-canvas/gtk-canvas.h"
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
BEGIN_GTK_CANVAS_DECLS
|
||||
BEGIN_GNOME_CANVAS_DECLS
|
||||
|
||||
/* Wave viewer item for canvas.
|
||||
*/
|
||||
|
||||
#define GTK_CANVAS_TYPE_CANVAS_WAVEVIEW (gtk_canvas_waveview_get_type ())
|
||||
#define GTK_CANVAS_WAVEVIEW(obj) (GTK_CHECK_CAST ((obj), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW, GtkCanvasWaveView))
|
||||
#define GTK_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW, GtkCanvasWaveViewClass))
|
||||
#define GTK_CANVAS_IS_CANVAS_WAVEVIEW(obj) (GTK_CHECK_TYPE ((obj), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW))
|
||||
#define GTK_CANVAS_IS_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_CANVAS_TYPE_CANVAS_WAVEVIEW))
|
||||
#define GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW (gnome_canvas_waveview_get_type ())
|
||||
#define GNOME_CANVAS_WAVEVIEW(obj) (GTK_CHECK_CAST ((obj), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveView))
|
||||
#define GNOME_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW, GnomeCanvasWaveViewClass))
|
||||
#define GNOME_CANVAS_IS_CANVAS_WAVEVIEW(obj) (GTK_CHECK_TYPE ((obj), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW))
|
||||
#define GNOME_CANVAS_IS_CANVAS_WAVEVIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_CANVAS_TYPE_CANVAS_WAVEVIEW))
|
||||
|
||||
typedef struct _GtkCanvasWaveView GtkCanvasWaveView;
|
||||
typedef struct _GtkCanvasWaveViewClass GtkCanvasWaveViewClass;
|
||||
typedef struct _GtkCanvasWaveViewChannelInfo GtkCanvasWaveViewChannelInfo;
|
||||
typedef struct _GtkCanvasWaveViewCacheEntry GtkCanvasWaveViewCacheEntry;
|
||||
typedef struct _GtkCanvasWaveViewCache GtkCanvasWaveViewCache;
|
||||
typedef struct _GnomeCanvasWaveView GnomeCanvasWaveView;
|
||||
typedef struct _GnomeCanvasWaveViewClass GnomeCanvasWaveViewClass;
|
||||
typedef struct _GnomeCanvasWaveViewChannelInfo GnomeCanvasWaveViewChannelInfo;
|
||||
typedef struct _GnomeCanvasWaveViewCacheEntry GnomeCanvasWaveViewCacheEntry;
|
||||
typedef struct _GnomeCanvasWaveViewCache GnomeCanvasWaveViewCache;
|
||||
|
||||
/* XXX this needs to be synced with ardour/source.h PeakData */
|
||||
|
||||
struct _GtkCanvasWaveViewCacheEntry
|
||||
struct _GnomeCanvasWaveViewCacheEntry
|
||||
{
|
||||
float min;
|
||||
float max;
|
||||
};
|
||||
|
||||
struct _GtkCanvasWaveViewCache
|
||||
struct _GnomeCanvasWaveViewCache
|
||||
{
|
||||
GtkCanvasWaveViewCacheEntry* data;
|
||||
GnomeCanvasWaveViewCacheEntry* data;
|
||||
gint32 allocated;
|
||||
gint32 data_size;
|
||||
gulong start;
|
||||
gulong end;
|
||||
};
|
||||
|
||||
GtkCanvasWaveViewCache* gtk_canvas_waveview_cache_new ();
|
||||
void gtk_canvas_waveview_cache_destroy (GtkCanvasWaveViewCache*);
|
||||
GnomeCanvasWaveViewCache* gnome_canvas_waveview_cache_new ();
|
||||
void gnome_canvas_waveview_cache_destroy (GnomeCanvasWaveViewCache*);
|
||||
|
||||
struct _GtkCanvasWaveView
|
||||
struct _GnomeCanvasWaveView
|
||||
{
|
||||
GtkCanvasItem item;
|
||||
GnomeCanvasItem item;
|
||||
|
||||
GtkCanvasWaveViewCache *cache;
|
||||
GnomeCanvasWaveViewCache *cache;
|
||||
gboolean cache_updater;
|
||||
gint screen_width;
|
||||
|
||||
@@ -117,12 +116,12 @@ struct _GtkCanvasWaveView
|
||||
int32_t reload_cache_in_render;
|
||||
};
|
||||
|
||||
struct _GtkCanvasWaveViewClass {
|
||||
GtkCanvasItemClass parent_class;
|
||||
struct _GnomeCanvasWaveViewClass {
|
||||
GnomeCanvasItemClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_canvas_waveview_get_type (void);
|
||||
GtkType gnome_canvas_waveview_get_type (void);
|
||||
|
||||
END_GTK_CANVAS_DECLS
|
||||
END_GNOME_CANVAS_DECLS
|
||||
|
||||
#endif /* __GTK_CANVAS_WAVEVIEW_H__ */
|
||||
#endif /* __GNOME_CANVAS_WAVEVIEW_H__ */
|
||||
|
||||
@@ -112,14 +112,14 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
||||
point_grabbed = false;
|
||||
toplevel = 0;
|
||||
|
||||
_canvas = gtk_canvas_new_aa ();
|
||||
_canvas = gnome_canvas_new_aa ();
|
||||
|
||||
canvas = wrap (_canvas);
|
||||
canvas->size_allocate.connect (mem_fun(*this, &CrossfadeEditor::canvas_allocation));
|
||||
canvas->set_size_request (425, 200);
|
||||
|
||||
toplevel = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
toplevel = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 10.0,
|
||||
@@ -134,25 +134,25 @@ CrossfadeEditor::CrossfadeEditor (Session& s, Crossfade& xf, double my, double m
|
||||
(GtkSignalFunc) _canvas_event,
|
||||
this);
|
||||
|
||||
fade[Out].line = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_line_get_type (),
|
||||
fade[Out].line = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_line_get_type (),
|
||||
"width_pixels", (guint) 1,
|
||||
"fill_color_rgba", color_map[cCrossfadeEditorLine],
|
||||
NULL);
|
||||
|
||||
fade[Out].shading = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
fade[Out].shading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"fill_color_rgba", color_map[cCrossfadeEditorLineShading],
|
||||
NULL);
|
||||
|
||||
fade[In].line = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_line_get_type (),
|
||||
fade[In].line = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_line_get_type (),
|
||||
"width_pixels", (guint) 1,
|
||||
"fill_color_rgba", color_map[cCrossfadeEditorLine],
|
||||
NULL);
|
||||
|
||||
fade[In].shading = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
fade[In].shading = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"fill_color_rgba", color_map[cCrossfadeEditorLineShading],
|
||||
NULL);
|
||||
|
||||
@@ -416,14 +416,14 @@ CrossfadeEditor::set (const ARDOUR::Curve& curve, WhichFade which)
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::_canvas_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
CrossfadeEditor::_canvas_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->canvas_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::canvas_event (GtkCanvasItem* item, GdkEvent* event)
|
||||
CrossfadeEditor::canvas_event (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
@@ -447,8 +447,8 @@ CrossfadeEditor::make_point ()
|
||||
{
|
||||
Point* p = new Point;
|
||||
|
||||
p->box = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
p->box = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"fill", (gboolean) TRUE,
|
||||
"fill_color_rgba", color_map[cCrossfadeEditorPointFill],
|
||||
"outline_color_rgba", color_map[cCrossfadeEditorPointOutline],
|
||||
@@ -495,7 +495,7 @@ CrossfadeEditor::Point::move_to (double nx, double ny, double xfract, double yfr
|
||||
double x1 = nx - half_size;
|
||||
double x2 = nx + half_size;
|
||||
|
||||
gtk_canvas_item_set (box,
|
||||
gnome_canvas_item_set (box,
|
||||
"x1", x1,
|
||||
"x2", x2,
|
||||
"y1", ny - half_size,
|
||||
@@ -509,7 +509,7 @@ void
|
||||
CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
{
|
||||
if (toplevel) {
|
||||
gtk_canvas_item_set (toplevel,
|
||||
gnome_canvas_item_set (toplevel,
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", (double) _canvas->allocation.width + canvas_border,
|
||||
@@ -517,7 +517,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
NULL);
|
||||
}
|
||||
|
||||
gtk_canvas_set_scroll_region (GTK_CANVAS(_canvas), 0.0, 0.0,
|
||||
gnome_canvas_set_scroll_region (GNOME_CANVAS(_canvas), 0.0, 0.0,
|
||||
_canvas->allocation.width,
|
||||
_canvas->allocation.height);
|
||||
|
||||
@@ -589,7 +589,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
}
|
||||
|
||||
double ht;
|
||||
vector<GtkCanvasItem*>::iterator i;
|
||||
vector<GnomeCanvasItem*>::iterator i;
|
||||
uint32_t n;
|
||||
|
||||
ht = _canvas->allocation.height / xfade.in().n_channels();
|
||||
@@ -599,7 +599,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
|
||||
yoff = n * ht;
|
||||
|
||||
gtk_canvas_item_set ((*i),
|
||||
gnome_canvas_item_set ((*i),
|
||||
"y", yoff,
|
||||
"height", ht,
|
||||
"samples_per_unit", spu,
|
||||
@@ -613,7 +613,7 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
|
||||
yoff = n * ht;
|
||||
|
||||
gtk_canvas_item_set ((*i),
|
||||
gnome_canvas_item_set ((*i),
|
||||
"y", yoff,
|
||||
"height", ht,
|
||||
"samples_per_unit", spu,
|
||||
@@ -623,14 +623,14 @@ CrossfadeEditor::canvas_allocation (GtkAllocation *alloc)
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
CrossfadeEditor::_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->point_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::point_event (GtkCanvasItem* item, GdkEvent* event)
|
||||
CrossfadeEditor::point_event (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Point* point = static_cast<Point*> (gtk_object_get_data (GTK_OBJECT (item), "point"));
|
||||
|
||||
@@ -678,14 +678,14 @@ CrossfadeEditor::point_event (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::_curve_event (GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
CrossfadeEditor::_curve_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
{
|
||||
CrossfadeEditor* ed = static_cast<CrossfadeEditor*> (data);
|
||||
return ed->curve_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
CrossfadeEditor::curve_event (GtkCanvasItem* item, GdkEvent* event)
|
||||
CrossfadeEditor::curve_event (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
/* treat it like a toplevel event */
|
||||
|
||||
@@ -721,8 +721,8 @@ CrossfadeEditor::redraw ()
|
||||
|
||||
fade[current].normative_curve.get_vector (0, 1.0, vec, npoints);
|
||||
|
||||
GtkCanvasPoints* pts = get_canvas_points ("xfade edit1", npoints);
|
||||
GtkCanvasPoints* spts = get_canvas_points ("xfade edit2", npoints + 3);
|
||||
GnomeCanvasPoints* pts = get_canvas_points ("xfade edit1", npoints);
|
||||
GnomeCanvasPoints* spts = get_canvas_points ("xfade edit2", npoints + 3);
|
||||
|
||||
/* the shade coordinates *MUST* be in anti-clockwise order.
|
||||
*/
|
||||
@@ -777,14 +777,14 @@ CrossfadeEditor::redraw ()
|
||||
spts->coords[last_spt - (i*2) + 1] = pts->coords[(i*2)+1];
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (fade[current].line, "points", pts, NULL);
|
||||
gtk_canvas_item_set (fade[current].shading, "points", spts, NULL);
|
||||
gnome_canvas_item_set (fade[current].line, "points", pts, NULL);
|
||||
gnome_canvas_item_set (fade[current].shading, "points", spts, NULL);
|
||||
|
||||
gtk_canvas_points_unref (pts);
|
||||
gtk_canvas_points_unref (spts);
|
||||
gnome_canvas_points_unref (pts);
|
||||
gnome_canvas_points_unref (spts);
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "gain_src", &fade[current].gain_curve, NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "gain_src", &fade[current].gain_curve, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1002,25 +1002,25 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
||||
|
||||
if (wf == In) {
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
|
||||
}
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
|
||||
gtk_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
|
||||
gtk_canvas_item_hide (fade[Out].shading);
|
||||
gtk_canvas_item_show (fade[In].shading);
|
||||
gnome_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
|
||||
gnome_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
|
||||
gnome_canvas_item_hide (fade[Out].shading);
|
||||
gnome_canvas_item_show (fade[In].shading);
|
||||
|
||||
for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
|
||||
gtk_canvas_item_hide ((*i)->box);
|
||||
gnome_canvas_item_hide ((*i)->box);
|
||||
}
|
||||
|
||||
for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
|
||||
gtk_canvas_item_show ((*i)->box);
|
||||
gnome_canvas_item_show ((*i)->box);
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
|
||||
@@ -1033,25 +1033,25 @@ CrossfadeEditor::curve_select_clicked (WhichFade wf)
|
||||
|
||||
} else {
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = fade[In].waves.begin(); i != fade[In].waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "wave_color", color_map[cCrossfadeEditorWave], NULL);
|
||||
}
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = fade[Out].waves.begin(); i != fade[Out].waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "wave_color", color_map[cSelectedCrossfadeEditorWave], NULL);
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
|
||||
gtk_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
|
||||
gtk_canvas_item_hide (fade[In].shading);
|
||||
gtk_canvas_item_show (fade[Out].shading);
|
||||
gnome_canvas_item_set (fade[Out].line, "fill_color_rgba", color_map[cSelectedCrossfadeEditorLine], NULL);
|
||||
gnome_canvas_item_set (fade[In].line, "fill_color_rgba", color_map[cCrossfadeEditorLine], NULL);
|
||||
gnome_canvas_item_hide (fade[In].shading);
|
||||
gnome_canvas_item_show (fade[Out].shading);
|
||||
|
||||
for (list<Point*>::iterator i = fade[In].points.begin(); i != fade[In].points.end(); ++i) {
|
||||
gtk_canvas_item_hide ((*i)->box);
|
||||
gnome_canvas_item_hide ((*i)->box);
|
||||
}
|
||||
|
||||
for (list<Point*>::iterator i = fade[Out].points.begin(); i != fade[Out].points.end(); ++i) {
|
||||
gtk_canvas_item_show ((*i)->box);
|
||||
gnome_canvas_item_show ((*i)->box);
|
||||
}
|
||||
|
||||
for (vector<Button*>::iterator i = fade_out_buttons.begin(); i != fade_out_buttons.end(); ++i) {
|
||||
@@ -1106,11 +1106,11 @@ CrossfadeEditor::make_waves (AudioRegion& region, WhichFade which)
|
||||
|
||||
if (region.source(n).peaks_ready (bind (mem_fun(*this, &CrossfadeEditor::peaks_ready), ®ion, which))) {
|
||||
|
||||
GtkCanvasItem *wave = gtk_canvas_item_new (gtk_canvas_root (GTK_CANVAS(_canvas)),
|
||||
gtk_canvas_waveview_get_type (),
|
||||
GnomeCanvasItem *wave = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS(_canvas)),
|
||||
gnome_canvas_waveview_get_type (),
|
||||
"data_src", (gpointer) ®ion,
|
||||
"cache_updater", (gboolean) TRUE,
|
||||
"cache", gtk_canvas_waveview_cache_new (),
|
||||
"cache", gnome_canvas_waveview_cache_new (),
|
||||
"channel", (guint32) n,
|
||||
"length_function", (gpointer) region_length_from_c,
|
||||
"sourcefile_length_function", (gpointer) sourcefile_length_from_c,
|
||||
@@ -1125,12 +1125,12 @@ CrossfadeEditor::make_waves (AudioRegion& region, WhichFade which)
|
||||
"wave_color", color,
|
||||
NULL);
|
||||
|
||||
gtk_canvas_item_lower_to_bottom (wave);
|
||||
gnome_canvas_item_lower_to_bottom (wave);
|
||||
fade[which].waves.push_back (wave);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_canvas_item_lower_to_bottom (toplevel);
|
||||
gnome_canvas_item_lower_to_bottom (toplevel);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <gtkmm/box.h>
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/radiobutton.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include <ardour/curve.h>
|
||||
#include "ardour_dialog.h"
|
||||
@@ -63,8 +63,8 @@ class CrossfadeEditor : public ArdourDialog
|
||||
struct Point {
|
||||
~Point();
|
||||
|
||||
GtkCanvasItem* box;
|
||||
GtkCanvasItem* curve;
|
||||
GnomeCanvasItem* box;
|
||||
GnomeCanvasItem* curve;
|
||||
double x;
|
||||
double y;
|
||||
|
||||
@@ -81,16 +81,16 @@ class CrossfadeEditor : public ArdourDialog
|
||||
};
|
||||
|
||||
GtkWidget* _canvas;
|
||||
GtkCanvasItem* toplevel;
|
||||
GnomeCanvasItem* toplevel;
|
||||
Gtk::Widget* canvas;
|
||||
|
||||
struct Half {
|
||||
GtkCanvasItem* line;
|
||||
GtkCanvasItem* shading;
|
||||
GnomeCanvasItem* line;
|
||||
GnomeCanvasItem* shading;
|
||||
list<Point*> points;
|
||||
ARDOUR::Curve normative_curve; /* 0 - 1.0, linear */
|
||||
ARDOUR::Curve gain_curve; /* 0 - 2.0, gain mapping */
|
||||
vector<GtkCanvasItem*> waves;
|
||||
vector<GnomeCanvasItem*> waves;
|
||||
|
||||
Half();
|
||||
};
|
||||
@@ -127,13 +127,13 @@ class CrossfadeEditor : public ArdourDialog
|
||||
|
||||
gint event_handler (GdkEvent*);
|
||||
|
||||
static gint _canvas_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
|
||||
static gint _point_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
|
||||
static gint _curve_event (GtkCanvasItem*, GdkEvent* event, gpointer data);
|
||||
static gint _canvas_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
|
||||
static gint _point_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
|
||||
static gint _curve_event (GnomeCanvasItem*, GdkEvent* event, gpointer data);
|
||||
|
||||
gint canvas_event (GtkCanvasItem*, GdkEvent* event);
|
||||
gint point_event (GtkCanvasItem*, GdkEvent* event);
|
||||
gint curve_event (GtkCanvasItem*, GdkEvent* event);
|
||||
gint canvas_event (GnomeCanvasItem*, GdkEvent* event);
|
||||
gint point_event (GnomeCanvasItem*, GdkEvent* event);
|
||||
gint curve_event (GnomeCanvasItem*, GdkEvent* event);
|
||||
|
||||
void canvas_allocation (GtkAllocation*);
|
||||
void add_control_point (double x, double y);
|
||||
|
||||
@@ -38,7 +38,7 @@ using namespace Editing;
|
||||
|
||||
sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
|
||||
|
||||
CrossfadeView::CrossfadeView (GtkCanvasGroup *parent,
|
||||
CrossfadeView::CrossfadeView (GnomeCanvasGroup *parent,
|
||||
AudioTimeAxisView &tv,
|
||||
Crossfade& xf,
|
||||
double spu,
|
||||
@@ -57,14 +57,14 @@ CrossfadeView::CrossfadeView (GtkCanvasGroup *parent,
|
||||
_valid = true;
|
||||
_visible = true;
|
||||
|
||||
fade_in = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_line_get_type(),
|
||||
fade_in = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"fill_color_rgba", color_map[cCrossfadeLine],
|
||||
"width_pixels", (guint) 1,
|
||||
NULL);
|
||||
|
||||
fade_out = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_line_get_type(),
|
||||
fade_out = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"fill_color_rgba", color_map[cCrossfadeLine],
|
||||
"width_pixels", (guint) 1,
|
||||
NULL);
|
||||
@@ -73,11 +73,11 @@ CrossfadeView::CrossfadeView (GtkCanvasGroup *parent,
|
||||
|
||||
/* no frame around the xfade or overlap rects */
|
||||
|
||||
gtk_canvas_item_set (frame, "outline_what", 0, NULL);
|
||||
gnome_canvas_item_set (frame, "outline_what", 0, NULL);
|
||||
|
||||
/* never show the vestigial frame */
|
||||
|
||||
gtk_canvas_item_hide (vestigial_frame);
|
||||
gnome_canvas_item_hide (vestigial_frame);
|
||||
show_vestigial = false;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(group), "crossfadeview", this);
|
||||
@@ -110,8 +110,8 @@ CrossfadeView::reset_width_dependent_items (double pixel_width)
|
||||
active_changed ();
|
||||
|
||||
if (pixel_width < 5) {
|
||||
gtk_canvas_item_hide (fade_in);
|
||||
gtk_canvas_item_hide (fade_out);
|
||||
gnome_canvas_item_hide (fade_in);
|
||||
gnome_canvas_item_hide (fade_out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ CrossfadeView::crossfade_changed (Change what_changed)
|
||||
void
|
||||
CrossfadeView::redraw_curves ()
|
||||
{
|
||||
GtkCanvasPoints* points;
|
||||
GnomeCanvasPoints* points;
|
||||
int32_t npoints;
|
||||
float* vec;
|
||||
|
||||
@@ -178,12 +178,12 @@ CrossfadeView::redraw_curves ()
|
||||
npoints = std::min (gdk_screen_width(), npoints);
|
||||
|
||||
if (!_visible || !crossfade.active() || npoints < 3) {
|
||||
gtk_canvas_item_hide (fade_in);
|
||||
gtk_canvas_item_hide (fade_out);
|
||||
gnome_canvas_item_hide (fade_in);
|
||||
gnome_canvas_item_hide (fade_out);
|
||||
return;
|
||||
} else {
|
||||
gtk_canvas_item_show (fade_in);
|
||||
gtk_canvas_item_show (fade_out);
|
||||
gnome_canvas_item_show (fade_in);
|
||||
gnome_canvas_item_show (fade_out);
|
||||
}
|
||||
|
||||
points = get_canvas_points ("xfade edit redraw", npoints);
|
||||
@@ -194,33 +194,33 @@ CrossfadeView::redraw_curves ()
|
||||
points->coords[pci++] = i;
|
||||
points->coords[pci++] = 2.0 + h - (h * vec[i]);
|
||||
}
|
||||
gtk_canvas_item_set (fade_in, "points", points, NULL);
|
||||
gnome_canvas_item_set (fade_in, "points", points, NULL);
|
||||
|
||||
crossfade.fade_out().get_vector (0, crossfade.length(), vec, npoints);
|
||||
for (int i = 0, pci = 0; i < npoints; ++i) {
|
||||
points->coords[pci++] = i;
|
||||
points->coords[pci++] = 2.0 + h - (h * vec[i]);
|
||||
}
|
||||
gtk_canvas_item_set (fade_out, "points", points, NULL);
|
||||
gnome_canvas_item_set (fade_out, "points", points, NULL);
|
||||
|
||||
delete [] vec;
|
||||
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_points_unref (points);
|
||||
|
||||
/* XXX this is ugly, but it will have to wait till Crossfades are reimplented
|
||||
as regions. This puts crossfade views on top of a track, above all regions.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise_to_top (group);
|
||||
gnome_canvas_item_raise_to_top (group);
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::active_changed ()
|
||||
{
|
||||
if (crossfade.active()) {
|
||||
gtk_canvas_item_set (frame, "fill_color_rgba", color_map[cActiveCrossfade], NULL);
|
||||
gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cActiveCrossfade], NULL);
|
||||
} else {
|
||||
gtk_canvas_item_set (frame, "fill_color_rgba", color_map[cInactiveCrossfade], NULL);
|
||||
gnome_canvas_item_set (frame, "fill_color_rgba", color_map[cInactiveCrossfade], NULL);
|
||||
}
|
||||
|
||||
redraw_curves ();
|
||||
@@ -245,19 +245,19 @@ CrossfadeView::upper_regionview () const
|
||||
void
|
||||
CrossfadeView::show ()
|
||||
{
|
||||
gtk_canvas_item_show (group);
|
||||
gnome_canvas_item_show (group);
|
||||
_visible = true;
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::hide ()
|
||||
{
|
||||
gtk_canvas_item_hide (group);
|
||||
gnome_canvas_item_hide (group);
|
||||
_visible = false;
|
||||
}
|
||||
|
||||
void
|
||||
CrossfadeView::fake_hide ()
|
||||
{
|
||||
gtk_canvas_item_hide (group);
|
||||
gnome_canvas_item_hide (group);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <ardour/crossfade.h>
|
||||
|
||||
@@ -34,7 +34,7 @@ class AudioRegionView;
|
||||
|
||||
struct CrossfadeView : public TimeAxisViewItem
|
||||
{
|
||||
CrossfadeView (GtkCanvasGroup*,
|
||||
CrossfadeView (GnomeCanvasGroup*,
|
||||
AudioTimeAxisView&,
|
||||
ARDOUR::Crossfade&,
|
||||
double initial_samples_per_unit,
|
||||
@@ -71,10 +71,10 @@ struct CrossfadeView : public TimeAxisViewItem
|
||||
|
||||
double spu;
|
||||
|
||||
GtkCanvasItem *overlap_rect;
|
||||
GtkCanvasItem *fade_in;
|
||||
GtkCanvasItem *fade_out;
|
||||
GtkCanvasItem *active_button;
|
||||
GnomeCanvasItem *overlap_rect;
|
||||
GnomeCanvasItem *fade_in;
|
||||
GnomeCanvasItem *fade_out;
|
||||
GnomeCanvasItem *active_button;
|
||||
|
||||
void crossfade_changed (ARDOUR::Change);
|
||||
void active_changed ();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <pbd/error.h>
|
||||
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
@@ -817,17 +817,17 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
|
||||
void
|
||||
Editor::initialize_canvas ()
|
||||
{
|
||||
gtk_canvas_init ();
|
||||
gnome_canvas_init ();
|
||||
|
||||
track_gtk_canvas = gtk_canvas_new_aa ();
|
||||
track_gnome_canvas = gnome_canvas_new_aa ();
|
||||
|
||||
/* adjust sensitivity for "picking" items */
|
||||
|
||||
// GTK_CANVAS(track_gtk_canvas)->close_enough = 2;
|
||||
// GNOME_CANVAS(track_gnome_canvas)->close_enough = 2;
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(gtk_canvas_root (GTK_CANVAS(track_gtk_canvas))), "event",
|
||||
gtk_signal_connect (GTK_OBJECT(gnome_canvas_root (GNOME_CANVAS(track_gnome_canvas))), "event",
|
||||
(GtkSignalFunc) Editor::_track_canvas_event, this);
|
||||
track_canvas = wrap (track_gtk_canvas);
|
||||
track_canvas = wrap (track_gnome_canvas);
|
||||
track_canvas->set_name ("EditorMainCanvas");
|
||||
|
||||
track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
@@ -845,8 +845,8 @@ Editor::initialize_canvas ()
|
||||
|
||||
string fontname = get_font_for_style (N_("VerboseCanvasCursor"));
|
||||
|
||||
verbose_canvas_cursor = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_text_get_type(),
|
||||
verbose_canvas_cursor = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_text_get_type(),
|
||||
"font", fontname.c_str(),
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"fill_color_rgba", color_map[cVerboseCanvasCursor],
|
||||
@@ -855,52 +855,52 @@ Editor::initialize_canvas ()
|
||||
|
||||
/* a group to hold time (measure) lines */
|
||||
|
||||
time_line_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
time_line_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
|
||||
cursor_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
cursor_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
|
||||
time_gtk_canvas = gtk_canvas_new_aa ();
|
||||
time_canvas = wrap (time_gtk_canvas);
|
||||
time_gnome_canvas = gnome_canvas_new_aa ();
|
||||
time_canvas = wrap (time_gnome_canvas);
|
||||
time_canvas->set_name ("EditorTimeCanvas");
|
||||
|
||||
time_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
|
||||
meter_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
meter_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
tempo_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
tempo_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", timebar_height,
|
||||
NULL);
|
||||
marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", timebar_height * 2.0,
|
||||
NULL);
|
||||
range_marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
range_marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", timebar_height * 3.0,
|
||||
NULL);
|
||||
transport_marker_group = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(time_gtk_canvas)),
|
||||
gtk_canvas_group_get_type(),
|
||||
transport_marker_group = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(time_gnome_canvas)),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", 0.0,
|
||||
"y", timebar_height * 4.0,
|
||||
NULL);
|
||||
|
||||
tempo_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(tempo_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
tempo_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(tempo_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", max_canvas_coordinate,
|
||||
@@ -908,8 +908,8 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cTempoBar],
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
meter_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(meter_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
meter_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(meter_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", max_canvas_coordinate,
|
||||
@@ -917,8 +917,8 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cMeterBar],
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(marker_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(marker_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", max_canvas_coordinate,
|
||||
@@ -926,8 +926,8 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cMarkerBar],
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
range_marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
range_marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", max_canvas_coordinate,
|
||||
@@ -935,8 +935,8 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cRangeMarkerBar],
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
transport_marker_bar = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_marker_bar = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", max_canvas_coordinate,
|
||||
@@ -945,8 +945,8 @@ Editor::initialize_canvas ()
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
|
||||
range_bar_drag_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
range_bar_drag_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -954,10 +954,10 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cRangeDragBarRectFill],
|
||||
"outline_color_rgba", color_map[cRangeDragBarRect],
|
||||
NULL);
|
||||
gtk_canvas_item_hide (range_bar_drag_rect);
|
||||
gnome_canvas_item_hide (range_bar_drag_rect);
|
||||
|
||||
transport_bar_drag_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_bar_drag_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -965,10 +965,10 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cTransportDragRectFill],
|
||||
"outline_color_rgba", color_map[cTransportDragRect],
|
||||
NULL);
|
||||
gtk_canvas_item_hide (transport_bar_drag_rect);
|
||||
gnome_canvas_item_hide (transport_bar_drag_rect);
|
||||
|
||||
|
||||
marker_drag_line_points = gtk_canvas_points_new (2);
|
||||
marker_drag_line_points = gnome_canvas_points_new (2);
|
||||
marker_drag_line_points->coords[0] = 0.0;
|
||||
marker_drag_line_points->coords[1] = 0.0;
|
||||
marker_drag_line_points->coords[2] = 0.0;
|
||||
@@ -976,16 +976,16 @@ Editor::initialize_canvas ()
|
||||
|
||||
|
||||
//cerr << "set mdl points, nc = " << marker_drag_line_points->num_points << endl;
|
||||
marker_drag_line = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_line_get_type(),
|
||||
marker_drag_line = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 1,
|
||||
"fill_color_rgba", color_map[cMarkerDragLine],
|
||||
"points", marker_drag_line_points,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (marker_drag_line);
|
||||
gnome_canvas_item_hide (marker_drag_line);
|
||||
|
||||
range_marker_drag_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
range_marker_drag_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -993,11 +993,11 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", color_map[cRangeDragRectFill],
|
||||
"outline_color_rgba", color_map[cRangeDragRect],
|
||||
NULL);
|
||||
gtk_canvas_item_hide (range_marker_drag_rect);
|
||||
gnome_canvas_item_hide (range_marker_drag_rect);
|
||||
|
||||
|
||||
transport_loop_range_rect = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_loop_range_rect = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1006,10 +1006,10 @@ Editor::initialize_canvas ()
|
||||
"outline_color_rgba", color_map[cTransportLoopRect],
|
||||
"outline_pixels", 1,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (transport_loop_range_rect);
|
||||
gnome_canvas_item_hide (transport_loop_range_rect);
|
||||
|
||||
transport_punch_range_rect = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_punch_range_rect = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1018,12 +1018,12 @@ Editor::initialize_canvas ()
|
||||
"outline_color_rgba", color_map[cTransportPunchRect],
|
||||
"outline_pixels", 0,
|
||||
NULL);
|
||||
gtk_canvas_item_lower_to_bottom (transport_punch_range_rect);
|
||||
gtk_canvas_item_lower_to_bottom (transport_loop_range_rect); // loop on the bottom
|
||||
gtk_canvas_item_hide (transport_punch_range_rect);
|
||||
gnome_canvas_item_lower_to_bottom (transport_punch_range_rect);
|
||||
gnome_canvas_item_lower_to_bottom (transport_loop_range_rect); // loop on the bottom
|
||||
gnome_canvas_item_hide (transport_punch_range_rect);
|
||||
|
||||
transport_punchin_line = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_punchin_line = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1031,10 +1031,10 @@ Editor::initialize_canvas ()
|
||||
"outline_color_rgba", color_map[cPunchInLine],
|
||||
"outline_pixels", 1,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (transport_punchin_line);
|
||||
gnome_canvas_item_hide (transport_punchin_line);
|
||||
|
||||
transport_punchout_line = gtk_canvas_item_new ((GTK_CANVAS_GROUP(time_line_group)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
transport_punchout_line = gnome_canvas_item_new ((GNOME_CANVAS_GROUP(time_line_group)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1042,14 +1042,14 @@ Editor::initialize_canvas ()
|
||||
"outline_color_rgba", color_map[cPunchOutLine],
|
||||
"outline_pixels", 1,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (transport_punchout_line);
|
||||
gnome_canvas_item_hide (transport_punchout_line);
|
||||
|
||||
|
||||
|
||||
|
||||
// used to show zoom mode active zooming
|
||||
zoom_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
zoom_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1058,14 +1058,14 @@ Editor::initialize_canvas ()
|
||||
"outline_color_rgba", color_map[cZoomRect],
|
||||
"outline_pixels", 1,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (zoom_rect);
|
||||
gnome_canvas_item_hide (zoom_rect);
|
||||
gtk_signal_connect (GTK_OBJECT(zoom_rect), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_zoom_rect_event,
|
||||
this);
|
||||
|
||||
// used as rubberband rect
|
||||
rubberband_rect = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
rubberband_rect = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -1074,7 +1074,7 @@ Editor::initialize_canvas ()
|
||||
"fill_color_rgba", (guint32) color_map[cRubberBandRectFill],
|
||||
"outline_pixels", 1,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (rubberband_rect);
|
||||
gnome_canvas_item_hide (rubberband_rect);
|
||||
|
||||
|
||||
|
||||
@@ -1100,14 +1100,14 @@ Editor::initialize_canvas ()
|
||||
|
||||
/* separator lines */
|
||||
|
||||
tempo_line_points = gtk_canvas_points_new (2);
|
||||
tempo_line_points = gnome_canvas_points_new (2);
|
||||
tempo_line_points->coords[0] = 0;
|
||||
tempo_line_points->coords[1] = timebar_height;
|
||||
tempo_line_points->coords[2] = max_canvas_coordinate;
|
||||
tempo_line_points->coords[3] = timebar_height;
|
||||
//cerr << "set tl points, nc = " << tempo_line_points->num_points << endl;
|
||||
tempo_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(tempo_group),
|
||||
gtk_canvas_line_get_type(),
|
||||
tempo_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(tempo_group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 0,
|
||||
"fill_color", "black",
|
||||
"points", tempo_line_points,
|
||||
@@ -1115,14 +1115,14 @@ Editor::initialize_canvas ()
|
||||
|
||||
// cerr << "tempo line @ " << tempo_line << endl;
|
||||
|
||||
meter_line_points = gtk_canvas_points_new (2);
|
||||
meter_line_points = gnome_canvas_points_new (2);
|
||||
meter_line_points->coords[0] = 0;
|
||||
meter_line_points->coords[1] = timebar_height;
|
||||
meter_line_points->coords[2] = max_canvas_coordinate;
|
||||
meter_line_points->coords[3] = timebar_height;
|
||||
// cerr << "set ml points, nc = " << tempo_line_points->num_points << endl;
|
||||
meter_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(meter_group),
|
||||
gtk_canvas_line_get_type(),
|
||||
meter_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(meter_group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 0,
|
||||
"fill_color", "black",
|
||||
"points", meter_line_points,
|
||||
@@ -1130,28 +1130,28 @@ Editor::initialize_canvas ()
|
||||
|
||||
// cerr << "meter line @ " << tempo_line << endl;
|
||||
|
||||
marker_line_points = gtk_canvas_points_new (2);
|
||||
marker_line_points = gnome_canvas_points_new (2);
|
||||
marker_line_points->coords[0] = 0;
|
||||
marker_line_points->coords[1] = timebar_height;
|
||||
marker_line_points->coords[2] = max_canvas_coordinate;
|
||||
marker_line_points->coords[3] = timebar_height;
|
||||
// cerr << "set ml2 points, nc = " << marker_line_points->num_points << endl;
|
||||
marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(marker_group),
|
||||
gtk_canvas_line_get_type(),
|
||||
marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(marker_group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 0,
|
||||
"fill_color", "black",
|
||||
"points", marker_line_points,
|
||||
NULL);
|
||||
// cerr << "set rml points, nc = " << marker_line_points->num_points << endl;
|
||||
range_marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(range_marker_group),
|
||||
gtk_canvas_line_get_type(),
|
||||
range_marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(range_marker_group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 0,
|
||||
"fill_color", "black",
|
||||
"points", marker_line_points,
|
||||
NULL);
|
||||
// cerr << "set tml2 points, nc = " << marker_line_points->num_points << endl;
|
||||
transport_marker_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(transport_marker_group),
|
||||
gtk_canvas_line_get_type(),
|
||||
transport_marker_line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(transport_marker_group),
|
||||
gnome_canvas_line_get_type(),
|
||||
"width_pixels", 0,
|
||||
"fill_color", "black",
|
||||
"points", marker_line_points,
|
||||
@@ -1164,7 +1164,7 @@ Editor::initialize_canvas ()
|
||||
|
||||
double time_height = timebar_height * 5;
|
||||
double time_width = FLT_MAX/frames_per_unit;
|
||||
gtk_canvas_set_scroll_region (GTK_CANVAS(time_gtk_canvas), 0.0, 0.0, time_width, time_height);
|
||||
gnome_canvas_set_scroll_region (GNOME_CANVAS(time_gnome_canvas), 0.0, 0.0, time_width, time_height);
|
||||
|
||||
edit_cursor = new Cursor (*this, "blue", (GtkSignalFunc) _canvas_edit_cursor_event);
|
||||
playhead_cursor = new Cursor (*this, "red", (GtkSignalFunc) _canvas_playhead_cursor_event);
|
||||
@@ -1444,8 +1444,8 @@ Editor::track_canvas_allocate (GtkAllocation *alloc)
|
||||
strcpy (txt, _(txt1));
|
||||
strcat (txt, _(txt2));
|
||||
|
||||
first_action_message = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(track_gtk_canvas)),
|
||||
gtk_canvas_text_get_type(),
|
||||
first_action_message = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)),
|
||||
gnome_canvas_text_get_type(),
|
||||
"font", fontname.c_str(),
|
||||
"fill_color_rgba", color_map[cFirstActionMessage],
|
||||
"x", (gdouble) (canvas_width - width) / 2.0,
|
||||
@@ -1458,7 +1458,7 @@ Editor::track_canvas_allocate (GtkAllocation *alloc)
|
||||
|
||||
/* center it */
|
||||
|
||||
gtk_canvas_item_set (first_action_message,
|
||||
gnome_canvas_item_set (first_action_message,
|
||||
"x", (gdouble) (canvas_width - width) / 2.0,
|
||||
"y", (gdouble) (canvas_height/2.0) - (2.0 * (ascent+descent)),
|
||||
NULL);
|
||||
@@ -1520,13 +1520,13 @@ Editor::reset_scrolling_region (GtkAllocation *alloc)
|
||||
canvas_alloc_height = alloc->height;
|
||||
canvas_alloc_width = alloc->width;
|
||||
} else {
|
||||
canvas_alloc_height = track_gtk_canvas->allocation.height;
|
||||
canvas_alloc_width = track_gtk_canvas->allocation.width;
|
||||
canvas_alloc_height = track_gnome_canvas->allocation.height;
|
||||
canvas_alloc_width = track_gnome_canvas->allocation.width;
|
||||
}
|
||||
|
||||
canvas_height = max (canvas_height, canvas_alloc_height);
|
||||
|
||||
gtk_canvas_set_scroll_region (GTK_CANVAS(track_gtk_canvas), 0.0, 0.0,
|
||||
gnome_canvas_set_scroll_region (GNOME_CANVAS(track_gnome_canvas), 0.0, 0.0,
|
||||
max (last_canvas_unit, canvas_alloc_width),
|
||||
canvas_height);
|
||||
|
||||
@@ -1536,22 +1536,22 @@ Editor::reset_scrolling_region (GtkAllocation *alloc)
|
||||
if (marker_drag_line) {
|
||||
marker_drag_line_points->coords[3] = canvas_height;
|
||||
// cerr << "set mlA points, nc = " << marker_drag_line_points->num_points << endl;
|
||||
gtk_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
|
||||
gnome_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
|
||||
}
|
||||
if (range_marker_drag_rect) {
|
||||
gtk_canvas_item_set (range_marker_drag_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
gnome_canvas_item_set (range_marker_drag_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
}
|
||||
if (transport_loop_range_rect) {
|
||||
gtk_canvas_item_set (transport_loop_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
gnome_canvas_item_set (transport_loop_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
}
|
||||
if (transport_punch_range_rect) {
|
||||
gtk_canvas_item_set (transport_punch_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
gnome_canvas_item_set (transport_punch_range_rect, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
}
|
||||
if (transport_punchin_line) {
|
||||
gtk_canvas_item_set (transport_punchin_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
gnome_canvas_item_set (transport_punchin_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
}
|
||||
if (transport_punchout_line) {
|
||||
gtk_canvas_item_set (transport_punchout_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
gnome_canvas_item_set (transport_punchout_line, "y1", 0.0, "y2", (double) canvas_height, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -1727,7 +1727,7 @@ Editor::connect_to_session (Session *t)
|
||||
session = t;
|
||||
|
||||
if (first_action_message) {
|
||||
gtk_canvas_item_hide (first_action_message);
|
||||
gnome_canvas_item_hide (first_action_message);
|
||||
}
|
||||
|
||||
flush_track_canvas();
|
||||
@@ -1948,7 +1948,7 @@ Editor::build_cursors ()
|
||||
}
|
||||
|
||||
void
|
||||
Editor::popup_fade_context_menu (int button, int32_t time, GtkCanvasItem* item, ItemType item_type)
|
||||
Editor::popup_fade_context_menu (int button, int32_t time, GnomeCanvasItem* item, ItemType item_type)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
@@ -3478,7 +3478,7 @@ Editor::track_canvas_drag_data_received (GdkDragContext *context,
|
||||
double wx;
|
||||
double wy;
|
||||
|
||||
gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), (double) x, (double) y, &wx, &wy);
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), (double) x, (double) y, &wx, &wy);
|
||||
|
||||
ev.type = GDK_BUTTON_RELEASE;
|
||||
ev.button.x = wx;
|
||||
@@ -3596,7 +3596,7 @@ Editor::flush_track_canvas ()
|
||||
out this method entirely
|
||||
*/
|
||||
|
||||
//gtk_canvas_update_now (GTK_CANVAS(track_gtk_canvas));
|
||||
//gnome_canvas_update_now (GNOME_CANVAS(track_gnome_canvas));
|
||||
//gtk_main_iteration ();
|
||||
}
|
||||
|
||||
@@ -3740,8 +3740,8 @@ Editor::set_selected_regionview_from_click (bool add, bool no_track_remove)
|
||||
// leads to a mismatch between actual layering
|
||||
// and visual layering. resolution required ....
|
||||
//
|
||||
// gtk_canvas_item_raise_to_top (clicked_regionview->get_canvas_group());
|
||||
// gtk_canvas_item_raise_to_top (clicked_regionview->get_time_axis_view().canvas_display);
|
||||
// gnome_canvas_item_raise_to_top (clicked_regionview->get_canvas_group());
|
||||
// gnome_canvas_item_raise_to_top (clicked_regionview->get_time_axis_view().canvas_display);
|
||||
|
||||
if (clicked_regionview->get_selected()) {
|
||||
/* no commit necessary: we are the one selected. */
|
||||
@@ -4037,15 +4037,15 @@ Editor::duplicate_dialog (bool dup_region)
|
||||
void
|
||||
Editor::show_verbose_canvas_cursor ()
|
||||
{
|
||||
gtk_canvas_item_raise_to_top (verbose_canvas_cursor);
|
||||
gtk_canvas_item_show (verbose_canvas_cursor);
|
||||
gnome_canvas_item_raise_to_top (verbose_canvas_cursor);
|
||||
gnome_canvas_item_show (verbose_canvas_cursor);
|
||||
verbose_cursor_visible = true;
|
||||
}
|
||||
|
||||
void
|
||||
Editor::hide_verbose_canvas_cursor ()
|
||||
{
|
||||
gtk_canvas_item_hide (verbose_canvas_cursor);
|
||||
gnome_canvas_item_hide (verbose_canvas_cursor);
|
||||
verbose_cursor_visible = false;
|
||||
}
|
||||
|
||||
@@ -4055,13 +4055,13 @@ Editor::set_verbose_canvas_cursor (string txt, double x, double y)
|
||||
/* XXX get origin of canvas relative to root window,
|
||||
add x and y and check compared to gdk_screen_{width,height}
|
||||
*/
|
||||
gtk_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), "x", x, "y", y, NULL);
|
||||
gnome_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), "x", x, "y", y, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_verbose_canvas_cursor_text (string txt)
|
||||
{
|
||||
gtk_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), NULL);
|
||||
gnome_canvas_item_set (verbose_canvas_cursor, "text", txt.c_str(), NULL);
|
||||
}
|
||||
|
||||
gint
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtkmm/layout.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <gtk-canvas/gtk-canvas-util.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <libgnomecanvas/gnome-canvas-util.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <gtkmm2ext/click_box.h>
|
||||
|
||||
@@ -196,14 +196,14 @@ class Editor : public PublicEditor
|
||||
*/
|
||||
|
||||
if (pixel >= 0) {
|
||||
return (jack_nframes_t) rint (pixel * frames_per_unit * GTK_CANVAS(track_gtk_canvas)->pixels_per_unit);
|
||||
return (jack_nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_gnome_canvas)->pixels_per_unit);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
gulong frame_to_pixel (jack_nframes_t frame) {
|
||||
return (gulong) rint ((frame / (frames_per_unit * GTK_CANVAS(track_gtk_canvas)->pixels_per_unit)));
|
||||
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_gnome_canvas)->pixels_per_unit)));
|
||||
}
|
||||
|
||||
/* selection */
|
||||
@@ -389,7 +389,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 (GtkCanvasItem*, GdkEvent*);
|
||||
void remove_marker (GnomeCanvasItem*, GdkEvent*);
|
||||
gint really_remove_marker (ARDOUR::Location* loc);
|
||||
|
||||
uint32_t location_marker_color;
|
||||
@@ -417,7 +417,7 @@ class Editor : public PublicEditor
|
||||
typedef map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
|
||||
LocationMarkerMap location_markers;
|
||||
|
||||
void hide_marker (GtkCanvasItem*, GdkEvent*);
|
||||
void hide_marker (GnomeCanvasItem*, GdkEvent*);
|
||||
void clear_marker_display ();
|
||||
void mouse_add_new_marker (jack_nframes_t where);
|
||||
|
||||
@@ -471,20 +471,20 @@ class Editor : public PublicEditor
|
||||
|
||||
GdkCursor *current_canvas_cursor;
|
||||
|
||||
GtkWidget *track_gtk_canvas;
|
||||
GtkWidget *time_gtk_canvas;
|
||||
GtkWidget *track_gnome_canvas;
|
||||
GtkWidget *time_gnome_canvas;
|
||||
Gtk::Widget *track_canvas;
|
||||
Gtk::Widget *time_canvas;
|
||||
|
||||
GtkCanvasItem* first_action_message;
|
||||
GtkCanvasItem *verbose_canvas_cursor;
|
||||
GnomeCanvasItem* first_action_message;
|
||||
GnomeCanvasItem *verbose_canvas_cursor;
|
||||
bool verbose_cursor_visible;
|
||||
|
||||
void session_control_changed (ARDOUR::Session::ControlType);
|
||||
void queue_session_control_changed (ARDOUR::Session::ControlType);
|
||||
|
||||
|
||||
gint track_canvas_motion (GtkCanvasItem*, GdkEvent*);
|
||||
gint track_canvas_motion (GnomeCanvasItem*, GdkEvent*);
|
||||
void set_verbose_canvas_cursor (string, double x, double y);
|
||||
void set_verbose_canvas_cursor_text (string);
|
||||
void show_verbose_canvas_cursor();
|
||||
@@ -499,15 +499,15 @@ class Editor : public PublicEditor
|
||||
Gtk::EventBox track_canvas_event_box;
|
||||
Gtk::EventBox time_button_event_box;
|
||||
|
||||
GtkCanvasItem *minsec_group;
|
||||
GtkCanvasItem *bbt_group;
|
||||
GtkCanvasItem *smpte_group;
|
||||
GtkCanvasItem *frame_group;
|
||||
GtkCanvasItem *tempo_group;
|
||||
GtkCanvasItem *meter_group;
|
||||
GtkCanvasItem *marker_group;
|
||||
GtkCanvasItem *range_marker_group;
|
||||
GtkCanvasItem *transport_marker_group;
|
||||
GnomeCanvasItem *minsec_group;
|
||||
GnomeCanvasItem *bbt_group;
|
||||
GnomeCanvasItem *smpte_group;
|
||||
GnomeCanvasItem *frame_group;
|
||||
GnomeCanvasItem *tempo_group;
|
||||
GnomeCanvasItem *meter_group;
|
||||
GnomeCanvasItem *marker_group;
|
||||
GnomeCanvasItem *range_marker_group;
|
||||
GnomeCanvasItem *transport_marker_group;
|
||||
|
||||
enum {
|
||||
ruler_metric_smpte = 0,
|
||||
@@ -569,25 +569,25 @@ class Editor : public PublicEditor
|
||||
Gtk::Menu *editor_ruler_menu;
|
||||
|
||||
|
||||
GtkCanvasItem *tempo_bar;
|
||||
GtkCanvasItem *meter_bar;
|
||||
GtkCanvasItem *marker_bar;
|
||||
GtkCanvasItem *range_marker_bar;
|
||||
GnomeCanvasItem *tempo_bar;
|
||||
GnomeCanvasItem *meter_bar;
|
||||
GnomeCanvasItem *marker_bar;
|
||||
GnomeCanvasItem *range_marker_bar;
|
||||
|
||||
GtkCanvasItem *transport_marker_bar;
|
||||
GnomeCanvasItem *transport_marker_bar;
|
||||
|
||||
|
||||
GtkCanvasItem *tempo_line;
|
||||
GtkCanvasItem *meter_line;
|
||||
GtkCanvasItem *marker_line;
|
||||
GtkCanvasItem *range_marker_line;
|
||||
GtkCanvasItem *transport_marker_line;
|
||||
GnomeCanvasItem *tempo_line;
|
||||
GnomeCanvasItem *meter_line;
|
||||
GnomeCanvasItem *marker_line;
|
||||
GnomeCanvasItem *range_marker_line;
|
||||
GnomeCanvasItem *transport_marker_line;
|
||||
|
||||
GtkCanvasPoints *tempo_line_points;
|
||||
GtkCanvasPoints *meter_line_points;
|
||||
GtkCanvasPoints *marker_line_points;
|
||||
GtkCanvasPoints *range_marker_line_points;
|
||||
GtkCanvasPoints *transport_marker_line_points;
|
||||
GnomeCanvasPoints *tempo_line_points;
|
||||
GnomeCanvasPoints *meter_line_points;
|
||||
GnomeCanvasPoints *marker_line_points;
|
||||
GnomeCanvasPoints *range_marker_line_points;
|
||||
GnomeCanvasPoints *transport_marker_line_points;
|
||||
|
||||
Gtk::Label minsec_label;
|
||||
Gtk::Label bbt_label;
|
||||
@@ -605,8 +605,8 @@ class Editor : public PublicEditor
|
||||
|
||||
struct Cursor {
|
||||
Editor& editor;
|
||||
GtkCanvasPoints *points;
|
||||
GtkCanvasItem *canvas_item;
|
||||
GnomeCanvasPoints *points;
|
||||
GnomeCanvasItem *canvas_item;
|
||||
jack_nframes_t current_frame;
|
||||
GtkSignalFunc callback;
|
||||
double length;
|
||||
@@ -625,7 +625,7 @@ class Editor : public PublicEditor
|
||||
|
||||
Cursor* playhead_cursor;
|
||||
Cursor* edit_cursor;
|
||||
GtkCanvasItem* cursor_group;
|
||||
GnomeCanvasItem* cursor_group;
|
||||
|
||||
void cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
|
||||
void cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
|
||||
@@ -803,12 +803,12 @@ class Editor : public PublicEditor
|
||||
jack_nframes_t cut_buffer_start;
|
||||
jack_nframes_t cut_buffer_length;
|
||||
|
||||
gint typed_event (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
gint button_press_handler (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
gint button_release_handler (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
gint motion_handler (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
gint enter_handler (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
gint leave_handler (GtkCanvasItem*, GdkEvent*, ItemType);
|
||||
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);
|
||||
|
||||
/* KEYMAP HANDLING */
|
||||
|
||||
@@ -1037,7 +1037,7 @@ class Editor : public PublicEditor
|
||||
void queue_route_list_reordered (gint row, gint col);
|
||||
|
||||
struct DragInfo {
|
||||
GtkCanvasItem* item;
|
||||
GnomeCanvasItem* item;
|
||||
void* data;
|
||||
jack_nframes_t last_frame_position;
|
||||
int32_t pointer_frame_offset;
|
||||
@@ -1049,8 +1049,8 @@ class Editor : public PublicEditor
|
||||
double cumulative_y_drag;
|
||||
double current_pointer_x;
|
||||
double current_pointer_y;
|
||||
void (Editor::*motion_callback)(GtkCanvasItem*, GdkEvent*);
|
||||
void (Editor::*finished_callback)(GtkCanvasItem*, GdkEvent*);
|
||||
void (Editor::*motion_callback)(GnomeCanvasItem*, GdkEvent*);
|
||||
void (Editor::*finished_callback)(GnomeCanvasItem*, GdkEvent*);
|
||||
TimeAxisView* last_trackview;
|
||||
bool x_constrained;
|
||||
bool copy;
|
||||
@@ -1070,56 +1070,56 @@ class Editor : public PublicEditor
|
||||
LineDragInfo current_line_drag_info;
|
||||
|
||||
void start_grab (GdkEvent*, GdkCursor* cursor = 0);
|
||||
bool end_grab (GtkCanvasItem*, GdkEvent*);
|
||||
bool end_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
Gtk::Menu fade_context_menu;
|
||||
void popup_fade_context_menu (int, int, GtkCanvasItem*, ItemType);
|
||||
void popup_fade_context_menu (int, int, GnomeCanvasItem*, ItemType);
|
||||
|
||||
void start_fade_in_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_fade_out_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void fade_in_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void fade_out_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void fade_in_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void fade_out_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
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*);
|
||||
|
||||
std::set<ARDOUR::Playlist*> motion_frozen_playlists;
|
||||
void region_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void region_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void region_copy_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void region_drag_motion_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void region_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void region_copy_drag_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
void cursor_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void cursor_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void marker_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void control_point_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void control_point_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void line_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void line_drag_finished_callback (GtkCanvasItem*, 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 tempo_marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void tempo_marker_drag_finished_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void meter_marker_drag_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void meter_marker_drag_finished_callback (GtkCanvasItem*, 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*);
|
||||
|
||||
gint mouse_rename_region (GtkCanvasItem*, GdkEvent*);
|
||||
gint mouse_rename_region (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
void start_region_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_region_copy_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_region_brush_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_selection_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_cursor_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_marker_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_control_point_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_line_grab_from_regionview (GtkCanvasItem*, GdkEvent*);
|
||||
void start_line_grab_from_line (GtkCanvasItem*, 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_line_grab (AutomationLine *, GdkEvent*);
|
||||
void start_tempo_marker_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_meter_marker_grab (GtkCanvasItem*, GdkEvent*);
|
||||
void start_tempo_marker_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_meter_marker_grab (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
void region_view_item_click (AudioRegionView&, GdkEventButton*);
|
||||
|
||||
void remove_gain_control_point (GtkCanvasItem*, GdkEvent*);
|
||||
void remove_control_point (GtkCanvasItem*, GdkEvent*);
|
||||
void remove_gain_control_point (GnomeCanvasItem*, GdkEvent*);
|
||||
void remove_control_point (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
void mouse_brush_insert_region (AudioRegionView*, jack_nframes_t pos);
|
||||
void brush (jack_nframes_t);
|
||||
@@ -1129,81 +1129,81 @@ class Editor : public PublicEditor
|
||||
|
||||
/* static versions of these are public in PublicEditor */
|
||||
|
||||
gint _canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint _canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
gint _canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
|
||||
/* now the real things */
|
||||
|
||||
gint canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, CrossfadeView*);
|
||||
gint canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, AudioTimeAxisView*);
|
||||
gint canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, AutomationTimeAxisView*);
|
||||
gint canvas_marker_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_line_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, CrossfadeView*);
|
||||
gint canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, AudioRegionView*);
|
||||
gint canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, AudioTimeAxisView*);
|
||||
gint canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, AutomationTimeAxisView*);
|
||||
gint canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_line_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
gint canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
/* these are not publically accessible, but we still need the static versions
|
||||
till we use Gnome::Canvas.
|
||||
*/
|
||||
|
||||
static gint _canvas_copy_region_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_copy_region_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
static gint _canvas_copy_region_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_copy_region_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
static gint _canvas_playhead_cursor_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_playhead_cursor_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
static gint _canvas_playhead_cursor_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_playhead_cursor_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
static gint _canvas_edit_cursor_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_edit_cursor_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
static gint _canvas_edit_cursor_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint canvas_edit_cursor_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
static gint _track_canvas_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint track_canvas_event (GtkCanvasItem* item, GdkEvent* event);
|
||||
static gint _track_canvas_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
gint track_canvas_event (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
gint track_canvas_button_press_event (GdkEventButton *);
|
||||
gint track_canvas_button_release_event (GdkEventButton *);
|
||||
@@ -1253,12 +1253,12 @@ class Editor : public PublicEditor
|
||||
|
||||
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
|
||||
|
||||
typedef vector<GtkCanvasItem*> TimeLineList;
|
||||
typedef vector<GnomeCanvasItem*> TimeLineList;
|
||||
TimeLineList free_measure_lines;
|
||||
TimeLineList used_measure_lines;
|
||||
|
||||
GtkCanvasItem* time_line_group;
|
||||
GtkCanvasItem* get_time_line ();
|
||||
GnomeCanvasItem* time_line_group;
|
||||
GnomeCanvasItem* get_time_line ();
|
||||
void hide_measures ();
|
||||
void draw_measures ();
|
||||
void draw_time_bars ();
|
||||
@@ -1268,15 +1268,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 (GtkCanvasItem*);
|
||||
void remove_meter_marker (GtkCanvasItem*);
|
||||
void remove_tempo_marker (GnomeCanvasItem*);
|
||||
void remove_meter_marker (GnomeCanvasItem*);
|
||||
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 (GtkCanvasItem*);
|
||||
void edit_meter_marker (GtkCanvasItem*);
|
||||
void edit_tempo_marker (GnomeCanvasItem*);
|
||||
void edit_meter_marker (GnomeCanvasItem*);
|
||||
|
||||
void marker_menu_edit ();
|
||||
void marker_menu_remove ();
|
||||
@@ -1292,10 +1292,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*, GtkCanvasItem*);
|
||||
void tm_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
|
||||
void transport_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
|
||||
void new_transport_marker_context_menu (GdkEventButton*, GtkCanvasItem*);
|
||||
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 build_marker_menu ();
|
||||
void build_tm_marker_menu ();
|
||||
void build_transport_marker_menu ();
|
||||
@@ -1305,7 +1305,7 @@ class Editor : public PublicEditor
|
||||
Gtk::Menu* marker_menu;
|
||||
Gtk::Menu* transport_marker_menu;
|
||||
Gtk::Menu* new_transport_marker_menu;
|
||||
GtkCanvasItem* marker_menu_item;
|
||||
GnomeCanvasItem* marker_menu_item;
|
||||
|
||||
typedef list<Marker*> Marks;
|
||||
Marks metric_marks;
|
||||
@@ -1419,9 +1419,9 @@ class Editor : public PublicEditor
|
||||
SelectionMove
|
||||
} selection_op;
|
||||
|
||||
void start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp);
|
||||
void drag_selection (GtkCanvasItem* item, GdkEvent* event);
|
||||
void end_selection_op (GtkCanvasItem* item, GdkEvent* event);
|
||||
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 cancel_selection ();
|
||||
|
||||
void region_selection_op (void (ARDOUR::Region::*pmf)(void));
|
||||
@@ -1440,28 +1440,28 @@ class Editor : public PublicEditor
|
||||
CreateTransportMarker
|
||||
} range_marker_op;
|
||||
|
||||
void start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMarkerOp);
|
||||
void drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event);
|
||||
void end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event);
|
||||
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);
|
||||
|
||||
|
||||
GtkCanvasItem *range_bar_drag_rect;
|
||||
GtkCanvasItem *transport_bar_drag_rect;
|
||||
GtkCanvasItem *marker_drag_line;
|
||||
GtkCanvasPoints *marker_drag_line_points;
|
||||
GtkCanvasItem *range_marker_drag_rect;
|
||||
GnomeCanvasItem *range_bar_drag_rect;
|
||||
GnomeCanvasItem *transport_bar_drag_rect;
|
||||
GnomeCanvasItem *marker_drag_line;
|
||||
GnomeCanvasPoints *marker_drag_line_points;
|
||||
GnomeCanvasItem *range_marker_drag_rect;
|
||||
|
||||
void update_marker_drag_item (ARDOUR::Location *);
|
||||
|
||||
GtkCanvasItem *transport_bar_range_rect;
|
||||
GtkCanvasItem *transport_bar_preroll_rect;
|
||||
GtkCanvasItem *transport_bar_postroll_rect;
|
||||
GtkCanvasItem *transport_loop_range_rect;
|
||||
GtkCanvasItem *transport_punch_range_rect;
|
||||
GtkCanvasItem *transport_punchin_line;
|
||||
GtkCanvasItem *transport_punchout_line;
|
||||
GtkCanvasItem *transport_preroll_rect;
|
||||
GtkCanvasItem *transport_postroll_rect;
|
||||
GnomeCanvasItem *transport_bar_range_rect;
|
||||
GnomeCanvasItem *transport_bar_preroll_rect;
|
||||
GnomeCanvasItem *transport_bar_postroll_rect;
|
||||
GnomeCanvasItem *transport_loop_range_rect;
|
||||
GnomeCanvasItem *transport_punch_range_rect;
|
||||
GnomeCanvasItem *transport_punchin_line;
|
||||
GnomeCanvasItem *transport_punchout_line;
|
||||
GnomeCanvasItem *transport_preroll_rect;
|
||||
GnomeCanvasItem *transport_postroll_rect;
|
||||
|
||||
ARDOUR::Location* transport_loop_location();
|
||||
ARDOUR::Location* transport_punch_location();
|
||||
@@ -1470,21 +1470,21 @@ class Editor : public PublicEditor
|
||||
|
||||
/* object rubberband select process */
|
||||
|
||||
void start_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
|
||||
void drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
|
||||
void end_rubberband_select (GtkCanvasItem* item, GdkEvent* event);
|
||||
void start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
|
||||
|
||||
GtkCanvasItem *rubberband_rect;
|
||||
GnomeCanvasItem *rubberband_rect;
|
||||
|
||||
/* mouse zoom process */
|
||||
|
||||
void start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
|
||||
void drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
|
||||
void end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event);
|
||||
void start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
void end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event);
|
||||
|
||||
GtkCanvasItem *zoom_rect;
|
||||
GnomeCanvasItem *zoom_rect;
|
||||
void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
|
||||
|
||||
/* diskstream/route display management */
|
||||
@@ -1552,14 +1552,14 @@ class Editor : public PublicEditor
|
||||
ContentsTrim,
|
||||
} trim_op;
|
||||
|
||||
void start_trim (GtkCanvasItem*, GdkEvent*);
|
||||
void start_trim (GnomeCanvasItem*, GdkEvent*);
|
||||
void point_trim (GdkEvent*);
|
||||
void trim_motion_callback (GtkCanvasItem*, GdkEvent*);
|
||||
void trim_motion_callback (GnomeCanvasItem*, 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 (GtkCanvasItem*, GdkEvent*);
|
||||
void trim_finished_callback (GnomeCanvasItem*, GdkEvent*);
|
||||
void thaw_region_after_trim (AudioRegionView& rv);
|
||||
|
||||
void trim_region_to_edit_cursor ();
|
||||
@@ -1668,9 +1668,9 @@ class Editor : public PublicEditor
|
||||
|
||||
jack_nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
|
||||
|
||||
void time_fx_motion (GtkCanvasItem*, GdkEvent*);
|
||||
void start_time_fx (GtkCanvasItem*, GdkEvent*);
|
||||
void end_time_fx (GtkCanvasItem*, GdkEvent*);
|
||||
void time_fx_motion (GnomeCanvasItem*, GdkEvent*);
|
||||
void start_time_fx (GnomeCanvasItem*, GdkEvent*);
|
||||
void end_time_fx (GnomeCanvasItem*, GdkEvent*);
|
||||
|
||||
struct TimeStretchDialog : public ArdourDialog {
|
||||
ARDOUR::Session::TimeStretchRequest request;
|
||||
@@ -1728,39 +1728,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(GtkCanvasItem*, GdkEvent*) ;
|
||||
void start_markerview_grab(GtkCanvasItem*, GdkEvent*) ;
|
||||
void start_imageframe_grab(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void start_markerview_grab(GnomeCanvasItem*, GdkEvent*) ;
|
||||
|
||||
void imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent*) ;
|
||||
void markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent*) ;
|
||||
void timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent*) ;
|
||||
void imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
void timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent*) ;
|
||||
|
||||
gint canvas_imageframe_item_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
|
||||
gint canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
gint canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameView* ifv);
|
||||
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_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, MarkerTimeAxis* mta);
|
||||
gint canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
gint canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mv);
|
||||
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);
|
||||
|
||||
void imageframe_start_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void imageframe_end_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
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 markerview_item_start_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_item_end_handle_op(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event) ;
|
||||
void markerview_end_handle_end_trim(GtkCanvasItem* 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 popup_imageframe_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_frame) ;
|
||||
void popup_marker_time_axis_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_frame) ;
|
||||
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) ;
|
||||
|
||||
ImageFrameSocketHandler* image_socket_listener ;
|
||||
/* </CMT Additions> */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include <ardour/diskstream.h>
|
||||
#include <ardour/audioplaylist.h>
|
||||
@@ -45,14 +45,14 @@ using namespace ARDOUR;
|
||||
using namespace Gtk;
|
||||
|
||||
gint
|
||||
Editor::_canvas_copy_region_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_copy_region_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = (Editor*)data;
|
||||
return editor->canvas_copy_region_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_crossfade_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_crossfade_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
CrossfadeView* xfv = static_cast<CrossfadeView*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&xfv->get_time_axis_view().editor);
|
||||
@@ -60,7 +60,7 @@ Editor::_canvas_crossfade_view_event (GtkCanvasItem *item, GdkEvent *event, gpoi
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_fade_in_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView* rv = static_cast<AudioRegionView*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -68,7 +68,7 @@ Editor::_canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, gpointer da
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_fade_in_handle_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView* rv = static_cast<AudioRegionView*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -76,7 +76,7 @@ Editor::_canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, gpoi
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_fade_out_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView* rv = static_cast<AudioRegionView*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -84,7 +84,7 @@ Editor::_canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, gpointer d
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_fade_out_handle_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView* rv = static_cast<AudioRegionView*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -92,7 +92,7 @@ Editor::_canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, gpo
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_region_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView *rv = reinterpret_cast<AudioRegionView *>(data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -101,7 +101,7 @@ Editor::_canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, gpointe
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_region_view_name_highlight_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -110,7 +110,7 @@ Editor::_canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_region_view_name_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AudioRegionView *rv = reinterpret_cast<AudioRegionView *> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&rv->get_time_axis_view().editor);
|
||||
@@ -119,7 +119,7 @@ Editor::_canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event, gp
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_stream_view_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* note that stream views are by definition audio track views */
|
||||
|
||||
@@ -130,7 +130,7 @@ Editor::_canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, gpointe
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_automation_track_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AutomationTimeAxisView* atv = (AutomationTimeAxisView*) data;
|
||||
Editor* editor = dynamic_cast<Editor*>(&atv->editor);
|
||||
@@ -139,7 +139,7 @@ Editor::_canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, gp
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_control_point_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
ControlPoint *cp = reinterpret_cast<ControlPoint *>(data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&cp->line.trackview.editor);
|
||||
@@ -162,7 +162,7 @@ Editor::_canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event, gpoin
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_line_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_line_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
AutomationLine *line = reinterpret_cast<AutomationLine*> (data);
|
||||
Editor* editor = dynamic_cast<Editor*>(&line->trackview.editor);
|
||||
@@ -171,21 +171,21 @@ Editor::_canvas_line_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_tempo_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_tempo_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_tempo_marker_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_meter_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_meter_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor *) data);
|
||||
return editor->canvas_meter_marker_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_tempo_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* XXX NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -193,7 +193,7 @@ Editor::_canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_meter_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* XXX NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -201,14 +201,14 @@ Editor::_canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_marker_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_marker_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_marker_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -216,7 +216,7 @@ Editor::_canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_range_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -224,7 +224,7 @@ Editor::_canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gp
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_transport_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -232,7 +232,7 @@ Editor::_canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_playhead_cursor_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -240,7 +240,7 @@ Editor::_canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpo
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_edit_cursor_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
Editor* editor = (Editor*) data;
|
||||
@@ -248,35 +248,35 @@ Editor::_canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event, gpointe
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_zoom_rect_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_zoom_rect_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_zoom_rect_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_selection_rect_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_selection_rect_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_selection_start_trim_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_selection_start_trim_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_selection_end_trim_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
Editor* editor = dynamic_cast<Editor*>((PublicEditor*) data);
|
||||
return editor->canvas_selection_end_trim_event (item, event);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_track_canvas_event (GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_track_canvas_event (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
{
|
||||
/* NO CAST */
|
||||
|
||||
@@ -287,7 +287,7 @@ Editor::_track_canvas_event (GtkCanvasItem *item, GdkEvent *event, gpointer data
|
||||
/********** END OF.TATIC EVENT HANDLERS */
|
||||
|
||||
gint
|
||||
Editor::track_canvas_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::track_canvas_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
@@ -314,10 +314,10 @@ Editor::track_canvas_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::track_canvas_motion (GtkCanvasItem *item, GdkEvent *ev)
|
||||
Editor::track_canvas_motion (GnomeCanvasItem *item, GdkEvent *ev)
|
||||
{
|
||||
if (verbose_cursor_visible) {
|
||||
gtk_canvas_item_set (verbose_canvas_cursor,
|
||||
gnome_canvas_item_set (verbose_canvas_cursor,
|
||||
"x", ev->motion.x + 20,
|
||||
"y", ev->motion.y + 20,
|
||||
NULL);
|
||||
@@ -326,7 +326,7 @@ Editor::track_canvas_motion (GtkCanvasItem *item, GdkEvent *ev)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::typed_event (GtkCanvasItem *item, GdkEvent *event, ItemType type)
|
||||
Editor::typed_event (GnomeCanvasItem *item, GdkEvent *event, ItemType type)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -359,7 +359,7 @@ Editor::typed_event (GtkCanvasItem *item, GdkEvent *event, ItemType type)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
Editor::canvas_region_view_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -398,7 +398,7 @@ Editor::canvas_region_view_event (GtkCanvasItem *item, GdkEvent *event, AudioReg
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, AudioTimeAxisView *tv)
|
||||
Editor::canvas_stream_view_event (GnomeCanvasItem *item, GdkEvent *event, AudioTimeAxisView *tv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -434,7 +434,7 @@ Editor::canvas_stream_view_event (GtkCanvasItem *item, GdkEvent *event, AudioTim
|
||||
|
||||
|
||||
gint
|
||||
Editor::canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, AutomationTimeAxisView *atv)
|
||||
Editor::canvas_automation_track_event (GnomeCanvasItem *item, GdkEvent *event, AutomationTimeAxisView *atv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -473,7 +473,7 @@ Editor::canvas_automation_track_event (GtkCanvasItem *item, GdkEvent *event, Aut
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
Editor::canvas_fade_in_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
{
|
||||
/* we handle only button 3 press/release events */
|
||||
|
||||
@@ -505,7 +505,7 @@ Editor::canvas_fade_in_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionV
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
Editor::canvas_fade_in_handle_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -544,7 +544,7 @@ Editor::canvas_fade_in_handle_event (GtkCanvasItem *item, GdkEvent *event, Audio
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
Editor::canvas_fade_out_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
{
|
||||
/* we handle only button 3 press/release events */
|
||||
|
||||
@@ -576,7 +576,7 @@ Editor::canvas_fade_out_event (GtkCanvasItem *item, GdkEvent *event, AudioRegion
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_fade_out_handle_event (GtkCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
Editor::canvas_fade_out_handle_event (GnomeCanvasItem *item, GdkEvent *event, AudioRegionView *rv)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -621,7 +621,7 @@ struct DescendingRegionLayerSorter {
|
||||
};
|
||||
|
||||
gint
|
||||
Editor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, CrossfadeView* xfv)
|
||||
Editor::canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, CrossfadeView* xfv)
|
||||
{
|
||||
/* we handle only button 3 press/release events */
|
||||
|
||||
@@ -682,7 +682,7 @@ Editor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, Cross
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_control_point_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
ItemType type;
|
||||
ControlPoint *cp;
|
||||
@@ -708,7 +708,7 @@ Editor::canvas_control_point_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_line_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_line_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
ItemType type;
|
||||
AutomationLine *al;
|
||||
@@ -735,7 +735,7 @@ Editor::canvas_line_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
|
||||
|
||||
gint
|
||||
Editor::canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_selection_rect_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
SelectionRect *rect = 0;
|
||||
@@ -775,7 +775,7 @@ Editor::canvas_selection_rect_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_selection_start_trim_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
SelectionRect *rect = 0;
|
||||
@@ -814,7 +814,7 @@ Editor::canvas_selection_start_trim_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_selection_end_trim_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
SelectionRect *rect = 0;
|
||||
@@ -854,7 +854,7 @@ Editor::canvas_selection_end_trim_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
|
||||
|
||||
gint
|
||||
Editor::canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_region_view_name_highlight_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -890,7 +890,7 @@ Editor::canvas_region_view_name_highlight_event (GtkCanvasItem *item, GdkEvent *
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_region_view_name_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
gint ret = FALSE;
|
||||
|
||||
@@ -926,73 +926,73 @@ Editor::canvas_region_view_name_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_marker_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_marker_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, MarkerItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, MarkerBarItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_range_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_range_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, RangeMarkerBarItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_transport_marker_bar_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_transport_marker_bar_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, TransportMarkerBarItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_tempo_marker_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_tempo_marker_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, TempoMarkerItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_meter_marker_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_meter_marker_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, MeterMarkerItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_tempo_bar_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_tempo_bar_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, TempoBarItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_meter_bar_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_meter_bar_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, MeterBarItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_playhead_cursor_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_playhead_cursor_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, PlayheadCursorItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_edit_cursor_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_edit_cursor_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, EditCursorItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_zoom_rect_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_zoom_rect_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, NoItem);
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_copy_region_event (GtkCanvasItem *item, GdkEvent *event)
|
||||
Editor::canvas_copy_region_event (GnomeCanvasItem *item, GdkEvent *event)
|
||||
{
|
||||
return typed_event (item, event, RegionItem);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "editor.h"
|
||||
@@ -33,8 +33,8 @@ using namespace Gtk;
|
||||
Editor::Cursor::Cursor (Editor& ed, const string& color, GtkSignalFunc callbck)
|
||||
: editor (ed), callback (callbck), length(1.0)
|
||||
{
|
||||
GtkCanvasGroup *group;
|
||||
points = gtk_canvas_points_new (2);
|
||||
GnomeCanvasGroup *group;
|
||||
points = gnome_canvas_points_new (2);
|
||||
|
||||
/* "randomly" initialize coords */
|
||||
|
||||
@@ -43,11 +43,11 @@ Editor::Cursor::Cursor (Editor& ed, const string& color, GtkSignalFunc callbck)
|
||||
points->coords[2] = 1.0;
|
||||
points->coords[3] = 0.0;
|
||||
|
||||
group = GTK_CANVAS_GROUP (editor.cursor_group);
|
||||
group = GNOME_CANVAS_GROUP (editor.cursor_group);
|
||||
|
||||
// cerr << "set cursor points, nc = " << points->num_points << endl;
|
||||
canvas_item = gtk_canvas_item_new (group,
|
||||
gtk_canvas_line_get_type(),
|
||||
canvas_item = gnome_canvas_item_new (group,
|
||||
gnome_canvas_line_get_type(),
|
||||
"points", points,
|
||||
"fill_color", color.c_str(),
|
||||
"width_pixels", 1,
|
||||
@@ -70,7 +70,7 @@ Editor::Cursor::~Cursor ()
|
||||
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT(canvas_item));
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -79,9 +79,9 @@ Editor::Cursor::set_position (jack_nframes_t frame)
|
||||
double new_pos = editor.frame_to_unit (frame);
|
||||
|
||||
if (editor.session == 0) {
|
||||
gtk_canvas_item_hide (canvas_item);
|
||||
gnome_canvas_item_hide (canvas_item);
|
||||
} else {
|
||||
gtk_canvas_item_show (canvas_item);
|
||||
gnome_canvas_item_show (canvas_item);
|
||||
}
|
||||
|
||||
current_frame = frame;
|
||||
@@ -90,7 +90,7 @@ Editor::Cursor::set_position (jack_nframes_t frame)
|
||||
|
||||
/* change in position is not visible, so just raise it */
|
||||
|
||||
gtk_canvas_item_raise_to_top (canvas_item);
|
||||
gnome_canvas_item_raise_to_top (canvas_item);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ Editor::Cursor::set_position (jack_nframes_t frame)
|
||||
points->coords[2] = new_pos;
|
||||
|
||||
// cerr << "set cursor2 al points, nc = " << points->num_points << endl;
|
||||
gtk_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
gtk_canvas_item_raise_to_top (canvas_item);
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
gnome_canvas_item_raise_to_top (canvas_item);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -108,7 +108,7 @@ Editor::Cursor::set_length (double units)
|
||||
length = units;
|
||||
points->coords[3] = points->coords[1] + length;
|
||||
// cerr << "set cursor3 al points, nc = " << points->num_points << endl;
|
||||
gtk_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -117,5 +117,5 @@ Editor::Cursor::set_y_axis (double position)
|
||||
points->coords[1] = position;
|
||||
points->coords[3] = position + length;
|
||||
// cerr << "set cursor4 al points, nc = " << points->num_points << endl;
|
||||
gtk_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
gnome_canvas_item_set (canvas_item, "points", points, NULL);
|
||||
}
|
||||
|
||||
@@ -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, GtkCanvasItem* ifv, bool with_item)
|
||||
Editor::popup_imageframe_edit_menu(int button, int32_t time, GnomeCanvasItem* 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, GtkCanvasItem* ifv,
|
||||
}
|
||||
|
||||
void
|
||||
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, GtkCanvasItem* ifv, bool with_item)
|
||||
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, GnomeCanvasItem* ifv, bool with_item)
|
||||
{
|
||||
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ;
|
||||
|
||||
@@ -153,12 +153,12 @@ Editor::get_named_time_axis(std::string name)
|
||||
/**
|
||||
* ---------------------------------------------------------------------------------------------------
|
||||
* Static event handlers
|
||||
* These handlers deal with events from the GtkCanvas, a c-based component
|
||||
* These handlers deal with events from the GnomeCanvas, a c-based component
|
||||
*/
|
||||
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_imageframe_start_handle_event(GnomeCanvasItem *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(GtkCanvasItem *item, GdkEvent *eve
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event, gpointer data)
|
||||
Editor::_canvas_imageframe_end_handle_event(GnomeCanvasItem *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(GtkCanvasItem *item, GdkEvent *event
|
||||
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_imageframe_item_view_event(GnomeCanvasItem *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(GtkCanvasItem *item, GdkEvent* event,
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_imageframe_view_event(GnomeCanvasItem *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(GtkCanvasItem *item, GdkEvent* event, gpoi
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_marker_time_axis_view_event(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_item_view_event(GnomeCanvasItem *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(GtkCanvasItem *item, GdkEvent* event,
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_start_handle_event(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* eve
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::_canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data)
|
||||
Editor::_canvas_markerview_end_handle_event(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event
|
||||
*/
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
@@ -256,7 +256,7 @@ Editor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent *event,
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_start_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
@@ -291,7 +291,7 @@ Editor::canvas_imageframe_start_handle_event(GtkCanvasItem *item, GdkEvent *even
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
Editor::canvas_imageframe_end_handle_event(GnomeCanvasItem *item, GdkEvent *event, ImageFrameView *ifv)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
ImageFrameTimeAxisGroup* iftag = 0 ;
|
||||
@@ -326,7 +326,7 @@ Editor::canvas_imageframe_end_handle_event(GtkCanvasItem *item, GdkEvent *event,
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
|
||||
Editor::canvas_imageframe_view_event(GnomeCanvasItem* item, GdkEvent* event, ImageFrameTimeAxis* ifta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
@@ -349,7 +349,7 @@ Editor::canvas_imageframe_view_event(GtkCanvasItem* item, GdkEvent* event, Image
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_marker_time_axis_view_event(GtkCanvasItem *item, GdkEvent* event, MarkerTimeAxis* mta)
|
||||
Editor::canvas_marker_time_axis_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerTimeAxis* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
@@ -372,7 +372,7 @@ Editor::canvas_marker_time_axis_view_event(GtkCanvasItem *item, GdkEvent* event,
|
||||
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_item_view_event(GnomeCanvasItem *item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
@@ -397,7 +397,7 @@ Editor::canvas_markerview_item_view_event(GtkCanvasItem *item, GdkEvent* event,
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
@@ -428,7 +428,7 @@ Editor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* even
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
Editor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, MarkerView* mta)
|
||||
{
|
||||
gint ret = FALSE ;
|
||||
switch (event->type)
|
||||
@@ -473,7 +473,7 @@ Editor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event,
|
||||
/* <CMT Additions file="editor_mouse.cc"> */
|
||||
|
||||
void
|
||||
Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_imageframe_grab(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ;
|
||||
drag_info.copy = false ;
|
||||
@@ -494,10 +494,10 @@ Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
so move them to the top afterwards.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise_to_top(drag_info.item) ;
|
||||
gtk_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
|
||||
//gtk_canvas_item_raise_to_top(time_line_group) ;
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
gnome_canvas_item_raise_to_top(drag_info.item) ;
|
||||
gnome_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
|
||||
//gnome_canvas_item_raise_to_top(time_line_group) ;
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
|
||||
start_grab(event) ;
|
||||
|
||||
@@ -506,7 +506,7 @@ Editor::start_imageframe_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_markerview_grab(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ;
|
||||
drag_info.copy = false ;
|
||||
@@ -527,10 +527,10 @@ Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
so move them to the top afterwards.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise_to_top(drag_info.item) ;
|
||||
gtk_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
|
||||
//gtk_canvas_item_raise_to_top(time_line_group) ;
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
gnome_canvas_item_raise_to_top(drag_info.item) ;
|
||||
gnome_canvas_item_raise_to_top(drag_info.last_trackview->canvas_display) ;
|
||||
//gnome_canvas_item_raise_to_top(time_line_group) ;
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
|
||||
start_grab(event) ;
|
||||
|
||||
@@ -539,7 +539,7 @@ Editor::start_markerview_grab(GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
Editor::markerview_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
{
|
||||
double cx, cy ;
|
||||
|
||||
@@ -586,7 +586,7 @@ Editor::markerview_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
Editor::imageframe_drag_motion_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
{
|
||||
double cx, cy ;
|
||||
|
||||
@@ -625,7 +625,7 @@ Editor::imageframe_drag_motion_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
Editor::timeaxis_item_drag_finished_callback(GnomeCanvasItem*, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where ;
|
||||
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
|
||||
@@ -663,7 +663,7 @@ Editor::timeaxis_item_drag_finished_callback(GtkCanvasItem*, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_op(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_op(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
|
||||
|
||||
@@ -796,7 +796,7 @@ Editor::imageframe_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event
|
||||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
@@ -816,7 +816,7 @@ Editor::imageframe_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
@@ -875,7 +875,7 @@ Editor::imageframe_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::imageframe_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::imageframe_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
|
||||
|
||||
@@ -897,7 +897,7 @@ Editor::imageframe_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::markerview_item_start_handle_op(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_item_start_handle_op(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::markerview_item_end_handle_op(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_item_end_handle_op(GnomeCanvasItem* 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(GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_start_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
@@ -1021,7 +1021,7 @@ Editor::markerview_start_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event
|
||||
}
|
||||
|
||||
void
|
||||
Editor::markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_start_handle_end_trim(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
@@ -1041,7 +1041,7 @@ Editor::markerview_start_handle_end_trim(GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_end_handle_trim_motion(GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
@@ -1117,7 +1117,7 @@ Editor::markerview_end_handle_trim_motion(GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::markerview_end_handle_end_trim (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::markerview_end_handle_end_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Editor::kbd_driver (sigc::slot<void,GdkEvent*> theslot, bool use_track_canvas, b
|
||||
selection->set (entered_regionview);
|
||||
}
|
||||
|
||||
gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &dx, &dy);
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &dx, &dy);
|
||||
|
||||
ev.type = GDK_BUTTON_PRESS;
|
||||
ev.button.x = dx;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm2ext/gtk_ui.h>
|
||||
|
||||
#include <ardour/location.h>
|
||||
@@ -69,30 +69,30 @@ Editor::add_new_location (Location *location)
|
||||
}
|
||||
|
||||
if (location->is_mark()) {
|
||||
lam->start = new Marker (*this, GTK_CANVAS_GROUP(marker_group), color,
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(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, GTK_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
location->name(), Marker::LoopStart, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(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, GTK_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
location->name(), Marker::PunchIn, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GTK_CANVAS_GROUP(transport_marker_group), color,
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(transport_marker_group), color,
|
||||
location->name(), Marker::PunchOut, PublicEditor::canvas_marker_event, location->end());
|
||||
|
||||
} else {
|
||||
|
||||
// range marker
|
||||
lam->start = new Marker (*this, GTK_CANVAS_GROUP(range_marker_group), color,
|
||||
lam->start = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color,
|
||||
location->name(), Marker::Start, PublicEditor::canvas_marker_event, location->start());
|
||||
lam->end = new Marker (*this, GTK_CANVAS_GROUP(range_marker_group), color,
|
||||
lam->end = new Marker (*this, GNOME_CANVAS_GROUP(range_marker_group), color,
|
||||
location->name(), Marker::End, PublicEditor::canvas_marker_event, location->end());
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_marker (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::remove_marker (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
bool is_start;
|
||||
@@ -356,7 +356,7 @@ Editor::location_gone (Location *location)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::tm_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
|
||||
Editor::tm_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
{
|
||||
if (tm_marker_menu == 0) {
|
||||
build_tm_marker_menu ();
|
||||
@@ -369,7 +369,7 @@ Editor::tm_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
|
||||
|
||||
|
||||
void
|
||||
Editor::marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
|
||||
Editor::marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* 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, GtkCanvasItem* item)
|
||||
|
||||
|
||||
void
|
||||
Editor::new_transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
|
||||
Editor::new_transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
{
|
||||
if (new_transport_marker_menu == 0) {
|
||||
build_new_transport_marker_menu ();
|
||||
@@ -423,7 +423,7 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* it
|
||||
}
|
||||
|
||||
void
|
||||
Editor::transport_marker_context_menu (GdkEventButton* ev, GtkCanvasItem* item)
|
||||
Editor::transport_marker_context_menu (GdkEventButton* ev, GnomeCanvasItem* item)
|
||||
{
|
||||
if (transport_marker_menu == 0) {
|
||||
build_transport_marker_menu ();
|
||||
@@ -778,8 +778,8 @@ gint
|
||||
Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
|
||||
{
|
||||
// hide rects
|
||||
gtk_canvas_item_hide (transport_bar_drag_rect);
|
||||
gtk_canvas_item_hide (range_marker_drag_rect);
|
||||
gnome_canvas_item_hide (transport_bar_drag_rect);
|
||||
gnome_canvas_item_hide (range_marker_drag_rect);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -849,14 +849,14 @@ Editor::update_loop_range_view (bool visibility)
|
||||
double x1 = frame_to_pixel (tll->start());
|
||||
double x2 = frame_to_pixel (tll->end());
|
||||
|
||||
gtk_canvas_item_set (transport_loop_range_rect, "x1", x1, "x2", x2, NULL);
|
||||
gnome_canvas_item_set (transport_loop_range_rect, "x1", x1, "x2", x2, NULL);
|
||||
|
||||
if (visibility) {
|
||||
gtk_canvas_item_show (transport_loop_range_rect);
|
||||
gnome_canvas_item_show (transport_loop_range_rect);
|
||||
}
|
||||
}
|
||||
else if (visibility) {
|
||||
gtk_canvas_item_hide (transport_loop_range_rect);
|
||||
gnome_canvas_item_hide (transport_loop_range_rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -874,38 +874,38 @@ Editor::update_punch_range_view (bool visibility)
|
||||
double x1 = frame_to_pixel (tpl->start());
|
||||
double x2 = frame_to_pixel (tpl->end());
|
||||
|
||||
gtk_canvas_item_set (transport_punch_range_rect, "x1", x1, "x2", x2, NULL);
|
||||
gnome_canvas_item_set (transport_punch_range_rect, "x1", x1, "x2", x2, NULL);
|
||||
|
||||
if (visibility) {
|
||||
gtk_canvas_item_show (transport_punch_range_rect);
|
||||
gnome_canvas_item_show (transport_punch_range_rect);
|
||||
}
|
||||
}
|
||||
else if (visibility) {
|
||||
gtk_canvas_item_hide (transport_punch_range_rect);
|
||||
gnome_canvas_item_hide (transport_punch_range_rect);
|
||||
}
|
||||
|
||||
// if (session->get_punch_in()) {
|
||||
// double x = frame_to_pixel (transport_punch_location->start());
|
||||
// gtk_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
|
||||
// gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
|
||||
|
||||
// if (visibility) {
|
||||
// gtk_canvas_item_show (transport_punchin_line);
|
||||
// gnome_canvas_item_show (transport_punchin_line);
|
||||
// }
|
||||
// }
|
||||
// else if (visibility) {
|
||||
// gtk_canvas_item_hide (transport_punchin_line);
|
||||
// gnome_canvas_item_hide (transport_punchin_line);
|
||||
// }
|
||||
|
||||
// if (session->get_punch_out()) {
|
||||
// double x = frame_to_pixel (transport_punch_location->end());
|
||||
|
||||
// gtk_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
|
||||
// gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
|
||||
|
||||
// if (visibility) {
|
||||
// gtk_canvas_item_show (transport_punchout_line);
|
||||
// gnome_canvas_item_show (transport_punchout_line);
|
||||
// }
|
||||
// }
|
||||
// else if (visibility) {
|
||||
// gtk_canvas_item_hide (transport_punchout_line);
|
||||
// gnome_canvas_item_hide (transport_punchout_line);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ Editor::update_current_screen ()
|
||||
|
||||
if (_follow_playhead) {
|
||||
|
||||
gtk_canvas_item_show (playhead_cursor->canvas_item);
|
||||
gnome_canvas_item_show (playhead_cursor->canvas_item);
|
||||
|
||||
if (frame != last_update_frame) {
|
||||
|
||||
@@ -185,7 +185,7 @@ Editor::update_current_screen ()
|
||||
|
||||
if (frame != last_update_frame) {
|
||||
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
|
||||
gtk_canvas_item_hide (playhead_cursor->canvas_item);
|
||||
gnome_canvas_item_hide (playhead_cursor->canvas_item);
|
||||
} else {
|
||||
playhead_cursor->set_position (frame);
|
||||
}
|
||||
|
||||
@@ -86,14 +86,14 @@ Editor::event_frame (GdkEvent* event, double* pcx, double* pcy)
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_2BUTTON_PRESS:
|
||||
case GDK_3BUTTON_PRESS:
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->button.x, event->button.y, pcx, pcy);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->button.x, event->button.y, pcx, pcy);
|
||||
break;
|
||||
case GDK_MOTION_NOTIFY:
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->motion.x, event->motion.y, pcx, pcy);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->motion.x, event->motion.y, pcx, pcy);
|
||||
break;
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->crossing.x, event->crossing.y, pcx, pcy);
|
||||
break;
|
||||
default:
|
||||
warning << compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg;
|
||||
@@ -284,7 +284,7 @@ Editor::step_mouse_mode (bool next)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::button_press_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
@@ -381,7 +381,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
|
||||
if (drag_info.item) {
|
||||
gtk_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
gnome_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
}
|
||||
|
||||
/* single mouse clicks on any of these item types operate
|
||||
@@ -784,7 +784,7 @@ Editor::button_press_handler (GtkCanvasItem* item, GdkEvent* event, ItemType ite
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::button_release_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::button_release_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
jack_nframes_t where = event_frame (event, 0, 0);
|
||||
|
||||
@@ -1117,7 +1117,7 @@ Editor::maybe_autoscroll (GdkEvent* event)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::enter_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
ControlPoint* cp;
|
||||
Marker * marker;
|
||||
@@ -1132,7 +1132,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
double at_x, at_y;
|
||||
at_x = cp->get_x();
|
||||
at_y = cp->get_y ();
|
||||
gtk_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
at_x += 20.0;
|
||||
at_y += 20.0;
|
||||
|
||||
@@ -1156,7 +1156,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
double at_x, at_y;
|
||||
at_x = cp->get_x();
|
||||
at_y = cp->get_y ();
|
||||
gtk_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
gnome_canvas_item_i2w (cp->item, &at_x, &at_y);
|
||||
at_x += 20.0;
|
||||
at_y += 20.0;
|
||||
|
||||
@@ -1172,7 +1172,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
|
||||
case GainLineItem:
|
||||
if (mouse_mode == MouseGain) {
|
||||
gtk_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredGainLine], NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
}
|
||||
@@ -1182,7 +1182,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
gtk_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", color_map[cEnteredAutomationLine], NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), fader_cursor);
|
||||
}
|
||||
@@ -1277,7 +1277,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
case FadeInHandleItem:
|
||||
case FadeOutHandleItem:
|
||||
if (mouse_mode == MouseObject) {
|
||||
gtk_canvas_item_set (item, "fill_color_rgba", 0, "outline_pixels", 1, NULL);
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", 0, "outline_pixels", 1, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1314,7 +1314,7 @@ Editor::enter_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::leave_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
AutomationLine* al;
|
||||
ControlPoint* cp;
|
||||
@@ -1363,7 +1363,7 @@ Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
case RedirectAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
|
||||
gtk_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", al->get_line_color(), NULL);
|
||||
if (is_drawable()) {
|
||||
gdk_window_set_cursor (track_canvas_scroller.get_window(), current_canvas_cursor);
|
||||
}
|
||||
@@ -1407,7 +1407,7 @@ Editor::leave_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
case FadeInHandleItem:
|
||||
case FadeOutHandleItem:
|
||||
rv = static_cast<AudioRegionView*>(gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
gtk_canvas_item_set (item, "fill_color_rgba", rv->get_fill_color(), "outline_pixels", 0, NULL);
|
||||
gnome_canvas_item_set (item, "fill_color_rgba", rv->get_fill_color(), "outline_pixels", 0, NULL);
|
||||
break;
|
||||
|
||||
case AutomationTrackItem:
|
||||
@@ -1437,7 +1437,7 @@ Editor::left_automation_track ()
|
||||
}
|
||||
|
||||
gint
|
||||
Editor::motion_handler (GtkCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
Editor::motion_handler (GnomeCanvasItem* item, GdkEvent* event, ItemType item_type)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
@@ -1583,7 +1583,7 @@ Editor::start_grab (GdkEvent* event, GdkCursor *cursor)
|
||||
drag_info.brushing = false;
|
||||
drag_info.copied_location = 0;
|
||||
|
||||
gtk_canvas_item_grab (drag_info.item,
|
||||
gnome_canvas_item_grab (drag_info.item,
|
||||
Gdk::POINTER_MOTION_MASK|Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK,
|
||||
cursor,
|
||||
event->button.time);
|
||||
@@ -1607,7 +1607,7 @@ Editor::start_grab (GdkEvent* event, GdkCursor *cursor)
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::end_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
bool did_drag = false;
|
||||
|
||||
@@ -1617,7 +1617,7 @@ Editor::end_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
return false;
|
||||
}
|
||||
|
||||
gtk_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
gnome_canvas_item_ungrab (drag_info.item, event->button.time);
|
||||
|
||||
if (drag_info.finished_callback) {
|
||||
(this->*(drag_info.finished_callback)) (item, event);
|
||||
@@ -1676,7 +1676,7 @@ Editor::set_playhead_cursor (GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_fade_in_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_fade_in_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::fade_in_drag_motion_callback;
|
||||
@@ -1695,7 +1695,7 @@ Editor::start_fade_in_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_in_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_in_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
@@ -1728,7 +1728,7 @@ Editor::fade_in_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_in_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_in_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
@@ -1766,7 +1766,7 @@ Editor::fade_in_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_fade_out_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_fade_out_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::fade_out_drag_motion_callback;
|
||||
@@ -1785,7 +1785,7 @@ Editor::start_fade_out_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_out_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_out_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
|
||||
jack_nframes_t pos;
|
||||
@@ -1820,7 +1820,7 @@ Editor::fade_out_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::fade_out_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::fade_out_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
@@ -1859,7 +1859,7 @@ Editor::fade_out_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_cursor_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_cursor_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::cursor_drag_motion_callback;
|
||||
@@ -1886,7 +1886,7 @@ Editor::start_cursor_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::cursor_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::cursor_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Cursor* cursor = (Cursor *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
@@ -1919,7 +1919,7 @@ Editor::cursor_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::cursor_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::cursor_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
@@ -1944,15 +1944,15 @@ Editor::update_marker_drag_item (Location *location)
|
||||
if (location->is_mark()) {
|
||||
marker_drag_line_points->coords[0] = x1;
|
||||
marker_drag_line_points->coords[2] = x1;
|
||||
gtk_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
|
||||
gnome_canvas_item_set (marker_drag_line, "points", marker_drag_line_points, NULL);
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_set (range_marker_drag_rect, "x1", x1, "x2", x2, NULL);
|
||||
gnome_canvas_item_set (range_marker_drag_rect, "x1", x1, "x2", x2, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
|
||||
@@ -1978,12 +1978,12 @@ Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
update_marker_drag_item (location);
|
||||
|
||||
if (location->is_mark()) {
|
||||
gtk_canvas_item_show (marker_drag_line);
|
||||
gtk_canvas_item_raise_to_top (marker_drag_line);
|
||||
gnome_canvas_item_show (marker_drag_line);
|
||||
gnome_canvas_item_raise_to_top (marker_drag_line);
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_show (range_marker_drag_rect);
|
||||
gtk_canvas_item_raise_to_top (range_marker_drag_rect);
|
||||
gnome_canvas_item_show (range_marker_drag_rect);
|
||||
gnome_canvas_item_raise_to_top (range_marker_drag_rect);
|
||||
}
|
||||
|
||||
if (is_start) show_verbose_time_cursor (location->start(), 10);
|
||||
@@ -1991,7 +1991,7 @@ Editor::start_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t f_delta;
|
||||
Marker* marker = (Marker *) drag_info.data;
|
||||
@@ -2070,7 +2070,7 @@ Editor::marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) {
|
||||
marker_drag_motion_callback (item, event);
|
||||
@@ -2084,12 +2084,12 @@ Editor::marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
location->set (drag_info.copied_location->start(), drag_info.copied_location->end());
|
||||
}
|
||||
|
||||
gtk_canvas_item_hide (marker_drag_line);
|
||||
gtk_canvas_item_hide (range_marker_drag_rect);
|
||||
gnome_canvas_item_hide (marker_drag_line);
|
||||
gnome_canvas_item_hide (range_marker_drag_rect);
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_meter_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_meter_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
@@ -2120,7 +2120,7 @@ Editor::start_meter_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::meter_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::meter_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
MeterMarker* marker = (MeterMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
@@ -2148,7 +2148,7 @@ Editor::meter_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::meter_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::meter_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
@@ -2168,7 +2168,7 @@ Editor::meter_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* even
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_tempo_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_tempo_marker_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
@@ -2201,7 +2201,7 @@ Editor::start_tempo_marker_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::tempo_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::tempo_marker_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
TempoMarker* marker = (TempoMarker *) drag_info.data;
|
||||
jack_nframes_t adjusted_frame;
|
||||
@@ -2230,7 +2230,7 @@ Editor::tempo_marker_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::tempo_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::tempo_marker_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (drag_info.first_move) return;
|
||||
|
||||
@@ -2250,7 +2250,7 @@ Editor::tempo_marker_drag_finished_callback (GtkCanvasItem* item, GdkEvent* even
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_gain_control_point (GtkCanvasItem*item, GdkEvent* event)
|
||||
Editor::remove_gain_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
@@ -2269,7 +2269,7 @@ Editor::remove_gain_control_point (GtkCanvasItem*item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_control_point (GtkCanvasItem*item, GdkEvent* event)
|
||||
Editor::remove_control_point (GnomeCanvasItem*item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
@@ -2282,7 +2282,7 @@ Editor::remove_control_point (GtkCanvasItem*item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_control_point_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_control_point_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
@@ -2308,7 +2308,7 @@ Editor::start_control_point_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::control_point_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
|
||||
|
||||
@@ -2331,7 +2331,7 @@ Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event
|
||||
|
||||
}
|
||||
|
||||
gtk_canvas_item_w2i (cp->line.parent_group(), &cx, &cy);
|
||||
gnome_canvas_item_w2i (cp->line.parent_group(), &cx, &cy);
|
||||
|
||||
cx = max (0.0, cx);
|
||||
cy = max (0.0, cy);
|
||||
@@ -2360,7 +2360,7 @@ Editor::control_point_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event
|
||||
}
|
||||
|
||||
void
|
||||
Editor::control_point_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::control_point_drag_finished_callback (GnomeCanvasItem* 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 (GtkCanvasItem* item, GdkEvent* eve
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_line_grab_from_regionview (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_line_grab_from_regionview (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
switch (mouse_mode) {
|
||||
case MouseGain:
|
||||
@@ -2380,7 +2380,7 @@ Editor::start_line_grab_from_regionview (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_line_grab_from_line (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_line_grab_from_line (GnomeCanvasItem* 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;
|
||||
gtk_canvas_item_w2i (line->parent_group(), &cx, &cy);
|
||||
gnome_canvas_item_w2i (line->parent_group(), &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 (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::line_drag_motion_callback (GnomeCanvasItem* 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;
|
||||
|
||||
gtk_canvas_item_w2i (line->parent_group(), &cx, &cy);
|
||||
gnome_canvas_item_w2i (line->parent_group(), &cx, &cy);
|
||||
|
||||
double fraction;
|
||||
fraction = 1.0 - (cy / line->height());
|
||||
@@ -2456,7 +2456,7 @@ Editor::line_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::line_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::line_drag_finished_callback (GnomeCanvasItem* 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 (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_region_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
@@ -2498,7 +2498,7 @@ Editor::start_region_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_region_copy_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_copy_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
@@ -2580,7 +2580,7 @@ Editor::start_region_copy_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_region_brush_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_region_brush_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (selection->audio_regions.empty() || clicked_regionview == 0) {
|
||||
return;
|
||||
@@ -2613,7 +2613,7 @@ Editor::start_region_brush_grab (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::region_drag_motion_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
double x_delta;
|
||||
double y_delta = 0;
|
||||
@@ -2719,8 +2719,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
double ix1, ix2, iy1, iy2;
|
||||
int32_t n = 0;
|
||||
|
||||
gtk_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
@@ -2889,8 +2889,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
*/
|
||||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
gtk_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds (rv2->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv2->get_canvas_group(), &ix1, &iy1);
|
||||
|
||||
if (ix1 <= 1) {
|
||||
x_delta = 0;
|
||||
@@ -2917,8 +2917,8 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
the parent.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* canvas_atv = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
AudioTimeAxisView* temp_atv;
|
||||
@@ -3005,9 +3005,9 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
on the top, since its parent is the whole canvas.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise_to_top (rv->get_canvas_group());
|
||||
gtk_canvas_item_raise_to_top (rv->get_time_axis_view().canvas_display);
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
gnome_canvas_item_raise_to_top (rv->get_canvas_group());
|
||||
gnome_canvas_item_raise_to_top (rv->get_time_axis_view().canvas_display);
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
|
||||
/* freeze the playlists from notifying till
|
||||
the motion is done.
|
||||
@@ -3036,7 +3036,7 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
if (drag_info.first_move) {
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
}
|
||||
|
||||
drag_info.first_move = false;
|
||||
@@ -3048,7 +3048,7 @@ Editor::region_drag_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::region_drag_finished_callback (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t where;
|
||||
AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data);
|
||||
@@ -3129,8 +3129,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gtk_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
@@ -3164,8 +3164,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gtk_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds ((*i)->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w ((*i)->get_canvas_group(), &ix1, &iy1);
|
||||
TimeAxisView* tvp2 = trackview_by_y_position (iy1);
|
||||
AudioTimeAxisView* atv2 = dynamic_cast<AudioTimeAxisView*>(tvp2);
|
||||
|
||||
@@ -3212,8 +3212,8 @@ Editor::region_drag_finished_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
double ix1, ix2, iy1, iy2;
|
||||
|
||||
gtk_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w (rv->get_canvas_group(), &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds (rv->get_canvas_frame(), &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (rv->get_canvas_group(), &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 (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_selection_grab (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (clicked_regionview == 0) {
|
||||
return;
|
||||
@@ -3468,7 +3468,7 @@ Editor::cancel_selection ()
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp op)
|
||||
Editor::start_selection_op (GnomeCanvasItem* item, GdkEvent* event, SelectionOp op)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
@@ -3523,7 +3523,7 @@ Editor::start_selection_op (GtkCanvasItem* item, GdkEvent* event, SelectionOp op
|
||||
}
|
||||
|
||||
void
|
||||
Editor::drag_selection (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_selection (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
@@ -3653,7 +3653,7 @@ Editor::drag_selection (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::end_selection_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_selection_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
drag_selection (item, event);
|
||||
@@ -3678,7 +3678,7 @@ Editor::end_selection_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_trim (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_trim (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
double speed = 1.0;
|
||||
TimeAxisView* tvp = clicked_trackview;
|
||||
@@ -3728,7 +3728,7 @@ Editor::start_trim (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::trim_motion_callback (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::trim_motion_callback (GnomeCanvasItem* 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 (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::trim_finished_callback (GnomeCanvasItem* 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 (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::hide_marker (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Marker* marker;
|
||||
bool is_start;
|
||||
@@ -4082,7 +4082,7 @@ Editor::hide_marker (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMarkerOp op)
|
||||
Editor::start_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event, RangeMarkerOp op)
|
||||
{
|
||||
|
||||
if (session == 0) {
|
||||
@@ -4117,12 +4117,12 @@ Editor::start_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event, RangeMar
|
||||
}
|
||||
|
||||
void
|
||||
Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start = 0;
|
||||
jack_nframes_t end = 0;
|
||||
|
||||
GtkCanvasItem * crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
|
||||
GnomeCanvasItem * crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
|
||||
|
||||
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
|
||||
snap_to (drag_info.current_pointer_frame);
|
||||
@@ -4157,11 +4157,11 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
temp_location->set (start, end);
|
||||
|
||||
gtk_canvas_item_show (crect);
|
||||
gnome_canvas_item_show (crect);
|
||||
|
||||
update_marker_drag_item (temp_location);
|
||||
gtk_canvas_item_show (range_marker_drag_rect);
|
||||
gtk_canvas_item_raise_to_top (range_marker_drag_rect);
|
||||
gnome_canvas_item_show (range_marker_drag_rect);
|
||||
gnome_canvas_item_raise_to_top (range_marker_drag_rect);
|
||||
|
||||
}
|
||||
break;
|
||||
@@ -4177,7 +4177,7 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
double x1 = frame_to_pixel (start);
|
||||
double x2 = frame_to_pixel (end);
|
||||
gtk_canvas_item_set (crect, "x1", x1, "x2", x2, NULL);
|
||||
gnome_canvas_item_set (crect, "x1", x1, "x2", x2, NULL);
|
||||
|
||||
update_marker_drag_item (temp_location);
|
||||
}
|
||||
@@ -4190,7 +4190,7 @@ Editor::drag_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_range_markerbar_op (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
Location * newloc = 0;
|
||||
|
||||
@@ -4207,8 +4207,8 @@ Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
session->add_redo_no_execute (session->locations()->get_memento());
|
||||
commit_reversible_command ();
|
||||
|
||||
gtk_canvas_item_hide (range_bar_drag_rect);
|
||||
gtk_canvas_item_hide (range_marker_drag_rect);
|
||||
gnome_canvas_item_hide (range_bar_drag_rect);
|
||||
gnome_canvas_item_hide (range_marker_drag_rect);
|
||||
break;
|
||||
|
||||
case CreateTransportMarker:
|
||||
@@ -4233,7 +4233,7 @@ Editor::end_range_markerbar_op (GtkCanvasItem* item, GdkEvent* event)
|
||||
|
||||
|
||||
void
|
||||
Editor::start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::drag_mouse_zoom;
|
||||
@@ -4245,7 +4245,7 @@ Editor::start_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
@@ -4272,8 +4272,8 @@ Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
if (start != end) {
|
||||
|
||||
if (drag_info.first_move) {
|
||||
gtk_canvas_item_show (zoom_rect);
|
||||
gtk_canvas_item_raise_to_top (zoom_rect);
|
||||
gnome_canvas_item_show (zoom_rect);
|
||||
gnome_canvas_item_raise_to_top (zoom_rect);
|
||||
}
|
||||
|
||||
reposition_zoom_rect(start, end);
|
||||
@@ -4286,7 +4286,7 @@ Editor::drag_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_mouse_zoom (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
drag_mouse_zoom (item, event);
|
||||
@@ -4304,7 +4304,7 @@ Editor::end_mouse_zoom (GtkCanvasItem* item, GdkEvent* event)
|
||||
*/
|
||||
}
|
||||
|
||||
gtk_canvas_item_hide (zoom_rect);
|
||||
gnome_canvas_item_hide (zoom_rect);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -4323,7 +4323,7 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::drag_rubberband_select;
|
||||
@@ -4335,7 +4335,7 @@ Editor::start_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::drag_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t end;
|
||||
@@ -4388,8 +4388,8 @@ Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
"y2", y2,
|
||||
NULL);
|
||||
|
||||
gtk_canvas_item_show (rubberband_rect);
|
||||
gtk_canvas_item_raise_to_top (rubberband_rect);
|
||||
gnome_canvas_item_show (rubberband_rect);
|
||||
gnome_canvas_item_raise_to_top (rubberband_rect);
|
||||
|
||||
drag_info.last_pointer_frame = drag_info.current_pointer_frame;
|
||||
drag_info.first_move = false;
|
||||
@@ -4399,7 +4399,7 @@ Editor::drag_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::end_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_rubberband_select (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
if (!drag_info.first_move) {
|
||||
|
||||
@@ -4437,12 +4437,12 @@ Editor::end_rubberband_select (GtkCanvasItem* item, GdkEvent* event)
|
||||
selection->clear_lines ();
|
||||
}
|
||||
|
||||
gtk_canvas_item_hide (rubberband_rect);
|
||||
gnome_canvas_item_hide (rubberband_rect);
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
Editor::mouse_rename_region (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::mouse_rename_region (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
using namespace Gtkmm2ext;
|
||||
|
||||
@@ -4468,7 +4468,7 @@ Editor::mouse_rename_region (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_time_fx (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::start_time_fx (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
drag_info.item = item;
|
||||
drag_info.motion_callback = &Editor::time_fx_motion;
|
||||
@@ -4480,7 +4480,7 @@ Editor::start_time_fx (GtkCanvasItem* item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::time_fx_motion (GtkCanvasItem *item, GdkEvent* event)
|
||||
Editor::time_fx_motion (GnomeCanvasItem *item, GdkEvent* event)
|
||||
{
|
||||
AudioRegionView* rv = clicked_regionview;
|
||||
|
||||
@@ -4503,7 +4503,7 @@ Editor::time_fx_motion (GtkCanvasItem *item, GdkEvent* event)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::end_time_fx (GtkCanvasItem* item, GdkEvent* event)
|
||||
Editor::end_time_fx (GnomeCanvasItem* item, GdkEvent* event)
|
||||
{
|
||||
clicked_regionview->get_time_axis_view().hide_timestretch ();
|
||||
|
||||
|
||||
@@ -1472,7 +1472,7 @@ Editor::insert_region_list_drag (AudioRegion& region)
|
||||
|
||||
track_canvas->get_pointer (x, y);
|
||||
|
||||
gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wx, &wy);
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy);
|
||||
|
||||
GdkEvent event;
|
||||
event.type = GDK_BUTTON_RELEASE;
|
||||
@@ -3173,7 +3173,7 @@ Editor::mouse_paste ()
|
||||
double wx, wy;
|
||||
track_canvas->get_pointer (x, y);
|
||||
|
||||
gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wx, &wy);
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy);
|
||||
|
||||
GdkEvent event;
|
||||
event.type = GDK_BUTTON_RELEASE;
|
||||
|
||||
@@ -245,8 +245,8 @@ Editor::route_list_reordered ()
|
||||
edit_controls_scroller.queue_resize ();
|
||||
reset_scrolling_region ();
|
||||
|
||||
//gtk_canvas_item_raise_to_top (time_line_group);
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
//gnome_canvas_item_raise_to_top (time_line_group);
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -225,8 +225,8 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
|
||||
time_canvas_event_box.get_window().get_pointer (x, y, state);
|
||||
|
||||
|
||||
gtk_canvas_window_to_world (GTK_CANVAS(track_gtk_canvas), x, y, &wcx, &wcy);
|
||||
gtk_canvas_w2c_d (GTK_CANVAS(track_gtk_canvas), wcx, wcy, &cx, &cy);
|
||||
gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wcx, &wcy);
|
||||
gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), wcx, wcy, &cx, &cy);
|
||||
|
||||
jack_nframes_t where = leftmost_frame + pixel_to_frame (x);
|
||||
|
||||
@@ -608,16 +608,16 @@ Editor::update_ruler_visibility ()
|
||||
gtk_object_getv (GTK_OBJECT(meter_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
gtk_canvas_item_move (meter_group, 0.0, tbpos - old_unit_pos) ;
|
||||
gnome_canvas_item_move (meter_group, 0.0, tbpos - old_unit_pos) ;
|
||||
}
|
||||
|
||||
//gtk_canvas_item_set (meter_group, "y", tbpos, NULL);
|
||||
gtk_canvas_item_show (meter_group);
|
||||
//gnome_canvas_item_set (meter_group, "y", tbpos, NULL);
|
||||
gnome_canvas_item_show (meter_group);
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_hide (meter_group);
|
||||
gnome_canvas_item_hide (meter_group);
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_time_tempo]) {
|
||||
@@ -625,15 +625,15 @@ Editor::update_ruler_visibility ()
|
||||
gtk_object_getv (GTK_OBJECT(tempo_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
gtk_canvas_item_move (tempo_group, 0.0, tbpos - old_unit_pos) ;
|
||||
gnome_canvas_item_move (tempo_group, 0.0, tbpos - old_unit_pos) ;
|
||||
}
|
||||
//gtk_canvas_item_set (tempo_group, "y", tbpos, NULL);
|
||||
gtk_canvas_item_show (tempo_group);
|
||||
//gnome_canvas_item_set (tempo_group, "y", tbpos, NULL);
|
||||
gnome_canvas_item_show (tempo_group);
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_hide (tempo_group);
|
||||
gnome_canvas_item_hide (tempo_group);
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_time_marker]) {
|
||||
@@ -641,15 +641,15 @@ Editor::update_ruler_visibility ()
|
||||
gtk_object_getv (GTK_OBJECT(marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
gtk_canvas_item_move (marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
gnome_canvas_item_move (marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
}
|
||||
//gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gtk_canvas_item_show (marker_group);
|
||||
//gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gnome_canvas_item_show (marker_group);
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_hide (marker_group);
|
||||
gnome_canvas_item_hide (marker_group);
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_time_range_marker]) {
|
||||
@@ -657,15 +657,15 @@ Editor::update_ruler_visibility ()
|
||||
gtk_object_getv (GTK_OBJECT(range_marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
gtk_canvas_item_move (range_marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
gnome_canvas_item_move (range_marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
}
|
||||
//gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gtk_canvas_item_show (range_marker_group);
|
||||
//gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gnome_canvas_item_show (range_marker_group);
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_hide (range_marker_group);
|
||||
gnome_canvas_item_hide (range_marker_group);
|
||||
}
|
||||
|
||||
if (ruler_shown[ruler_time_transport_marker]) {
|
||||
@@ -673,15 +673,15 @@ Editor::update_ruler_visibility ()
|
||||
gtk_object_getv (GTK_OBJECT(transport_marker_group), 1, args) ;
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
if (tbpos != old_unit_pos) {
|
||||
gtk_canvas_item_move (transport_marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
gnome_canvas_item_move (transport_marker_group, 0.0, tbpos - old_unit_pos) ;
|
||||
}
|
||||
//gtk_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gtk_canvas_item_show (transport_marker_group);
|
||||
//gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
|
||||
gnome_canvas_item_show (transport_marker_group);
|
||||
tbpos += timebar_height;
|
||||
visible_timebars++;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_hide (transport_marker_group);
|
||||
gnome_canvas_item_hide (transport_marker_group);
|
||||
}
|
||||
|
||||
time_canvas_vbox.set_size_request (-1, (int)(timebar_height * visible_timebars));
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
#include <climits>
|
||||
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.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, GTK_CANVAS_GROUP(meter_group), color_map[cMeterMarker], buf,
|
||||
metric_marks.push_back (new MeterMarker (*this, GNOME_CANVAS_GROUP(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, GTK_CANVAS_GROUP(tempo_group), color_map[cTempoMarker], buf,
|
||||
metric_marks.push_back (new TempoMarker (*this, GNOME_CANVAS_GROUP(tempo_group), color_map[cTempoMarker], buf,
|
||||
*(const_cast<TempoSection*>(ts)), PublicEditor::canvas_tempo_marker_event));
|
||||
}
|
||||
|
||||
@@ -120,20 +120,20 @@ void
|
||||
Editor::hide_measures ()
|
||||
{
|
||||
for (TimeLineList::iterator i = used_measure_lines.begin(); i != used_measure_lines.end(); ++i) {
|
||||
gtk_canvas_item_hide (*i);
|
||||
gnome_canvas_item_hide (*i);
|
||||
free_measure_lines.push_back (*i);
|
||||
}
|
||||
used_measure_lines.clear ();
|
||||
}
|
||||
|
||||
GtkCanvasItem *
|
||||
GnomeCanvasItem *
|
||||
Editor::get_time_line ()
|
||||
{
|
||||
GtkCanvasItem *line;
|
||||
GnomeCanvasItem *line;
|
||||
|
||||
if (free_measure_lines.empty()) {
|
||||
line = gtk_canvas_item_new (GTK_CANVAS_GROUP(time_line_group),
|
||||
gtk_canvas_simpleline_get_type(),
|
||||
line = gnome_canvas_item_new (GNOME_CANVAS_GROUP(time_line_group),
|
||||
gnome_canvas_simpleline_get_type(),
|
||||
NULL);
|
||||
// cerr << "measure line @ " << line << endl;
|
||||
used_measure_lines.push_back (line);
|
||||
@@ -155,7 +155,7 @@ Editor::draw_measures ()
|
||||
|
||||
TempoMap::BBTPointList::iterator i;
|
||||
TempoMap::BBTPointList *all_bbt_points;
|
||||
GtkCanvasItem *line;
|
||||
GnomeCanvasItem *line;
|
||||
gdouble xpos, last_xpos;
|
||||
uint32_t cnt;
|
||||
uint32_t color;
|
||||
@@ -223,8 +223,8 @@ Editor::draw_measures ()
|
||||
"y2", (gdouble) canvas_height,
|
||||
"color_rgba", color,
|
||||
NULL);
|
||||
gtk_canvas_item_raise_to_top (line);
|
||||
gtk_canvas_item_show (line);
|
||||
gnome_canvas_item_raise_to_top (line);
|
||||
gnome_canvas_item_show (line);
|
||||
last_xpos = xpos;
|
||||
++cnt;
|
||||
}
|
||||
@@ -236,8 +236,8 @@ Editor::draw_measures ()
|
||||
|
||||
/* the cursors are always on top of everything */
|
||||
|
||||
gtk_canvas_item_raise_to_top (cursor_group);
|
||||
gtk_canvas_item_lower_to_bottom (time_line_group);
|
||||
gnome_canvas_item_raise_to_top (cursor_group);
|
||||
gnome_canvas_item_lower_to_bottom (time_line_group);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -326,7 +326,7 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_tempo_marker (GtkCanvasItem* item)
|
||||
Editor::remove_tempo_marker (GnomeCanvasItem* item)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
@@ -411,7 +411,7 @@ Editor::edit_tempo_section (TempoSection* section)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::edit_tempo_marker (GtkCanvasItem *item)
|
||||
Editor::edit_tempo_marker (GnomeCanvasItem *item)
|
||||
{
|
||||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
@@ -430,7 +430,7 @@ Editor::edit_tempo_marker (GtkCanvasItem *item)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::edit_meter_marker (GtkCanvasItem *item)
|
||||
Editor::edit_meter_marker (GnomeCanvasItem *item)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
@@ -461,7 +461,7 @@ Editor::real_remove_tempo_marker (TempoSection *section)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::remove_meter_marker (GtkCanvasItem* item)
|
||||
Editor::remove_meter_marker (GnomeCanvasItem* item)
|
||||
{
|
||||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
||||
@@ -14,12 +14,12 @@ enum Width {
|
||||
Narrow,
|
||||
};
|
||||
|
||||
#include <gtk-canvas/gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
struct SelectionRect {
|
||||
GtkCanvasItem *rect;
|
||||
GtkCanvasItem *end_trim;
|
||||
GtkCanvasItem *start_trim;
|
||||
GnomeCanvasItem *rect;
|
||||
GnomeCanvasItem *end_trim;
|
||||
GnomeCanvasItem *start_trim;
|
||||
uint32_t id;
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <sigc++/adaptor.h>
|
||||
#include <sigc++/scope.h>
|
||||
|
||||
namespace SigC
|
||||
namespace sigc
|
||||
{
|
||||
|
||||
/****************************************************************
|
||||
|
||||
@@ -43,11 +43,11 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView ()
|
||||
}
|
||||
|
||||
void
|
||||
GainAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
GainAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
{
|
||||
double x = 0;
|
||||
|
||||
gtk_canvas_item_w2i (canvas_display, &x, &y);
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
|
||||
~GainAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
private:
|
||||
ARDOUR::Curve& curve;
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#include <ardour/types.h>
|
||||
|
||||
#include <gtk--.h>
|
||||
#include <gtkmmext/slider_controller.h>
|
||||
#include <gtkmmext/click_box.h>
|
||||
#include <gtkmm.h>
|
||||
#include <gtkmm2ext/slider_controller.h>
|
||||
#include <gtkmm2ext/click_box.h>
|
||||
|
||||
#include "enums.h"
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace ARDOUR {
|
||||
class Route;
|
||||
class RouteGroup;
|
||||
}
|
||||
namespace Gtkmmext {
|
||||
namespace Gtkmm2ext {
|
||||
class FastMeter;
|
||||
class BarController;
|
||||
class Pix;
|
||||
@@ -68,10 +68,10 @@ class GainMeter : public Gtk::VBox
|
||||
|
||||
bool ignore_toggle;
|
||||
|
||||
Gtkmmext::VSliderController *gain_slider;
|
||||
Gtkmm2ext::VSliderController *gain_slider;
|
||||
Gtk::Adjustment gain_adjustment;
|
||||
Gtk::Frame gain_display_frame;
|
||||
Gtkmmext::ClickBox gain_display;
|
||||
Gtkmm2ext::ClickBox gain_display;
|
||||
Gtk::Frame peak_display_frame;
|
||||
Gtk::EventBox peak_display;
|
||||
Gtk::Label peak_display_label;
|
||||
@@ -91,7 +91,7 @@ class GainMeter : public Gtk::VBox
|
||||
void gain_printer (char buf[32], Gtk::Adjustment&);
|
||||
|
||||
struct MeterInfo {
|
||||
Gtkmmext::FastMeter *meter;
|
||||
Gtkmm2ext::FastMeter *meter;
|
||||
gint16 width;
|
||||
bool packed;
|
||||
|
||||
@@ -145,10 +145,10 @@ class GainMeter : public Gtk::VBox
|
||||
void reset_peak_display ();
|
||||
void reset_group_peak_display (ARDOUR::RouteGroup*);
|
||||
|
||||
static SigC::Signal0<void> ResetAllPeakDisplays;
|
||||
static SigC::Signal1<void,ARDOUR::RouteGroup*> ResetGroupPeakDisplays;
|
||||
static sigc::signal<void> ResetAllPeakDisplays;
|
||||
static sigc::signal<void,ARDOUR::RouteGroup*> ResetGroupPeakDisplays;
|
||||
|
||||
static Gtkmmext::Pix* slider_pix;
|
||||
static Gtkmm2ext::Pix* slider_pix;
|
||||
static int setup_slider_pix ();
|
||||
};
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ using namespace Editing;
|
||||
GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
|
||||
: trackview (atv)
|
||||
{
|
||||
group = gtk_canvas_item_new (GTK_CANVAS_GROUP(trackview.canvas_display),
|
||||
gtk_canvas_group_get_type(),
|
||||
group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(trackview.canvas_display),
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", initial_pos,
|
||||
"y", 0.0,
|
||||
NULL);
|
||||
|
||||
base_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -24,7 +24,7 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
|
||||
"fill_color_rgba", color_map[cGhostTrackBaseFill],
|
||||
NULL);
|
||||
|
||||
gtk_canvas_item_lower_to_bottom (group);
|
||||
gnome_canvas_item_lower_to_bottom (group);
|
||||
|
||||
atv.add_ghost (this);
|
||||
}
|
||||
@@ -38,31 +38,31 @@ GhostRegion::~GhostRegion ()
|
||||
void
|
||||
GhostRegion::set_samples_per_unit (double spu)
|
||||
{
|
||||
for (vector<GtkCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) {
|
||||
gtk_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator i = waves.begin(); i != waves.end(); ++i) {
|
||||
gnome_canvas_item_set ((*i), "samples_per_unit", spu, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GhostRegion::set_duration (double units)
|
||||
{
|
||||
gtk_canvas_item_set (base_rect, "x2", units, NULL);
|
||||
gnome_canvas_item_set (base_rect, "x2", units, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
GhostRegion::set_height ()
|
||||
{
|
||||
gdouble ht;
|
||||
vector<GtkCanvasItem*>::iterator i;
|
||||
vector<GnomeCanvasItem*>::iterator i;
|
||||
uint32_t n;
|
||||
|
||||
gtk_canvas_item_set (base_rect, "y2", (double) trackview.height, NULL);
|
||||
gnome_canvas_item_set (base_rect, "y2", (double) trackview.height, NULL);
|
||||
|
||||
ht = ((trackview.height) / (double) waves.size());
|
||||
|
||||
for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
|
||||
gdouble yoff = n * ht;
|
||||
gtk_canvas_item_set ((*i), "height", ht, "y", yoff, NULL);
|
||||
gnome_canvas_item_set ((*i), "height", ht, "y", yoff, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
|
||||
#include <vector>
|
||||
#include <sigc++/signal.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
class AutomationTimeAxisView;
|
||||
|
||||
struct GhostRegion : public sigc::trackable
|
||||
{
|
||||
AutomationTimeAxisView& trackview;
|
||||
GtkCanvasItem* group;
|
||||
GtkCanvasItem* base_rect;
|
||||
std::vector<GtkCanvasItem*> waves;
|
||||
GnomeCanvasItem* group;
|
||||
GnomeCanvasItem* base_rect;
|
||||
std::vector<GnomeCanvasItem*> waves;
|
||||
|
||||
GhostRegion (AutomationTimeAxisView& tv, double initial_unit_pos);
|
||||
~GhostRegion ();
|
||||
|
||||
@@ -141,12 +141,12 @@ gtk_custom_hruler_draw_ticks (GtkCustomRuler * ruler)
|
||||
|
||||
widget = GTK_WIDGET (ruler);
|
||||
|
||||
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
|
||||
bg_gc = widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
gc = widget->style->fg_gc[Gtk::STATE_NORMAL];
|
||||
bg_gc = widget->style->bg_gc[Gtk::STATE_NORMAL];
|
||||
font = gtk_style_get_font(widget->style);
|
||||
|
||||
gtk_paint_box (widget->style, ruler->backing_store,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
Gtk::STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
NULL, widget, "custom_hruler", 0, 0, widget->allocation.width, widget->allocation.height);
|
||||
|
||||
gdk_draw_line (ruler->backing_store, gc, 0, widget->allocation.height - 1,
|
||||
@@ -207,7 +207,7 @@ gtk_custom_hruler_draw_pos (GtkCustomRuler * ruler)
|
||||
g_return_if_fail (GTK_IS_CUSTOM_HRULER (ruler));
|
||||
if (GTK_WIDGET_DRAWABLE (ruler) && (ruler->upper - ruler->lower) > 0) {
|
||||
widget = GTK_WIDGET (ruler);
|
||||
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
|
||||
gc = widget->style->fg_gc[Gtk::STATE_NORMAL];
|
||||
xthickness = widget->style->xthickness;
|
||||
ythickness = widget->style->ythickness;
|
||||
width = widget->allocation.width;
|
||||
|
||||
@@ -255,7 +255,7 @@ gtk_custom_ruler_realize (GtkWidget * widget)
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.event_mask = gtk_widget_get_events (widget);
|
||||
attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
|
||||
attributes.event_mask |= (GDK_EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK);
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* to be best suited to display its contents, including children.
|
||||
* the width and/or height reported from a widget upon size requisition
|
||||
* may be overidden by the user by specifying a width and/or height
|
||||
* other than 0 through gtk_widget_set_usize().
|
||||
* other than 0 through gtk_widget_set_size_request().
|
||||
*
|
||||
* a scrolled window needs (for imlementing all three policy types) to
|
||||
* request its width and height based on two different rationales.
|
||||
@@ -619,7 +619,7 @@ gtk_scrolled_window_size_request (GtkWidget *widget,
|
||||
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
if (scrolled_window->hscrollbar_policy == GTK_POLICY_NEVER)
|
||||
if (scrolled_window->hscrollbar_policy == Gtk::POLICY_NEVER)
|
||||
requisition->width += child_requisition.width;
|
||||
else
|
||||
{
|
||||
@@ -635,7 +635,7 @@ gtk_scrolled_window_size_request (GtkWidget *widget,
|
||||
requisition->width += vscrollbar_requisition.width;
|
||||
}
|
||||
|
||||
// if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
|
||||
// if (scrolled_window->vscrollbar_policy == Gtk::POLICY_NEVER)
|
||||
// requisition->height += child_requisition.height;
|
||||
// else
|
||||
{
|
||||
@@ -652,7 +652,7 @@ gtk_scrolled_window_size_request (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
if (scrolled_window->hscrollbar_policy == GTK_POLICY_AUTOMATIC ||
|
||||
if (scrolled_window->hscrollbar_policy == Gtk::POLICY_AUTOMATIC ||
|
||||
scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
|
||||
{
|
||||
requisition->width = MAX (requisition->width, hscrollbar_requisition.width);
|
||||
@@ -660,7 +660,7 @@ gtk_scrolled_window_size_request (GtkWidget *widget,
|
||||
extra_height = SCROLLBAR_SPACING (scrolled_window) + hscrollbar_requisition.height;
|
||||
}
|
||||
|
||||
if (scrolled_window->vscrollbar_policy == GTK_POLICY_AUTOMATIC ||
|
||||
if (scrolled_window->vscrollbar_policy == Gtk::POLICY_AUTOMATIC ||
|
||||
scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
|
||||
{
|
||||
requisition->height = MAX (requisition->height, vscrollbar_requisition.height);
|
||||
@@ -740,11 +740,11 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (scrolled_window->hscrollbar_policy == GTK_POLICY_ALWAYS)
|
||||
scrolled_window->hscrollbar_visible = TRUE;
|
||||
else if (scrolled_window->hscrollbar_policy == GTK_POLICY_NEVER)
|
||||
else if (scrolled_window->hscrollbar_policy == Gtk::POLICY_NEVER)
|
||||
scrolled_window->hscrollbar_visible = FALSE;
|
||||
if (scrolled_window->vscrollbar_policy == GTK_POLICY_ALWAYS)
|
||||
scrolled_window->vscrollbar_visible = TRUE;
|
||||
else if (scrolled_window->vscrollbar_policy == GTK_POLICY_NEVER)
|
||||
else if (scrolled_window->vscrollbar_policy == Gtk::POLICY_NEVER)
|
||||
scrolled_window->vscrollbar_visible = FALSE;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
@@ -862,7 +862,7 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
|
||||
|
||||
if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->hscrollbar)))
|
||||
{
|
||||
if (scrolled_win->hscrollbar_policy == GTK_POLICY_AUTOMATIC)
|
||||
if (scrolled_win->hscrollbar_policy == Gtk::POLICY_AUTOMATIC)
|
||||
{
|
||||
gboolean visible;
|
||||
|
||||
@@ -875,7 +875,7 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
|
||||
}
|
||||
else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (scrolled_win->vscrollbar)))
|
||||
{
|
||||
if (scrolled_win->vscrollbar_policy == GTK_POLICY_AUTOMATIC)
|
||||
if (scrolled_win->vscrollbar_policy == Gtk::POLICY_AUTOMATIC)
|
||||
{
|
||||
gboolean visible;
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, A
|
||||
{
|
||||
_color = unique_random_color() ;
|
||||
|
||||
selection_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display), gtk_canvas_group_get_type (), NULL) ;
|
||||
gtk_canvas_item_hide(selection_group) ;
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ;
|
||||
gnome_canvas_item_hide(selection_group) ;
|
||||
|
||||
// intialize our data items
|
||||
_marked_for_display = true;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __ardour_imageframe_time_axis_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "ardour_dialog.h"
|
||||
#include "enums.h"
|
||||
|
||||
@@ -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,
|
||||
GTK_CANVAS_GROUP(_view_helper.canvas_item()),
|
||||
GNOME_CANVAS_GROUP(_view_helper.canvas_item()),
|
||||
&(_view_helper.trackview()),
|
||||
this,
|
||||
_view_helper.trackview().editor.get_current_zoom(),
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <jack/jack.h>
|
||||
#include "imageframe_time_axis_view.h"
|
||||
|
||||
|
||||
@@ -53,10 +53,10 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
|
||||
region_color = _trackview.color() ;
|
||||
stream_base_color = color_map[cImageTrackBase] ;
|
||||
|
||||
canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display), gtk_canvas_group_get_type (), 0) ;
|
||||
canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0) ;
|
||||
|
||||
canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -154,7 +154,7 @@ int
|
||||
ImageFrameTimeAxisView::set_position (gdouble x, gdouble y)
|
||||
|
||||
{
|
||||
gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <jack/jack.h>
|
||||
|
||||
class PublicEditor ;
|
||||
@@ -71,7 +71,7 @@ class ImageFrameTimeAxisView : public sigc::trackable
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem* canvas_item() { return canvas_group; }
|
||||
GnomeCanvasItem* canvas_item() { return canvas_group; }
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------//
|
||||
@@ -256,8 +256,8 @@ class ImageFrameTimeAxisView : public sigc::trackable
|
||||
/* the TimeAxisView that this object is acting as the view helper for */
|
||||
ImageFrameTimeAxis& _trackview ;
|
||||
|
||||
GtkCanvasItem *canvas_group ;
|
||||
GtkCanvasItem *canvas_rect; /* frame around the whole thing */
|
||||
GnomeCanvasItem *canvas_group ;
|
||||
GnomeCanvasItem *canvas_rect; /* frame around the whole thing */
|
||||
|
||||
/** the current samples per unit */
|
||||
double _samples_per_unit ;
|
||||
|
||||
@@ -56,7 +56,7 @@ sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
|
||||
* @param num_channels the number of color channels within rgb_data
|
||||
*/
|
||||
ImageFrameView::ImageFrameView(std::string item_id,
|
||||
GtkCanvasGroup *parent,
|
||||
GnomeCanvasGroup *parent,
|
||||
ImageFrameTimeAxis* tv,
|
||||
ImageFrameTimeAxisGroup* item_group,
|
||||
double spu,
|
||||
@@ -93,8 +93,8 @@ ImageFrameView::ImageFrameView(std::string item_id,
|
||||
double im_ratio = (double)width/(double)height ;
|
||||
int im_width = (int)((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
|
||||
|
||||
imageframe = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_imageframe_get_type(),
|
||||
imageframe = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_imageframe_get_type(),
|
||||
"pixbuf", pbuf,
|
||||
"x", (gdouble) 1.0,
|
||||
"y", (gdouble) 1.0,
|
||||
@@ -117,8 +117,8 @@ ImageFrameView::ImageFrameView(std::string item_id,
|
||||
|
||||
/* handle any specific details required by the initial start end duration values */
|
||||
|
||||
gtk_canvas_item_raise_to_top(frame_handle_start) ;
|
||||
gtk_canvas_item_raise_to_top(frame_handle_end) ;
|
||||
gnome_canvas_item_raise_to_top(frame_handle_start) ;
|
||||
gnome_canvas_item_raise_to_top(frame_handle_end) ;
|
||||
|
||||
set_position(start, this) ;
|
||||
set_duration(duration, this) ;
|
||||
@@ -230,7 +230,7 @@ ImageFrameView::set_duration(jack_nframes_t dur, void* src)
|
||||
if(ret)
|
||||
{
|
||||
/* handle setting the sizes of our canvas itesm based on the new duration */
|
||||
gtk_canvas_item_set(imageframe, "drawwidth", (gdouble) trackview.editor.frame_to_pixel(get_duration()), NULL) ;
|
||||
gnome_canvas_item_set(imageframe, "drawwidth", (gdouble) trackview.editor.frame_to_pixel(get_duration()), NULL) ;
|
||||
}
|
||||
|
||||
return(ret) ;
|
||||
@@ -278,21 +278,21 @@ ImageFrameView::set_height (gdouble h)
|
||||
// @todo might have to re-get the image data, for a large height...hmmm.
|
||||
double im_ratio = (double)image_data_width/(double)image_data_height ;
|
||||
int im_width = (int)((double)(h - TimeAxisViewItem::NAME_Y_OFFSET) * im_ratio) ;
|
||||
gtk_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
|
||||
gtk_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
|
||||
gnome_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
|
||||
gnome_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
|
||||
|
||||
|
||||
gtk_canvas_item_raise_to_top(frame) ;
|
||||
gtk_canvas_item_raise_to_top(imageframe) ;
|
||||
gtk_canvas_item_raise_to_top(name_highlight) ;
|
||||
gtk_canvas_item_raise_to_top(name_text) ;
|
||||
gtk_canvas_item_raise_to_top(frame_handle_start) ;
|
||||
gtk_canvas_item_raise_to_top(frame_handle_end) ;
|
||||
gnome_canvas_item_raise_to_top(frame) ;
|
||||
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) ;
|
||||
|
||||
gtk_canvas_item_set (name_text, "y", h - TimeAxisViewItem::NAME_Y_OFFSET, NULL);
|
||||
gtk_canvas_item_set (frame, "y2", h, NULL);
|
||||
gnome_canvas_item_set (name_text, "y", h - TimeAxisViewItem::NAME_Y_OFFSET, NULL);
|
||||
gnome_canvas_item_set (frame, "y2", h, NULL);
|
||||
|
||||
gtk_canvas_item_set (name_highlight, "y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, "y2", (gdouble) h - 1.0, NULL);
|
||||
gnome_canvas_item_set (name_highlight, "y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE, "y2", (gdouble) h - 1.0, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <list>
|
||||
|
||||
@@ -60,7 +60,7 @@ class ImageFrameView : public TimeAxisViewItem
|
||||
* @param num_channels the number of color channels within rgb_data
|
||||
*/
|
||||
ImageFrameView(std::string item_id,
|
||||
GtkCanvasGroup *parent,
|
||||
GnomeCanvasGroup *parent,
|
||||
ImageFrameTimeAxis *tv,
|
||||
ImageFrameTimeAxisGroup* group,
|
||||
double spu,
|
||||
@@ -205,7 +205,7 @@ class ImageFrameView : public TimeAxisViewItem
|
||||
// ------- Our canvas element -----------
|
||||
|
||||
/** the CanvasImageFrame to display the image */
|
||||
GtkCanvasItem* imageframe ;
|
||||
GnomeCanvasItem* imageframe ;
|
||||
|
||||
} ; /* class ImageFrameView */
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const string& annotation,
|
||||
Type type, gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame)
|
||||
Marker::Marker (PublicEditor& ed, GnomeCanvasGroup *parent, guint32 rgba, const string& annotation,
|
||||
Type type, gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame)
|
||||
|
||||
: editor (ed), _type(type)
|
||||
{
|
||||
@@ -122,7 +122,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
|
||||
switch (type) {
|
||||
case Mark:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -148,7 +148,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
|
||||
case Tempo:
|
||||
case Meter:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 3.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -173,7 +173,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case Start:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -198,7 +198,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case End:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 5.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -223,7 +223,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case LoopStart:
|
||||
points = gtk_canvas_points_new (7);
|
||||
points = gnome_canvas_points_new (7);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -251,7 +251,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case LoopEnd:
|
||||
points = gtk_canvas_points_new (7);
|
||||
points = gnome_canvas_points_new (7);
|
||||
|
||||
points->coords[0] = 8.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -279,7 +279,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case PunchIn:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -304,7 +304,7 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
break;
|
||||
|
||||
case PunchOut:
|
||||
points = gtk_canvas_points_new (6);
|
||||
points = gnome_canvas_points_new (6);
|
||||
|
||||
points->coords[0] = 0.0;
|
||||
points->coords[1] = 0.0;
|
||||
@@ -337,15 +337,15 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
|
||||
unit_position -= shift;
|
||||
|
||||
group = gtk_canvas_item_new (parent,
|
||||
gtk_canvas_group_get_type(),
|
||||
group = gnome_canvas_item_new (parent,
|
||||
gnome_canvas_group_get_type(),
|
||||
"x", unit_position,
|
||||
"y", 1.0,
|
||||
NULL);
|
||||
|
||||
// cerr << "set mark al points, nc = " << points->num_points << endl;
|
||||
mark = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"points", points,
|
||||
"fill_color_rgba", rgba,
|
||||
"outline_color", "black",
|
||||
@@ -353,8 +353,8 @@ Marker::Marker (PublicEditor& ed, GtkCanvasGroup *parent, guint32 rgba, const st
|
||||
|
||||
string fontname = get_font_for_style (N_("MarkerText"));
|
||||
|
||||
text = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_text_get_type (),
|
||||
text = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_text_get_type (),
|
||||
"text", annotation.c_str(),
|
||||
"x", label_offset,
|
||||
"y", 0.0,
|
||||
@@ -373,13 +373,13 @@ Marker::~Marker ()
|
||||
{
|
||||
/* destroying the group destroys its contents */
|
||||
gtk_object_destroy (GTK_OBJECT(group));
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set_name (const string& name)
|
||||
{
|
||||
gtk_canvas_item_set (text, "text", name.c_str(), NULL);
|
||||
gnome_canvas_item_set (text, "text", name.c_str(), NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -387,7 +387,7 @@ Marker::set_position (jack_nframes_t frame)
|
||||
{
|
||||
double new_unit_position = editor.frame_to_unit (frame);
|
||||
new_unit_position -= shift;
|
||||
gtk_canvas_item_move (group, new_unit_position - unit_position, 0.0);
|
||||
gnome_canvas_item_move (group, new_unit_position - unit_position, 0.0);
|
||||
frame_position = frame;
|
||||
unit_position = new_unit_position;
|
||||
}
|
||||
@@ -401,26 +401,26 @@ Marker::reposition ()
|
||||
void
|
||||
Marker::show ()
|
||||
{
|
||||
gtk_canvas_item_show (group);
|
||||
gnome_canvas_item_show (group);
|
||||
}
|
||||
|
||||
void
|
||||
Marker::hide ()
|
||||
{
|
||||
gtk_canvas_item_hide (group);
|
||||
gnome_canvas_item_hide (group);
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set_color_rgba (uint32_t color)
|
||||
{
|
||||
gtk_canvas_item_set (mark, "fill_color_rgba", color, NULL);
|
||||
gnome_canvas_item_set (mark, "fill_color_rgba", color, NULL);
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
TempoMarker::TempoMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
TempoMarker::TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
ARDOUR::TempoSection& temp,
|
||||
gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer))
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
|
||||
: Marker (editor, parent, rgba, text, Tempo, callback, 0),
|
||||
_tempo (temp)
|
||||
{
|
||||
@@ -434,9 +434,9 @@ TempoMarker::~TempoMarker ()
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
MeterMarker::MeterMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
MeterMarker::MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text,
|
||||
ARDOUR::MeterSection& m,
|
||||
gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer))
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer))
|
||||
: Marker (editor, parent, rgba, text, Meter, callback, 0),
|
||||
_meter (m)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
#include <glib.h>
|
||||
#include <ardour/ardour.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
@@ -49,8 +49,8 @@ class Marker : public sigc::trackable
|
||||
PunchOut
|
||||
};
|
||||
|
||||
Marker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, Type,
|
||||
gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
|
||||
Marker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, Type,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
|
||||
virtual ~Marker ();
|
||||
|
||||
void set_position (jack_nframes_t);
|
||||
@@ -65,10 +65,10 @@ class Marker : public sigc::trackable
|
||||
protected:
|
||||
PublicEditor& editor;
|
||||
|
||||
GtkCanvasItem *group;
|
||||
GtkCanvasItem *mark;
|
||||
GtkCanvasItem *text;
|
||||
GtkCanvasPoints *points;
|
||||
GnomeCanvasItem *group;
|
||||
GnomeCanvasItem *mark;
|
||||
GnomeCanvasItem *text;
|
||||
GnomeCanvasPoints *points;
|
||||
|
||||
double unit_position;
|
||||
jack_nframes_t frame_position;
|
||||
@@ -81,8 +81,8 @@ class Marker : public sigc::trackable
|
||||
class TempoMarker : public Marker
|
||||
{
|
||||
public:
|
||||
TempoMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
|
||||
gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer));
|
||||
TempoMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
|
||||
~TempoMarker ();
|
||||
|
||||
ARDOUR::TempoSection& tempo() const { return _tempo; }
|
||||
@@ -94,8 +94,8 @@ class TempoMarker : public Marker
|
||||
class MeterMarker : public Marker
|
||||
{
|
||||
public:
|
||||
MeterMarker (PublicEditor& editor, GtkCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
|
||||
gint (*callback)(GtkCanvasItem *, GdkEvent *, gpointer));
|
||||
MeterMarker (PublicEditor& editor, GnomeCanvasGroup *parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
|
||||
gint (*callback)(GnomeCanvasItem *, GdkEvent *, gpointer));
|
||||
~MeterMarker ();
|
||||
|
||||
ARDOUR::MeterSection& meter() const { return _meter; }
|
||||
|
||||
@@ -65,8 +65,8 @@ MarkerTimeAxis::MarkerTimeAxis (PublicEditor& ed, ARDOUR::Session& sess, Widget
|
||||
_color = unique_random_color() ;
|
||||
time_axis_name = name ;
|
||||
|
||||
selection_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display), gtk_canvas_group_get_type (), 0) ;
|
||||
gtk_canvas_item_hide(selection_group) ;
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), 0) ;
|
||||
gnome_canvas_item_hide(selection_group) ;
|
||||
|
||||
// intialize our data items
|
||||
name_prompter = 0 ;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __ardour_marker_time_axis_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include "ardour_dialog.h"
|
||||
#include "route_ui.h"
|
||||
|
||||
@@ -52,10 +52,10 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
||||
region_color = _trackview.color();
|
||||
stream_base_color = color_map[cMarkerTrackBase];
|
||||
|
||||
canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display), gtk_canvas_group_get_type (), 0);
|
||||
canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
|
||||
|
||||
canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -142,7 +142,7 @@ MarkerTimeAxisView::set_height(gdouble h)
|
||||
int
|
||||
MarkerTimeAxisView::set_position(gdouble x, gdouble y)
|
||||
{
|
||||
gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ MarkerTimeAxisView::add_marker_view(ImageFrameView* ifv, std::string mark_type,
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
MarkerView* mv = new MarkerView(GTK_CANVAS_GROUP(canvas_group),
|
||||
MarkerView* mv = new MarkerView(GNOME_CANVAS_GROUP(canvas_group),
|
||||
&_trackview,
|
||||
ifv,
|
||||
_trackview.editor.get_current_zoom(),
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <list>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include <ardour/location.h>
|
||||
|
||||
@@ -73,7 +73,7 @@ class MarkerTimeAxisView : public sigc::trackable
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem *canvas_item() { return canvas_group; }
|
||||
GnomeCanvasItem *canvas_item() { return canvas_group; }
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------//
|
||||
@@ -224,8 +224,8 @@ class MarkerTimeAxisView : public sigc::trackable
|
||||
/* the TimeAxisView that this object is acting as the view helper for */
|
||||
MarkerTimeAxis& _trackview ;
|
||||
|
||||
GtkCanvasItem *canvas_group ;
|
||||
GtkCanvasItem *canvas_rect ; /* frame around the whole thing */
|
||||
GnomeCanvasItem *canvas_group ;
|
||||
GnomeCanvasItem *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(GtkCanvasGroup *parent,
|
||||
MarkerView::MarkerView(GnomeCanvasGroup *parent,
|
||||
TimeAxisView* tv,
|
||||
ImageFrameView* marked,
|
||||
double spu,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include "time_axis_view_item.h"
|
||||
|
||||
class MarkerTimeAxisView ;
|
||||
@@ -54,7 +54,7 @@ class MarkerView : public TimeAxisViewItem
|
||||
* @param start the start time of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
MarkerView(GtkCanvasGroup *parent,
|
||||
MarkerView(GnomeCanvasGroup *parent,
|
||||
TimeAxisView *tv,
|
||||
ImageFrameView* marked,
|
||||
double spu,
|
||||
|
||||
@@ -44,7 +44,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView ()
|
||||
}
|
||||
|
||||
void
|
||||
PanAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
PanAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
{
|
||||
if (lines.empty()) {
|
||||
/* no data, possibly caused by no outputs/inputs */
|
||||
@@ -63,7 +63,7 @@ PanAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent*
|
||||
|
||||
double x = 0;
|
||||
|
||||
gtk_canvas_item_w2i (canvas_display, &x, &y);
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
|
||||
~PanAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
private:
|
||||
void automation_changed ();
|
||||
|
||||
@@ -14,131 +14,131 @@ PublicEditor::~PublicEditor()
|
||||
}
|
||||
|
||||
gint
|
||||
PublicEditor::canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_fade_in_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_fade_in_handle_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_fade_out_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_fade_out_handle_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_crossfade_view_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_region_view_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_region_view_name_highlight_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_region_view_name_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_stream_view_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_automation_track_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_automation_track_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_automation_track_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_marker_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_zoom_rect_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_selection_rect_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_selection_start_trim_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_selection_end_trim_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_control_point_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_line_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_tempo_marker_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_meter_marker_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_tempo_bar_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_meter_bar_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_marker_bar_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_range_marker_bar_event (item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_transport_marker_bar_event (item, event, data);
|
||||
}
|
||||
|
||||
gint
|
||||
PublicEditor::canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_imageframe_item_view_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_imageframe_view_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_imageframe_start_handle_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_imageframe_end_handle_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_marker_time_axis_view_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_markerview_item_view_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_markerview_start_handle_event(item, event, data);
|
||||
}
|
||||
gint
|
||||
PublicEditor::canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
PublicEditor::canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) {
|
||||
return instance()->_canvas_markerview_end_handle_event(item, event, data);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <string>
|
||||
#include <glib.h>
|
||||
#include <gdk/gdktypes.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm/window.h>
|
||||
#include <jack/types.h>
|
||||
#include <sigc++/signal.h>
|
||||
@@ -114,72 +114,72 @@ class PublicEditor : public Gtk::Window, public Stateful, public KeyboardTarget
|
||||
sigc::signal<void> XOriginChanged;
|
||||
sigc::signal<void> Resized;
|
||||
|
||||
static gint canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_automation_track_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data);
|
||||
static gint canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
static gint canvas_automation_track_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) ;
|
||||
|
||||
protected:
|
||||
virtual gint _canvas_fade_in_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_in_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_out_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_out_handle_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_crossfade_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_name_highlight_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_name_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_stream_view_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_zoom_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_rect_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_start_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_end_trim_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_control_point_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_line_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_tempo_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_meter_marker_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_tempo_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_meter_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_range_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_transport_marker_bar_event (GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_item_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_view_event(GtkCanvasItem *item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_time_axis_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_item_view_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_start_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_end_handle_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_automation_track_event(GtkCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_in_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_in_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_out_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_fade_out_handle_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_crossfade_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_name_highlight_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_region_view_name_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_stream_view_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_zoom_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_rect_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_start_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_selection_end_trim_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_control_point_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_line_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_tempo_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_meter_marker_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_tempo_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_meter_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_range_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_transport_marker_bar_event (GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_item_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_view_event(GnomeCanvasItem *item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_imageframe_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_marker_time_axis_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_item_view_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_start_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_markerview_end_handle_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
virtual gint _canvas_automation_track_event(GnomeCanvasItem* item, GdkEvent* event, gpointer data) = 0;
|
||||
|
||||
static PublicEditor* _instance;
|
||||
};
|
||||
|
||||
@@ -34,10 +34,10 @@ using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s,
|
||||
TimeAxisView& tv, GtkCanvasItem* parent,
|
||||
TimeAxisView& tv, GnomeCanvasItem* parent,
|
||||
AutomationList& l,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
|
||||
: AutomationLine (name, tv, parent, l, point_callback, line_callback),
|
||||
session (s),
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __ardour_gtk_redirect_automation_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include "automation_line.h"
|
||||
@@ -37,10 +37,10 @@ class TimeAxisView;
|
||||
class RedirectAutomationLine : public AutomationLine
|
||||
{
|
||||
public:
|
||||
RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, GtkCanvasItem* parent,
|
||||
RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&, GnomeCanvasItem* parent,
|
||||
ARDOUR::AutomationList&,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer));
|
||||
|
||||
uint32_t port() const { return _port; }
|
||||
ARDOUR::Redirect& redirect() const { return _redirect; }
|
||||
|
||||
@@ -70,11 +70,11 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
|
||||
}
|
||||
|
||||
void
|
||||
RedirectAutomationTimeAxisView::add_automation_event (GtkCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
RedirectAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y)
|
||||
{
|
||||
double x = 0;
|
||||
|
||||
gtk_canvas_item_w2i (canvas_display, &x, &y);
|
||||
gnome_canvas_item_w2i (canvas_display, &x, &y);
|
||||
|
||||
/* compute vertical fractional position */
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
||||
|
||||
~RedirectAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
||||
void hide ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <map>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
|
||||
#include "audio_clock.h"
|
||||
|
||||
@@ -17,15 +17,15 @@
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
||||
AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, GtkCanvasItem* parent,
|
||||
AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, GnomeCanvasItem* parent,
|
||||
Curve& c,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer))
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, GdkEvent*, gpointer))
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback),
|
||||
session (s),
|
||||
rv (r)
|
||||
{
|
||||
gtk_canvas_item_raise_to_top (group);
|
||||
gnome_canvas_item_raise_to_top (group);
|
||||
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 <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.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&, GtkCanvasItem* parent,
|
||||
AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, GnomeCanvasItem* parent,
|
||||
ARDOUR::Curve&,
|
||||
gint (*point_callback)(GtkCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GtkCanvasItem*, GdkEvent*, gpointer));
|
||||
gint (*point_callback)(GnomeCanvasItem*, GdkEvent*, gpointer),
|
||||
gint (*line_callback)(GnomeCanvasItem*, 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 (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
AudioRegionView::AudioRegionView (GnomeCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
AudioRegion& r,
|
||||
double spu,
|
||||
double amplitude_above_axis,
|
||||
@@ -69,7 +69,7 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
|
||||
region (r)
|
||||
{
|
||||
GtkCanvasPoints *shape;
|
||||
GnomeCanvasPoints *shape;
|
||||
XMLNode *node;
|
||||
|
||||
editor = 0;
|
||||
@@ -100,7 +100,7 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this);
|
||||
gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this);
|
||||
|
||||
shape = gtk_canvas_points_new (4);
|
||||
shape = gnome_canvas_points_new (4);
|
||||
|
||||
/* an equilateral triangle */
|
||||
|
||||
@@ -117,23 +117,23 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
shape->coords[7] = 1;
|
||||
|
||||
// cerr << "set sync mark al points, nc = " << shape->num_points << endl;
|
||||
sync_mark = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
sync_mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_polygon_get_type(),
|
||||
"points", shape,
|
||||
"fill_color_rgba", fill_color,
|
||||
NULL);
|
||||
gtk_canvas_item_hide (sync_mark);
|
||||
gtk_canvas_points_unref (shape);
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
gnome_canvas_points_unref (shape);
|
||||
|
||||
|
||||
fade_in_shape = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
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 = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_polygon_get_type(),
|
||||
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);
|
||||
@@ -145,8 +145,8 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
|
||||
|
||||
|
||||
fade_in_handle = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -154,8 +154,8 @@ AudioRegionView::AudioRegionView (GtkCanvasGroup *parent, AudioTimeAxisView &tv,
|
||||
NULL);
|
||||
gtk_object_set_data (GTK_OBJECT(fade_in_handle), "regionview", this);
|
||||
|
||||
fade_out_handle = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -234,8 +234,8 @@ AudioRegionView::~AudioRegionView ()
|
||||
|
||||
AudioRegionViewGoingAway (this); /* EMIT_SIGNAL */
|
||||
|
||||
for (vector<GtkCanvasWaveViewCache *>::iterator cache = wave_caches.begin(); cache != wave_caches.end() ; ++cache) {
|
||||
gtk_canvas_waveview_cache_destroy (*cache);
|
||||
for (vector<GnomeCanvasWaveViewCache *>::iterator cache = wave_caches.begin(); cache != wave_caches.end() ; ++cache) {
|
||||
gnome_canvas_waveview_cache_destroy (*cache);
|
||||
}
|
||||
|
||||
/* all waveviews will be destroyed when the group is destroyed */
|
||||
@@ -252,7 +252,7 @@ AudioRegionView::~AudioRegionView ()
|
||||
}
|
||||
|
||||
gint
|
||||
AudioRegionView::_lock_toggle (GtkCanvasItem* item, GdkEvent* ev, void* arg)
|
||||
AudioRegionView::_lock_toggle (GnomeCanvasItem* item, GdkEvent* ev, void* arg)
|
||||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_RELEASE:
|
||||
@@ -351,14 +351,14 @@ AudioRegionView::fade_in_active_changed ()
|
||||
|
||||
if (region.fade_in_active()) {
|
||||
col = RGBA_TO_UINT(r,g,b,120);
|
||||
gtk_canvas_item_set (fade_in_shape,
|
||||
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);
|
||||
} else {
|
||||
col = RGBA_TO_UINT(r,g,b,0);
|
||||
gtk_canvas_item_set (fade_in_shape,
|
||||
gnome_canvas_item_set (fade_in_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 1,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
|
||||
@@ -375,14 +375,14 @@ AudioRegionView::fade_out_active_changed ()
|
||||
|
||||
if (region.fade_out_active()) {
|
||||
col = RGBA_TO_UINT(r,g,b,120);
|
||||
gtk_canvas_item_set (fade_out_shape,
|
||||
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);
|
||||
} else {
|
||||
col = RGBA_TO_UINT(r,g,b,0);
|
||||
gtk_canvas_item_set (fade_out_shape,
|
||||
gnome_canvas_item_set (fade_out_shape,
|
||||
"fill_color_rgba", col,
|
||||
"width_pixels", 1,
|
||||
"outline_color_rgba", RGBA_TO_UINT(r,g,b,255),
|
||||
@@ -398,7 +398,7 @@ AudioRegionView::region_scale_amplitude_changed ()
|
||||
|
||||
for (uint32_t n = 0; n < waves.size(); ++n) {
|
||||
// force a reload of the cache
|
||||
gtk_canvas_item_set (waves[n], "data_src", ®ion, NULL);
|
||||
gnome_canvas_item_set (waves[n], "data_src", ®ion, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,15 +427,15 @@ AudioRegionView::region_resized (Change what_changed)
|
||||
reset_width_dependent_items (unit_length);
|
||||
|
||||
for (uint32_t n = 0; n < waves.size(); ++n) {
|
||||
gtk_canvas_item_set (waves[n], "region_start", (guint32) region.start(), NULL);
|
||||
gnome_canvas_item_set (waves[n], "region_start", (guint32) region.start(), NULL);
|
||||
}
|
||||
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
|
||||
(*i)->set_duration (unit_length);
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
|
||||
gtk_canvas_item_set ((*w), "region_start", region.start(), NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
|
||||
gnome_canvas_item_set ((*w), "region_start", region.start(), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,19 +448,19 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
|
||||
_pixel_width = pixel_width;
|
||||
|
||||
if (zero_line) {
|
||||
gtk_canvas_item_set (zero_line, "x2", pixel_width - 1.0, NULL);
|
||||
gnome_canvas_item_set (zero_line, "x2", pixel_width - 1.0, NULL);
|
||||
}
|
||||
|
||||
if (pixel_width <= 6.0) {
|
||||
gtk_canvas_item_hide (fade_in_handle);
|
||||
gtk_canvas_item_hide (fade_out_handle);
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
} else {
|
||||
if (_height < 5.0) {
|
||||
gtk_canvas_item_hide (fade_in_handle);
|
||||
gtk_canvas_item_hide (fade_out_handle);
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
} else {
|
||||
gtk_canvas_item_show (fade_in_handle);
|
||||
gtk_canvas_item_show (fade_out_handle);
|
||||
gnome_canvas_item_show (fade_in_handle);
|
||||
gnome_canvas_item_show (fade_out_handle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,9 +482,9 @@ AudioRegionView::region_muted ()
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
if (region.muted()) {
|
||||
gtk_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
|
||||
gnome_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
|
||||
} else {
|
||||
gtk_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
|
||||
gnome_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,7 +535,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) {
|
||||
gtk_canvas_item_move ((*i)->group, delta, 0.0);
|
||||
gnome_canvas_item_move ((*i)->group, delta, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -562,8 +562,8 @@ AudioRegionView::set_height (gdouble height)
|
||||
|
||||
gdouble yoff = n * (ht+1);
|
||||
|
||||
gtk_canvas_item_set (waves[n], "height", ht, NULL);
|
||||
gtk_canvas_item_set (waves[n], "y", yoff + 2, NULL);
|
||||
gnome_canvas_item_set (waves[n], "height", ht, NULL);
|
||||
gnome_canvas_item_set (waves[n], "y", yoff + 2, NULL);
|
||||
}
|
||||
|
||||
if ((height/wcnt) < NAME_HIGHLIGHT_SIZE) {
|
||||
@@ -578,7 +578,7 @@ AudioRegionView::set_height (gdouble height)
|
||||
gain_line->set_height ((uint32_t) rint (height - NAME_HIGHLIGHT_SIZE));
|
||||
reset_fade_shapes ();
|
||||
|
||||
gtk_canvas_item_raise_to_top (name_text) ;
|
||||
gnome_canvas_item_raise_to_top (name_text) ;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -590,13 +590,13 @@ AudioRegionView::manage_zero_line ()
|
||||
|
||||
if (_height >= 100) {
|
||||
gdouble wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
|
||||
gtk_canvas_item_set (zero_line,
|
||||
gnome_canvas_item_set (zero_line,
|
||||
"y1", wave_midpoint,
|
||||
"y2", wave_midpoint,
|
||||
NULL);
|
||||
gtk_canvas_item_show (zero_line);
|
||||
gnome_canvas_item_show (zero_line);
|
||||
} else {
|
||||
gtk_canvas_item_hide (zero_line);
|
||||
gnome_canvas_item_hide (zero_line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,14 +620,14 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
|
||||
GtkCanvasPoints* points;
|
||||
GnomeCanvasPoints* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
|
||||
double h;
|
||||
|
||||
if (_height < 5) {
|
||||
gtk_canvas_item_hide (fade_in_shape);
|
||||
gtk_canvas_item_hide (fade_in_handle);
|
||||
gnome_canvas_item_hide (fade_in_shape);
|
||||
gnome_canvas_item_hide (fade_in_handle);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -640,17 +640,17 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
||||
handle_center = 3.0;
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (fade_in_handle,
|
||||
gnome_canvas_item_set (fade_in_handle,
|
||||
"x1", handle_center - 3.0,
|
||||
"x2", handle_center + 3.0,
|
||||
NULL);
|
||||
|
||||
if (pwidth < 5) {
|
||||
gtk_canvas_item_hide (fade_in_shape);
|
||||
gnome_canvas_item_hide (fade_in_shape);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_canvas_item_show (fade_in_shape);
|
||||
gnome_canvas_item_show (fade_in_shape);
|
||||
|
||||
float curve[npoints];
|
||||
region.fade_in().get_vector (0, region.fade_in().back()->when, curve, npoints);
|
||||
@@ -686,8 +686,8 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
|
||||
points->coords[pi++] = points->coords[0];
|
||||
points->coords[pi] = points->coords[1];
|
||||
|
||||
gtk_canvas_item_set (fade_in_shape, "points", points, NULL);
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_item_set (fade_in_shape, "points", points, NULL);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -703,14 +703,14 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
|
||||
width = std::max ((jack_nframes_t) 64, width);
|
||||
|
||||
GtkCanvasPoints* points;
|
||||
GnomeCanvasPoints* points;
|
||||
double pwidth = width / samples_per_unit;
|
||||
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
|
||||
double h;
|
||||
|
||||
if (_height < 5) {
|
||||
gtk_canvas_item_hide (fade_out_shape);
|
||||
gtk_canvas_item_hide (fade_out_handle);
|
||||
gnome_canvas_item_hide (fade_out_shape);
|
||||
gnome_canvas_item_hide (fade_out_handle);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -723,7 +723,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
handle_center = 3.0;
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (fade_out_handle,
|
||||
gnome_canvas_item_set (fade_out_handle,
|
||||
"x1", handle_center - 3.0,
|
||||
"x2", handle_center + 3.0,
|
||||
NULL);
|
||||
@@ -731,11 +731,11 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
/* don't show shape if its too small */
|
||||
|
||||
if (pwidth < 5) {
|
||||
gtk_canvas_item_hide (fade_out_shape);
|
||||
gnome_canvas_item_hide (fade_out_shape);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_canvas_item_show (fade_out_shape);
|
||||
gnome_canvas_item_show (fade_out_shape);
|
||||
|
||||
float curve[npoints];
|
||||
region.fade_out().get_vector (0, region.fade_out().back()->when, curve, npoints);
|
||||
@@ -771,8 +771,8 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
|
||||
points->coords[pi++] = points->coords[0];
|
||||
points->coords[pi] = points->coords[1];
|
||||
|
||||
gtk_canvas_item_set (fade_out_shape, "points", points, NULL);
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_item_set (fade_out_shape, "points", points, NULL);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -781,7 +781,7 @@ AudioRegionView::set_samples_per_unit (gdouble spu)
|
||||
TimeAxisViewItem::set_samples_per_unit (spu);
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
gtk_canvas_item_set (waves[n], "samples_per_unit", spu, NULL);
|
||||
gnome_canvas_item_set (waves[n], "samples_per_unit", spu, NULL);
|
||||
}
|
||||
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
@@ -812,7 +812,7 @@ void
|
||||
AudioRegionView::set_amplitude_above_axis (gdouble spp)
|
||||
{
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
gtk_canvas_item_set (waves[n], "amplitude_above_axis", spp, NULL);
|
||||
gnome_canvas_item_set (waves[n], "amplitude_above_axis", spp, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,13 +834,13 @@ AudioRegionView::set_colors ()
|
||||
TimeAxisViewItem::set_colors ();
|
||||
|
||||
gain_line->set_line_color (region.envelope_active() ? color_map[cGainLine] : color_map[cGainLineInactive]);
|
||||
gtk_canvas_item_set (sync_mark, "fill_color_rgba", fill_color, NULL);
|
||||
gnome_canvas_item_set (sync_mark, "fill_color_rgba", fill_color, NULL);
|
||||
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
if (region.muted()) {
|
||||
gtk_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
|
||||
gnome_canvas_item_set (waves[n], "wave_color", color_map[cMutedWaveForm], NULL);
|
||||
} else {
|
||||
gtk_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
|
||||
gnome_canvas_item_set (waves[n], "wave_color", color_map[cWaveForm], NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -915,7 +915,7 @@ AudioRegionView::region_sync_changed ()
|
||||
|
||||
/* no sync mark - its the start of the region */
|
||||
|
||||
gtk_canvas_item_hide (sync_mark);
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -923,19 +923,19 @@ AudioRegionView::region_sync_changed ()
|
||||
|
||||
/* no sync mark - its out of the bounds of the region */
|
||||
|
||||
gtk_canvas_item_hide (sync_mark);
|
||||
gnome_canvas_item_hide (sync_mark);
|
||||
|
||||
} else {
|
||||
|
||||
/* lets do it */
|
||||
|
||||
GtkArg args[1];
|
||||
GtkCanvasPoints* points;
|
||||
GnomeCanvasPoints* points;
|
||||
|
||||
args[0].name = X_("points");
|
||||
|
||||
gtk_object_getv (GTK_OBJECT(sync_mark), 1, args);
|
||||
points = static_cast<GtkCanvasPoints *> (GTK_VALUE_POINTER(args[0]));
|
||||
points = static_cast<GnomeCanvasPoints *> (GTK_VALUE_POINTER(args[0]));
|
||||
|
||||
double offset = sync_offset / samples_per_unit;
|
||||
|
||||
@@ -951,10 +951,10 @@ AudioRegionView::region_sync_changed ()
|
||||
points->coords[6] = offset - ((sync_mark_width-1)/2);
|
||||
points->coords[7] = 1;
|
||||
|
||||
gtk_canvas_item_show (sync_mark);
|
||||
gtk_canvas_item_set (sync_mark, "points", points, NULL);
|
||||
gnome_canvas_item_show (sync_mark);
|
||||
gnome_canvas_item_set (sync_mark, "points", points, NULL);
|
||||
|
||||
gtk_canvas_points_unref (points);
|
||||
gnome_canvas_points_unref (points);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -965,12 +965,12 @@ AudioRegionView::set_waveform_visible (bool yn)
|
||||
if (((_flags & WaveformVisible) != yn)) {
|
||||
if (yn) {
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
gtk_canvas_item_show (waves[n]);
|
||||
gnome_canvas_item_show (waves[n]);
|
||||
}
|
||||
_flags |= WaveformVisible;
|
||||
} else {
|
||||
for (uint32_t n=0; n < waves.size(); ++n) {
|
||||
gtk_canvas_item_hide (waves[n]);
|
||||
gnome_canvas_item_hide (waves[n]);
|
||||
}
|
||||
_flags &= ~WaveformVisible;
|
||||
}
|
||||
@@ -1033,7 +1033,7 @@ AudioRegionView::create_waves ()
|
||||
break;
|
||||
}
|
||||
|
||||
wave_caches.push_back (gtk_canvas_waveview_cache_new ());
|
||||
wave_caches.push_back (gnome_canvas_waveview_cache_new ());
|
||||
|
||||
if (wait_for_waves) {
|
||||
if (region.source(n).peaks_ready (bind (mem_fun(*this, &AudioRegionView::peaks_ready_handler), n))) {
|
||||
@@ -1047,8 +1047,8 @@ AudioRegionView::create_waves ()
|
||||
}
|
||||
|
||||
if (create_zero_line) {
|
||||
zero_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simpleline_get_type(),
|
||||
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],
|
||||
@@ -1073,8 +1073,8 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
||||
}
|
||||
gdouble yoff = which * ht;
|
||||
|
||||
GtkCanvasItem *wave = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_waveview_get_type (),
|
||||
GnomeCanvasItem *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_waveview_get_type (),
|
||||
"data_src", (gpointer) ®ion,
|
||||
"cache", wave_caches[which],
|
||||
"cache_updater", (gboolean) true,
|
||||
@@ -1092,7 +1092,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
||||
NULL);
|
||||
|
||||
if (!(_flags & WaveformVisible)) {
|
||||
gtk_canvas_item_hide (wave);
|
||||
gnome_canvas_item_hide (wave);
|
||||
}
|
||||
|
||||
/* note: calling this function is serialized by the lock
|
||||
@@ -1122,8 +1122,8 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
|
||||
tmp_waves.clear ();
|
||||
|
||||
if (!zero_line) {
|
||||
zero_line = gtk_canvas_item_new (GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simpleline_get_type(),
|
||||
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],
|
||||
@@ -1140,7 +1140,7 @@ AudioRegionView::peaks_ready_handler (uint32_t which)
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
|
||||
AudioRegionView::add_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
||||
{
|
||||
double x, y;
|
||||
|
||||
@@ -1151,7 +1151,7 @@ AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
|
||||
x = ev->button.x;
|
||||
y = ev->button.y;
|
||||
|
||||
gtk_canvas_item_w2i (item, &x, &y);
|
||||
gnome_canvas_item_w2i (item, &x, &y);
|
||||
|
||||
jack_nframes_t fx = trackview.editor.pixel_to_frame (x);
|
||||
|
||||
@@ -1184,7 +1184,7 @@ AudioRegionView::add_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
|
||||
}
|
||||
|
||||
void
|
||||
AudioRegionView::remove_gain_point_event (GtkCanvasItem *item, GdkEvent *ev)
|
||||
AudioRegionView::remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *ev)
|
||||
{
|
||||
ControlPoint *cp = reinterpret_cast<ControlPoint *> (gtk_object_get_data(GTK_OBJECT(item), "control_point"));
|
||||
region.envelope().erase (cp->model);
|
||||
@@ -1239,15 +1239,15 @@ AudioRegionView::set_waveform_shape (WaveformShape shape)
|
||||
}
|
||||
|
||||
if (yn != (bool) (_flags & WaveformRectified)) {
|
||||
for (vector<GtkCanvasItem *>::iterator wave = waves.begin(); wave != waves.end() ; ++wave) {
|
||||
gtk_canvas_item_set ((*wave), "rectified", (gboolean) yn, NULL);
|
||||
for (vector<GnomeCanvasItem *>::iterator wave = waves.begin(); wave != waves.end() ; ++wave) {
|
||||
gnome_canvas_item_set ((*wave), "rectified", (gboolean) yn, NULL);
|
||||
}
|
||||
|
||||
if (zero_line) {
|
||||
if (yn) {
|
||||
gtk_canvas_item_hide (zero_line);
|
||||
gnome_canvas_item_hide (zero_line);
|
||||
} else {
|
||||
gtk_canvas_item_show (zero_line);
|
||||
gnome_canvas_item_show (zero_line);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1272,12 +1272,12 @@ AudioRegionView::move (double x_delta, double y_delta)
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_canvas_item_move (get_canvas_group(), x_delta, y_delta);
|
||||
gnome_canvas_item_move (get_canvas_group(), 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) {
|
||||
gtk_canvas_item_move ((*i)->group, x_delta, 0.0);
|
||||
gnome_canvas_item_move ((*i)->group, x_delta, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1297,8 +1297,8 @@ AudioRegionView::add_ghost (AutomationTimeAxisView& atv)
|
||||
break;
|
||||
}
|
||||
|
||||
GtkCanvasItem *wave = gtk_canvas_item_new (GTK_CANVAS_GROUP(ghost->group),
|
||||
gtk_canvas_waveview_get_type (),
|
||||
GnomeCanvasItem *wave = gnome_canvas_item_new (GNOME_CANVAS_GROUP(ghost->group),
|
||||
gnome_canvas_waveview_get_type (),
|
||||
"data_src", (gpointer) ®ion,
|
||||
"cache", wave_caches[n],
|
||||
"cache_updater", (gboolean) false,
|
||||
@@ -1358,8 +1358,8 @@ AudioRegionView::entered ()
|
||||
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
|
||||
a=255;
|
||||
|
||||
gtk_canvas_item_set (fade_in_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
gtk_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
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);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1371,8 +1371,8 @@ AudioRegionView::exited ()
|
||||
UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
|
||||
a=0;
|
||||
|
||||
gtk_canvas_item_set (fade_in_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
gtk_canvas_item_set (fade_out_handle, "fill_color_rgba", RGBA_TO_UINT(r,g,b,a), NULL);
|
||||
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);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1389,15 +1389,15 @@ AudioRegionView::set_waveview_data_src()
|
||||
|
||||
for (uint32_t n = 0; n < waves.size(); ++n) {
|
||||
// TODO: something else to let it know the channel
|
||||
gtk_canvas_item_set (waves[n], "data_src", ®ion, NULL);
|
||||
gnome_canvas_item_set (waves[n], "data_src", ®ion, NULL);
|
||||
}
|
||||
|
||||
for (vector<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
|
||||
|
||||
(*i)->set_duration (unit_length);
|
||||
|
||||
for (vector<GtkCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
|
||||
gtk_canvas_item_set ((*w), "data_src", ®ion, NULL);
|
||||
for (vector<GnomeCanvasItem*>::iterator w = (*i)->waves.begin(); w != (*i)->waves.end(); ++w) {
|
||||
gnome_canvas_item_set ((*w), "data_src", ®ion, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <sigc++/signal.h>
|
||||
#include <ardour/region.h>
|
||||
|
||||
@@ -46,7 +46,7 @@ class AutomationTimeAxisView;
|
||||
class AudioRegionView : public TimeAxisViewItem
|
||||
{
|
||||
public:
|
||||
AudioRegionView (GtkCanvasGroup *,
|
||||
AudioRegionView (GnomeCanvasGroup *,
|
||||
AudioTimeAxisView&,
|
||||
ARDOUR::AudioRegion&,
|
||||
double initial_samples_per_unit,
|
||||
@@ -89,8 +89,8 @@ class AudioRegionView : public TimeAxisViewItem
|
||||
void show_region_editor ();
|
||||
void hide_region_editor();
|
||||
|
||||
void add_gain_point_event (GtkCanvasItem *item, GdkEvent *event);
|
||||
void remove_gain_point_event (GtkCanvasItem *item, GdkEvent *event);
|
||||
void add_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
|
||||
void remove_gain_point_event (GnomeCanvasItem *item, GdkEvent *event);
|
||||
|
||||
AudioRegionGainLine* get_gain_line() const { return gain_line; }
|
||||
|
||||
@@ -120,15 +120,15 @@ class AudioRegionView : public TimeAxisViewItem
|
||||
WaveformRectified = 0x8
|
||||
};
|
||||
|
||||
vector<GtkCanvasItem *> waves; /* waveviews */
|
||||
vector<GtkCanvasItem *> tmp_waves; /* see ::create_waves()*/
|
||||
GtkCanvasItem* sync_mark; /* polgyon for sync position */
|
||||
GtkCanvasItem* no_wave_msg; /* text */
|
||||
GtkCanvasItem* zero_line; /* simpleline */
|
||||
GtkCanvasItem* fade_in_shape; /* polygon */
|
||||
GtkCanvasItem* fade_out_shape; /* polygon */
|
||||
GtkCanvasItem* fade_in_handle; /* simplerect */
|
||||
GtkCanvasItem* fade_out_handle; /* simplerect */
|
||||
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 */
|
||||
|
||||
AudioRegionGainLine* gain_line;
|
||||
AudioRegionEditor *editor;
|
||||
@@ -163,7 +163,7 @@ class AudioRegionView : public TimeAxisViewItem
|
||||
void region_sync_changed ();
|
||||
void region_scale_amplitude_changed ();
|
||||
|
||||
static gint _lock_toggle (GtkCanvasItem*, GdkEvent*, void*);
|
||||
static gint _lock_toggle (GnomeCanvasItem*, GdkEvent*, void*);
|
||||
void lock_toggle ();
|
||||
|
||||
void create_waves ();
|
||||
@@ -180,7 +180,7 @@ class AudioRegionView : public TimeAxisViewItem
|
||||
void reset_width_dependent_items (double pixel_width);
|
||||
void set_waveview_data_src();
|
||||
|
||||
vector<GtkCanvasWaveViewCache*> wave_caches;
|
||||
vector<GnomeCanvasWaveViewCache*> wave_caches;
|
||||
vector<GhostRegion*> ghosts;
|
||||
};
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
|
||||
{ \
|
||||
GtkCanvasBuf* ph_buf = (inbuf); \
|
||||
GnomeCanvasBuf* ph_buf = (inbuf); \
|
||||
guchar* ph_p; \
|
||||
gint ph_a0, ph_a1; \
|
||||
gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
|
||||
@@ -144,7 +144,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define FAST_PAINT_HORIZ(inbuf, colr, colg, colb, ptx0, ptx1, pty) \
|
||||
{ \
|
||||
GtkCanvasBuf* ph_buf = (inbuf); \
|
||||
GnomeCanvasBuf* ph_buf = (inbuf); \
|
||||
guchar* ph_p; \
|
||||
gint ph_a0, ph_a1; \
|
||||
gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb); \
|
||||
@@ -163,7 +163,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define PAINT_HORIZA(inbuf, colr, colg, colb, cola, ptx0, ptx1, pty) \
|
||||
{ \
|
||||
GtkCanvasBuf* ph_buf = (inbuf); \
|
||||
GnomeCanvasBuf* ph_buf = (inbuf); \
|
||||
guchar* ph_p; \
|
||||
gint ph_a0, ph_a1; \
|
||||
gint ph_colr=(colr), ph_colg=(colg), ph_colb=(colb), ph_cola=(cola); \
|
||||
@@ -182,7 +182,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
|
||||
{ \
|
||||
GtkCanvasBuf* pv_buf = (inbuf); \
|
||||
GnomeCanvasBuf* pv_buf = (inbuf); \
|
||||
guchar* pv_p; \
|
||||
gint pv_b0, pv_b1; \
|
||||
gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb);\
|
||||
@@ -201,7 +201,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define FAST_PAINT_VERT(inbuf, colr, colg, colb, ptx, pty0, pty1) \
|
||||
{ \
|
||||
GtkCanvasBuf* fpv_buf = (inbuf); \
|
||||
GnomeCanvasBuf* fpv_buf = (inbuf); \
|
||||
guchar* fpv_p; \
|
||||
gint fpv_b0, fpv_b1; \
|
||||
\
|
||||
@@ -218,7 +218,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
}
|
||||
#define PAINT_VERTA(inbuf, colr, colg, colb, cola, ptx, pty0, pty1) \
|
||||
{ \
|
||||
GtkCanvasBuf* pv_buf = (inbuf); \
|
||||
GnomeCanvasBuf* pv_buf = (inbuf); \
|
||||
guchar* pv_p; \
|
||||
gint pv_b0, pv_b1; \
|
||||
gint pv_colr=(colr), pv_colg=(colg), pv_colb=(colb), pv_cola=(cola);\
|
||||
@@ -236,12 +236,12 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
} \
|
||||
}
|
||||
|
||||
/* Paint a solid-colored box into a GtkCanvasBuf (clipping as necessary).
|
||||
/* Paint a solid-colored box into a GnomeCanvasBuf (clipping as necessary).
|
||||
The box contains (ptx0,pty0), but not (ptx1, pty1).
|
||||
Each macro arg should appear exactly once in the body of the code. */
|
||||
#define PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
|
||||
{ \
|
||||
GtkCanvasBuf* pb_buf = (inbuf); \
|
||||
GnomeCanvasBuf* pb_buf = (inbuf); \
|
||||
guchar* pb_p; \
|
||||
guchar* pb_pp; \
|
||||
gint pb_a0, pb_a1, pb_b0, pb_b1, pb_i, pb_j; \
|
||||
@@ -269,7 +269,7 @@ UINT_TO_RGB((i), ((guchar*)p), ((guchar*)p)+1, ((guchar*)p)+2)
|
||||
|
||||
#define FAST_PAINT_BOX(inbuf, colr, colg, colb, cola, ptx0, pty0, ptx1, pty1) \
|
||||
{ \
|
||||
GtkCanvasBuf* pb_buf = (inbuf); \
|
||||
GnomeCanvasBuf* pb_buf = (inbuf); \
|
||||
guchar* pb_p; \
|
||||
guchar* pb_pp; \
|
||||
gint pb_i, pb_j; \
|
||||
|
||||
@@ -46,12 +46,12 @@ StreamView::StreamView (AudioTimeAxisView& tv)
|
||||
|
||||
/* set_position() will position the group */
|
||||
|
||||
canvas_group = gtk_canvas_item_new (GTK_CANVAS_GROUP(_trackview.canvas_display),
|
||||
gtk_canvas_group_get_type (),
|
||||
canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
|
||||
gnome_canvas_group_get_type (),
|
||||
NULL);
|
||||
|
||||
canvas_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
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,
|
||||
@@ -100,7 +100,7 @@ int
|
||||
StreamView::set_position (gdouble x, gdouble y)
|
||||
|
||||
{
|
||||
gtk_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
gnome_canvas_item_set (canvas_group, "x", x, "y", y, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -156,8 +156,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 );
|
||||
|
||||
gtk_canvas_item_set (recbox.rectangle, "x1", xstart, NULL);
|
||||
gtk_canvas_item_set (recbox.rectangle, "x2", xend, NULL);
|
||||
gnome_canvas_item_set (recbox.rectangle, "x1", xstart, NULL);
|
||||
gnome_canvas_item_set (recbox.rectangle, "x2", xend, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -213,7 +213,7 @@ StreamView::add_region_view_internal (Region *r, bool wait_for_waves)
|
||||
}
|
||||
}
|
||||
|
||||
region_view = new AudioRegionView (GTK_CANVAS_GROUP(canvas_group),
|
||||
region_view = new AudioRegionView (GNOME_CANVAS_GROUP(canvas_group),
|
||||
_trackview,
|
||||
*region,
|
||||
_samples_per_unit,
|
||||
@@ -329,7 +329,7 @@ StreamView::playlist_modified ()
|
||||
}
|
||||
|
||||
for (list<CrossfadeView *>::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) {
|
||||
gtk_canvas_item_raise_to_top ((*i)->get_canvas_group());
|
||||
gnome_canvas_item_raise_to_top ((*i)->get_canvas_group());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ StreamView::add_crossfade (Crossfade *crossfade)
|
||||
}
|
||||
}
|
||||
|
||||
CrossfadeView *cv = new CrossfadeView (GTK_CANVAS_GROUP(_trackview.canvas_display),
|
||||
CrossfadeView *cv = new CrossfadeView (GNOME_CANVAS_GROUP(_trackview.canvas_display),
|
||||
_trackview,
|
||||
*crossfade,
|
||||
_samples_per_unit,
|
||||
@@ -508,12 +508,12 @@ StreamView::apply_color (GdkColor& color, ColorTarget target)
|
||||
(*i)->set_color (region_color);
|
||||
}
|
||||
// stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
|
||||
// gtk_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
// gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
break;
|
||||
|
||||
case StreamBaseColor:
|
||||
// stream_base_color = RGBA_TO_UINT (color.red/256, color.green/256, color.blue/256, 255);
|
||||
// gtk_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
// gnome_canvas_item_set (canvas_rect, "fill_color_rgba", stream_base_color, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -576,13 +576,13 @@ StreamView::set_waveform_shape (WaveformShape shape)
|
||||
void
|
||||
StreamView::region_layered (AudioRegionView* rv)
|
||||
{
|
||||
gtk_canvas_item_lower_to_bottom (rv->get_canvas_group());
|
||||
gnome_canvas_item_lower_to_bottom (rv->get_canvas_group());
|
||||
|
||||
/* don't ever leave it at the bottom, since then it doesn't
|
||||
get events - the parent group does instead ...
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise (rv->get_canvas_group(), rv->region.layer() + 1);
|
||||
gnome_canvas_item_raise (rv->get_canvas_group(), rv->region.layer() + 1);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -660,8 +660,8 @@ StreamView::setup_rec_box ()
|
||||
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
|
||||
gdouble xend = xstart;
|
||||
|
||||
GtkCanvasItem * rec_rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
GnomeCanvasItem * rec_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", xstart,
|
||||
"y1", 1.0,
|
||||
"x2", xend,
|
||||
@@ -755,8 +755,8 @@ StreamView::update_rec_box ()
|
||||
gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
|
||||
gdouble xend = _trackview.editor.frame_to_pixel ( at );
|
||||
|
||||
gtk_canvas_item_set (rect.rectangle, "x1", xstart, NULL);
|
||||
gtk_canvas_item_set (rect.rectangle, "x2", xend, NULL);
|
||||
gnome_canvas_item_set (rect.rectangle, "x1", xstart, NULL);
|
||||
gnome_canvas_item_set (rect.rectangle, "x2", xend, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,7 +821,7 @@ StreamView::update_rec_regions ()
|
||||
tmp = iter;
|
||||
++tmp;
|
||||
|
||||
if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GTK_CANVAS_ITEM_VISIBLE) == 0) {
|
||||
if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GNOME_CANVAS_ITEM_VISIBLE) == 0) {
|
||||
/* rect already hidden, this region is done */
|
||||
iter = tmp;
|
||||
continue;
|
||||
@@ -849,9 +849,9 @@ StreamView::update_rec_regions ()
|
||||
}
|
||||
|
||||
/* also update rect */
|
||||
GtkCanvasItem * rect = rec_rects[n].rectangle;
|
||||
GnomeCanvasItem * rect = rec_rects[n].rectangle;
|
||||
gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
|
||||
gtk_canvas_item_set (rect, "x2", xend, NULL);
|
||||
gnome_canvas_item_set (rect, "x2", xend, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -874,8 +874,8 @@ StreamView::update_rec_regions ()
|
||||
}
|
||||
|
||||
/* also hide rect */
|
||||
GtkCanvasItem * rect = rec_rects[n].rectangle;
|
||||
gtk_canvas_item_hide (rect);
|
||||
GnomeCanvasItem * rect = rec_rects[n].rectangle;
|
||||
gnome_canvas_item_hide (rect);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include <ardour/location.h>
|
||||
#include "enums.h"
|
||||
@@ -41,7 +41,7 @@ namespace ARDOUR {
|
||||
}
|
||||
|
||||
struct RecBoxInfo {
|
||||
GtkCanvasItem* rectangle;
|
||||
GnomeCanvasItem* rectangle;
|
||||
jack_nframes_t start;
|
||||
jack_nframes_t length;
|
||||
};
|
||||
@@ -78,7 +78,7 @@ class StreamView : public sigc::trackable
|
||||
void set_show_waveforms (bool yn);
|
||||
void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
|
||||
|
||||
GtkCanvasItem* canvas_item() { return canvas_group; }
|
||||
GnomeCanvasItem* canvas_item() { return canvas_group; }
|
||||
|
||||
sigc::signal<void,AudioRegionView*> AudioRegionViewAdded;
|
||||
|
||||
@@ -110,8 +110,8 @@ class StreamView : public sigc::trackable
|
||||
private:
|
||||
AudioTimeAxisView& _trackview;
|
||||
|
||||
GtkCanvasItem* canvas_group;
|
||||
GtkCanvasItem* canvas_rect; /* frame around the whole thing */
|
||||
GnomeCanvasItem* canvas_group;
|
||||
GnomeCanvasItem* canvas_rect; /* frame around the whole thing */
|
||||
|
||||
typedef list<AudioRegionView* > AudioRegionViewList;
|
||||
AudioRegionViewList region_views;
|
||||
|
||||
@@ -58,16 +58,16 @@ TimeAxisView::TimeAxisView(ARDOUR::Session& sess, PublicEditor& ed, TimeAxisView
|
||||
editor(ed),
|
||||
controls_table (2, 9)
|
||||
{
|
||||
canvas_display = gtk_canvas_item_new (gtk_canvas_root(GTK_CANVAS(canvas->gobj())),
|
||||
gtk_canvas_group_get_type(),
|
||||
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 = gtk_canvas_item_new (GTK_CANVAS_GROUP(canvas_display),
|
||||
gtk_canvas_group_get_type (),
|
||||
selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
gnome_canvas_group_get_type (),
|
||||
NULL);
|
||||
gtk_canvas_item_hide (selection_group);
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
|
||||
control_parent = 0;
|
||||
display_menu = 0;
|
||||
@@ -199,13 +199,13 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
||||
item's parent ...
|
||||
*/
|
||||
|
||||
gtk_canvas_item_get_bounds (canvas_display, &ix1, &iy1, &ix2, &iy2);
|
||||
gtk_canvas_item_i2w (canvas_display->parent, &ix1, &iy1);
|
||||
gnome_canvas_item_get_bounds (canvas_display, &ix1, &iy1, &ix2, &iy2);
|
||||
gnome_canvas_item_i2w (canvas_display->parent, &ix1, &iy1);
|
||||
if (iy1 < 0) {
|
||||
iy1 = 0;
|
||||
}
|
||||
gtk_canvas_item_move (canvas_display, 0.0, y - iy1);
|
||||
gtk_canvas_item_show (canvas_display); /* XXX not necessary */
|
||||
gnome_canvas_item_move (canvas_display, 0.0, y - iy1);
|
||||
gnome_canvas_item_show (canvas_display); /* XXX not necessary */
|
||||
|
||||
y_position = y;
|
||||
order = nth;
|
||||
@@ -218,10 +218,10 @@ 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()) {
|
||||
gtk_canvas_item_show ((*i)->canvas_display);
|
||||
gnome_canvas_item_show ((*i)->canvas_display);
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GTK_CANVAS_ITEM_VISIBLE) {
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
++nth;
|
||||
effective_height += (*i)->show_at (y + effective_height, nth, parent);
|
||||
}
|
||||
@@ -288,7 +288,7 @@ TimeAxisView::hide ()
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_canvas_item_hide (canvas_display);
|
||||
gnome_canvas_item_hide (canvas_display);
|
||||
controls_frame.hide ();
|
||||
|
||||
if (control_parent) {
|
||||
@@ -344,7 +344,7 @@ TimeAxisView::set_height (TrackHeight h)
|
||||
height = (guint32) h;
|
||||
controls_frame.set_size_request (-1, height);
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
/* resize the selection rect */
|
||||
show_selection (editor.get_selection().time);
|
||||
}
|
||||
@@ -498,19 +498,19 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
||||
(*i)->show_selection (ts);
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
while (!used_selection_rects.empty()) {
|
||||
free_selection_rects.push_front (used_selection_rects.front());
|
||||
used_selection_rects.pop_front();
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->rect);
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->rect);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
}
|
||||
gtk_canvas_item_hide (selection_group);
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
}
|
||||
|
||||
gtk_canvas_item_show (selection_group);
|
||||
gtk_canvas_item_raise_to_top (selection_group);
|
||||
gnome_canvas_item_show (selection_group);
|
||||
gnome_canvas_item_raise_to_top (selection_group);
|
||||
|
||||
for (list<AudioRange>::iterator i = ts.begin(); i != ts.end(); ++i) {
|
||||
jack_nframes_t start, end, cnt;
|
||||
@@ -547,14 +547,14 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
||||
"x2", x2,
|
||||
"y2", 1.0 + trim_handle_size,
|
||||
NULL);
|
||||
gtk_canvas_item_show (rect->start_trim);
|
||||
gtk_canvas_item_show (rect->end_trim);
|
||||
gnome_canvas_item_show (rect->start_trim);
|
||||
gnome_canvas_item_show (rect->end_trim);
|
||||
} else {
|
||||
gtk_canvas_item_hide (rect->start_trim);
|
||||
gtk_canvas_item_hide (rect->end_trim);
|
||||
gnome_canvas_item_hide (rect->start_trim);
|
||||
gnome_canvas_item_hide (rect->end_trim);
|
||||
}
|
||||
|
||||
gtk_canvas_item_show (rect->rect);
|
||||
gnome_canvas_item_show (rect->rect);
|
||||
used_selection_rects.push_back (rect);
|
||||
}
|
||||
}
|
||||
@@ -572,15 +572,15 @@ TimeAxisView::reshow_selection (TimeSelection& ts)
|
||||
void
|
||||
TimeAxisView::hide_selection ()
|
||||
{
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GTK_CANVAS_ITEM_VISIBLE) {
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
while (!used_selection_rects.empty()) {
|
||||
free_selection_rects.push_front (used_selection_rects.front());
|
||||
used_selection_rects.pop_front();
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->rect);
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gtk_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->rect);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->start_trim);
|
||||
gnome_canvas_item_hide (free_selection_rects.front()->end_trim);
|
||||
}
|
||||
gtk_canvas_item_hide (selection_group);
|
||||
gnome_canvas_item_hide (selection_group);
|
||||
}
|
||||
|
||||
for (vector<TimeAxisView*>::iterator i = children.begin(); i != children.end(); ++i) {
|
||||
@@ -589,7 +589,7 @@ TimeAxisView::hide_selection ()
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisView::order_selection_trims (GtkCanvasItem *item, bool put_start_on_top)
|
||||
TimeAxisView::order_selection_trims (GnomeCanvasItem *item, bool put_start_on_top)
|
||||
{
|
||||
/* find the selection rect this is for. we have the item corresponding to one
|
||||
of the trim handles.
|
||||
@@ -602,9 +602,9 @@ TimeAxisView::order_selection_trims (GtkCanvasItem *item, bool put_start_on_top)
|
||||
the top one is the one last used.
|
||||
*/
|
||||
|
||||
gtk_canvas_item_raise_to_top ((*i)->rect);
|
||||
gtk_canvas_item_raise_to_top (put_start_on_top ? (*i)->start_trim : (*i)->end_trim);
|
||||
gtk_canvas_item_raise_to_top (put_start_on_top ? (*i)->end_trim : (*i)->start_trim);
|
||||
gnome_canvas_item_raise_to_top ((*i)->rect);
|
||||
gnome_canvas_item_raise_to_top (put_start_on_top ? (*i)->start_trim : (*i)->end_trim);
|
||||
gnome_canvas_item_raise_to_top (put_start_on_top ? (*i)->end_trim : (*i)->start_trim);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -639,8 +639,8 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
||||
|
||||
rect = new SelectionRect;
|
||||
|
||||
rect->rect = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
rect->rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
@@ -650,16 +650,16 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
||||
NULL);
|
||||
|
||||
|
||||
rect->start_trim = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
rect->start_trim = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (gdouble) 0.0,
|
||||
"x2", (gdouble) 0.0,
|
||||
"fill_color_rgba" , color_map[cSelectionStartFill],
|
||||
"outline_color_rgba" , color_map[cSelectionStartOutline],
|
||||
NULL);
|
||||
|
||||
rect->end_trim = gtk_canvas_item_new (GTK_CANVAS_GROUP(selection_group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
rect->end_trim = gnome_canvas_item_new (GNOME_CANVAS_GROUP(selection_group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"x2", 0.0,
|
||||
"fill_color_rgba" , color_map[cSelectionEndFill],
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <list>
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
|
||||
#include <ardour/types.h>
|
||||
#include <ardour/region.h>
|
||||
@@ -87,7 +87,7 @@ class TimeAxisView : public virtual AxisView
|
||||
int order;
|
||||
|
||||
|
||||
GtkCanvasItem *canvas_display;
|
||||
GnomeCanvasItem *canvas_display;
|
||||
Gtk::VBox *control_parent;
|
||||
|
||||
/* The Standard LHS Controls */
|
||||
@@ -168,7 +168,7 @@ class TimeAxisView : public virtual AxisView
|
||||
return 0;
|
||||
}
|
||||
|
||||
void order_selection_trims (GtkCanvasItem *item, bool put_start_on_top);
|
||||
void order_selection_trims (GnomeCanvasItem *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 +272,7 @@ class TimeAxisView : public virtual AxisView
|
||||
|
||||
/* selection display */
|
||||
|
||||
GtkCanvasItem *selection_group;
|
||||
GnomeCanvasItem *selection_group;
|
||||
|
||||
list<SelectionRect*> free_selection_rects;
|
||||
list<SelectionRect*> used_selection_rects;
|
||||
|
||||
@@ -60,7 +60,7 @@ const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ;
|
||||
* @param start the start point of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
|
||||
TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
|
||||
jack_nframes_t start, jack_nframes_t duration,
|
||||
Visibility visibility)
|
||||
: trackview (tv)
|
||||
@@ -85,10 +85,10 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
warning << "Time Axis Item Duration == 0" << endl ;
|
||||
}
|
||||
|
||||
group = gtk_canvas_item_new(GTK_CANVAS_GROUP(parent),gtk_canvas_group_get_type(),NULL) ;
|
||||
group = gnome_canvas_item_new(GNOME_CANVAS_GROUP(parent),gnome_canvas_group_get_type(),NULL) ;
|
||||
|
||||
vestigial_frame = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
vestigial_frame = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) 0.0,
|
||||
"y1", (double) 1.0,
|
||||
"x2", 2.0,
|
||||
@@ -96,11 +96,11 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
"outline_color_rgba", color_map[cVestigialFrameOutline],
|
||||
"fill_color_rgba", color_map[cVestigialFrameFill],
|
||||
NULL);
|
||||
gtk_canvas_item_hide (vestigial_frame);
|
||||
gnome_canvas_item_hide (vestigial_frame);
|
||||
|
||||
if (visibility & ShowFrame) {
|
||||
frame = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
frame = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) 0.0,
|
||||
"y1", (double) 1.0,
|
||||
"x2", (double) trackview.editor.frame_to_pixel(duration),
|
||||
@@ -113,8 +113,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
}
|
||||
|
||||
if (visibility & ShowNameHighlight) {
|
||||
name_highlight = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
name_highlight = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) 1.0,
|
||||
"x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1,
|
||||
"y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
|
||||
@@ -128,8 +128,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
}
|
||||
|
||||
if (visibility & ShowNameText) {
|
||||
name_text = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_text_get_type(),
|
||||
name_text = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_text_get_type(),
|
||||
"x", (double) TimeAxisViewItem::NAME_X_OFFSET,
|
||||
"y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET,
|
||||
"font", NAME_FONT.c_str(),
|
||||
@@ -144,8 +144,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
/* create our grab handles used for trimming/duration etc */
|
||||
|
||||
if (visibility & ShowHandles) {
|
||||
frame_handle_start = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
frame_handle_start = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) 0.0,
|
||||
"x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH,
|
||||
"y1", (double) 1.0,
|
||||
@@ -154,8 +154,8 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent,
|
||||
"fill_color_rgba", color_map[cFrameHandleStartFill],
|
||||
NULL) ;
|
||||
|
||||
frame_handle_end = gtk_canvas_item_new(GTK_CANVAS_GROUP(group),
|
||||
gtk_canvas_simplerect_get_type(),
|
||||
frame_handle_end = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH),
|
||||
"x2", (double) trackview.editor.frame_to_pixel(get_duration()),
|
||||
"y1", (double) 1,
|
||||
@@ -203,11 +203,11 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
|
||||
|
||||
frame_position = pos;
|
||||
|
||||
/* This sucks. The GtkCanvas version I am using
|
||||
doesn't correctly implement gtk_canvas_group_set_arg(),
|
||||
/* This sucks. The GnomeCanvas version I am using
|
||||
doesn't correctly implement gnome_canvas_group_set_arg(),
|
||||
so that simply setting the "x" arg of the group
|
||||
fails to move the group. Instead, we have to
|
||||
use gtk_canvas_item_move(), which does the right
|
||||
use gnome_canvas_item_move(), which does the right
|
||||
thing. I see that in GNOME CVS, the current (Sept 2001)
|
||||
version of GNOME Canvas rectifies this issue cleanly.
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ TimeAxisViewItem::set_position(jack_nframes_t pos, void* src, double* delta)
|
||||
old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
|
||||
|
||||
if (new_unit_pos != old_unit_pos) {
|
||||
gtk_canvas_item_move (group, new_unit_pos - old_unit_pos, 0.0) ;
|
||||
gnome_canvas_item_move (group, new_unit_pos - old_unit_pos, 0.0) ;
|
||||
}
|
||||
|
||||
if (delta) {
|
||||
@@ -261,7 +261,7 @@ TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
|
||||
}
|
||||
|
||||
if (dur == 0) {
|
||||
gtk_canvas_item_hide (group);
|
||||
gnome_canvas_item_hide (group);
|
||||
}
|
||||
|
||||
item_duration = dur;
|
||||
@@ -500,7 +500,7 @@ void
|
||||
TimeAxisViewItem::set_name_text(std::string new_name)
|
||||
{
|
||||
if (name_text) {
|
||||
gtk_canvas_item_set (name_text, "text", new_name.c_str(), NULL);
|
||||
gnome_canvas_item_set (name_text, "text", new_name.c_str(), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,22 +514,22 @@ TimeAxisViewItem::set_height(double height)
|
||||
{
|
||||
if (name_highlight) {
|
||||
if (height < NAME_HIGHLIGHT_THRESH) {
|
||||
gtk_canvas_item_hide (name_highlight);
|
||||
gtk_canvas_item_hide (name_text);
|
||||
gnome_canvas_item_hide (name_highlight);
|
||||
gnome_canvas_item_hide (name_text);
|
||||
} else {
|
||||
gtk_canvas_item_show (name_highlight);
|
||||
gtk_canvas_item_show (name_text);
|
||||
gnome_canvas_item_show (name_highlight);
|
||||
gnome_canvas_item_show (name_text);
|
||||
}
|
||||
|
||||
if (height > NAME_HIGHLIGHT_SIZE) {
|
||||
gtk_canvas_item_set (name_highlight,
|
||||
gnome_canvas_item_set (name_highlight,
|
||||
"y1", (double) height+1 - NAME_HIGHLIGHT_SIZE,
|
||||
"y2", (double) height,
|
||||
NULL);
|
||||
}
|
||||
else {
|
||||
/* it gets hidden now anyway */
|
||||
gtk_canvas_item_set (name_highlight,
|
||||
gnome_canvas_item_set (name_highlight,
|
||||
"y1", (double) 1.0,
|
||||
"y2", (double) height,
|
||||
NULL);
|
||||
@@ -537,20 +537,20 @@ TimeAxisViewItem::set_height(double height)
|
||||
}
|
||||
|
||||
if (name_text) {
|
||||
gtk_canvas_item_set (name_text, "y", height+1 - NAME_Y_OFFSET, NULL);
|
||||
gnome_canvas_item_set (name_text, "y", height+1 - NAME_Y_OFFSET, NULL);
|
||||
if (height < NAME_HIGHLIGHT_THRESH) {
|
||||
gtk_canvas_item_set(name_text, "fill_color_rgba", fill_color, NULL) ;
|
||||
gnome_canvas_item_set(name_text, "fill_color_rgba", fill_color, NULL) ;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
|
||||
gnome_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
gtk_canvas_item_set (frame, "y2", height+1, NULL) ;
|
||||
gnome_canvas_item_set (frame, "y2", height+1, NULL) ;
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (vestigial_frame, "y2", height+1, NULL) ;
|
||||
gnome_canvas_item_set (vestigial_frame, "y2", height+1, NULL) ;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -566,7 +566,7 @@ TimeAxisViewItem::set_color(GdkColor& base_color)
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem*
|
||||
GnomeCanvasItem*
|
||||
TimeAxisViewItem::get_canvas_frame()
|
||||
{
|
||||
return(frame) ;
|
||||
@@ -575,7 +575,7 @@ TimeAxisViewItem::get_canvas_frame()
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem*
|
||||
GnomeCanvasItem*
|
||||
TimeAxisViewItem::get_canvas_group()
|
||||
{
|
||||
return(group) ;
|
||||
@@ -584,7 +584,7 @@ TimeAxisViewItem::get_canvas_group()
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem*
|
||||
GnomeCanvasItem*
|
||||
TimeAxisViewItem::get_name_highlight()
|
||||
{
|
||||
return(name_highlight) ;
|
||||
@@ -593,7 +593,7 @@ TimeAxisViewItem::get_name_highlight()
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem*
|
||||
GnomeCanvasItem*
|
||||
TimeAxisViewItem::get_name_text()
|
||||
{
|
||||
return(name_text) ;
|
||||
@@ -711,16 +711,16 @@ TimeAxisViewItem::set_colors()
|
||||
}
|
||||
|
||||
if (height < NAME_HIGHLIGHT_THRESH) {
|
||||
gtk_canvas_item_set(name_text, "fill_color_rgba", fill_color, NULL) ;
|
||||
gnome_canvas_item_set(name_text, "fill_color_rgba", fill_color, NULL) ;
|
||||
}
|
||||
else {
|
||||
gtk_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
|
||||
gnome_canvas_item_set(name_text, "fill_color_rgba", label_color, NULL) ;
|
||||
}
|
||||
}
|
||||
|
||||
if (name_highlight) {
|
||||
gtk_canvas_item_set(name_highlight, "fill_color_rgba", fill_color, NULL) ;
|
||||
gtk_canvas_item_set(name_highlight, "outline_color_rgba", fill_color, NULL) ;
|
||||
gnome_canvas_item_set(name_highlight, "fill_color_rgba", fill_color, NULL) ;
|
||||
gnome_canvas_item_set(name_highlight, "outline_color_rgba", fill_color, NULL) ;
|
||||
}
|
||||
set_trim_handle_colors() ;
|
||||
}
|
||||
@@ -736,10 +736,10 @@ TimeAxisViewItem::set_frame_color()
|
||||
|
||||
if (_selected && should_show_selection) {
|
||||
UINT_TO_RGBA(color_map[cSelectedFrameBase], &r, &g, &b, &a);
|
||||
gtk_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
|
||||
gnome_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
|
||||
} else {
|
||||
UINT_TO_RGBA(color_map[cFrameBase], &r, &g, &b, &a);
|
||||
gtk_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
|
||||
gnome_canvas_item_set(frame, "fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity), NULL) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -753,11 +753,11 @@ TimeAxisViewItem::set_trim_handle_colors()
|
||||
{
|
||||
if (frame_handle_start) {
|
||||
if (position_locked) {
|
||||
gtk_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleLockedStart], NULL);
|
||||
gtk_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleLockedEnd], NULL) ;
|
||||
gnome_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleLockedStart], NULL);
|
||||
gnome_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleLockedEnd], NULL) ;
|
||||
} else {
|
||||
gtk_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleStart], NULL) ;
|
||||
gtk_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleEnd], NULL) ;
|
||||
gnome_canvas_item_set(frame_handle_start, "fill_color_rgba", color_map[cTrimHandleStart], NULL) ;
|
||||
gnome_canvas_item_set(frame_handle_end, "fill_color_rgba", color_map[cTrimHandleEnd], NULL) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -782,32 +782,32 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
||||
if (pixel_width < GRAB_HANDLE_LENGTH * 2) {
|
||||
|
||||
if (frame_handle_start) {
|
||||
gtk_canvas_item_hide (frame_handle_start);
|
||||
gtk_canvas_item_hide (frame_handle_end);
|
||||
gnome_canvas_item_hide (frame_handle_start);
|
||||
gnome_canvas_item_hide (frame_handle_end);
|
||||
}
|
||||
|
||||
} if (pixel_width < 2.0) {
|
||||
|
||||
if (show_vestigial) {
|
||||
gtk_canvas_item_show (vestigial_frame);
|
||||
gnome_canvas_item_show (vestigial_frame);
|
||||
}
|
||||
|
||||
if (name_highlight) {
|
||||
gtk_canvas_item_hide (name_highlight);
|
||||
gtk_canvas_item_hide (name_text);
|
||||
gnome_canvas_item_hide (name_highlight);
|
||||
gnome_canvas_item_hide (name_text);
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
gtk_canvas_item_hide (frame);
|
||||
gnome_canvas_item_hide (frame);
|
||||
}
|
||||
|
||||
if (frame_handle_start) {
|
||||
gtk_canvas_item_hide (frame_handle_start);
|
||||
gtk_canvas_item_hide (frame_handle_end);
|
||||
gnome_canvas_item_hide (frame_handle_start);
|
||||
gnome_canvas_item_hide (frame_handle_end);
|
||||
}
|
||||
|
||||
} else {
|
||||
gtk_canvas_item_hide (vestigial_frame);
|
||||
gnome_canvas_item_hide (vestigial_frame);
|
||||
|
||||
if (name_highlight) {
|
||||
|
||||
@@ -817,31 +817,31 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
|
||||
double height = GTK_VALUE_DOUBLE (args[0]);
|
||||
|
||||
if (height < NAME_HIGHLIGHT_THRESH) {
|
||||
gtk_canvas_item_hide (name_highlight);
|
||||
gtk_canvas_item_hide (name_text);
|
||||
gnome_canvas_item_hide (name_highlight);
|
||||
gnome_canvas_item_hide (name_text);
|
||||
} else {
|
||||
gtk_canvas_item_show (name_highlight);
|
||||
gtk_canvas_item_show (name_text);
|
||||
gnome_canvas_item_show (name_highlight);
|
||||
gnome_canvas_item_show (name_text);
|
||||
reset_name_width (pixel_width);
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (name_highlight, "x2", pixel_width - 1.0, NULL);
|
||||
gnome_canvas_item_set (name_highlight, "x2", pixel_width - 1.0, NULL);
|
||||
}
|
||||
|
||||
if (frame) {
|
||||
gtk_canvas_item_show (frame);
|
||||
gtk_canvas_item_set (frame, "x2", pixel_width, NULL);
|
||||
gnome_canvas_item_show (frame);
|
||||
gnome_canvas_item_set (frame, "x2", pixel_width, NULL);
|
||||
}
|
||||
|
||||
if (frame_handle_start) {
|
||||
if (pixel_width < (2*TimeAxisViewItem::GRAB_HANDLE_LENGTH)) {
|
||||
gtk_canvas_item_hide (frame_handle_start);
|
||||
gtk_canvas_item_hide (frame_handle_end);
|
||||
gnome_canvas_item_hide (frame_handle_start);
|
||||
gnome_canvas_item_hide (frame_handle_end);
|
||||
}
|
||||
gtk_canvas_item_show (frame_handle_start);
|
||||
gtk_canvas_item_set(GTK_CANVAS_ITEM(frame_handle_end), "x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH ), NULL) ;
|
||||
gtk_canvas_item_show (frame_handle_end);
|
||||
gtk_canvas_item_set(GTK_CANVAS_ITEM(frame_handle_end), "x2", pixel_width, NULL) ;
|
||||
gnome_canvas_item_show (frame_handle_start);
|
||||
gnome_canvas_item_set(GNOME_CANVAS_ITEM(frame_handle_end), "x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH ), NULL) ;
|
||||
gnome_canvas_item_show (frame_handle_end);
|
||||
gnome_canvas_item_set(GNOME_CANVAS_ITEM(frame_handle_end), "x2", pixel_width, NULL) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -885,7 +885,7 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
|
||||
|
||||
if (namelen == 0) {
|
||||
|
||||
gtk_canvas_item_hide (name_text);
|
||||
gnome_canvas_item_hide (name_text);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -903,8 +903,8 @@ TimeAxisViewItem::reset_name_width (double pixel_width)
|
||||
}
|
||||
}
|
||||
|
||||
gtk_canvas_item_set (name_text, "text", cstr, NULL);
|
||||
gtk_canvas_item_show (name_text);
|
||||
gnome_canvas_item_set (name_text, "text", cstr, NULL);
|
||||
gnome_canvas_item_show (name_text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __gtk_ardour_time_axis_view_item_h__
|
||||
|
||||
#include <sigc++/signal.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <jack/jack.h>
|
||||
#include <string>
|
||||
|
||||
@@ -220,22 +220,22 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem* get_canvas_frame() ;
|
||||
GnomeCanvasItem* get_canvas_frame() ;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem* get_canvas_group();
|
||||
GnomeCanvasItem* get_canvas_group();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem* get_name_highlight();
|
||||
GnomeCanvasItem* get_name_highlight();
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
GtkCanvasItem* get_name_text();
|
||||
GnomeCanvasItem* get_name_text();
|
||||
|
||||
/**
|
||||
* Sets the samples per unit of this item.
|
||||
@@ -334,7 +334,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
|
||||
* @param start the start point of this item
|
||||
* @param duration the duration of this item
|
||||
*/
|
||||
TimeAxisViewItem(std::string it_name, GtkCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
|
||||
TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
|
||||
jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
|
||||
|
||||
/**
|
||||
@@ -440,13 +440,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
|
||||
uint32_t lock_handle_color_g ;
|
||||
uint32_t lock_handle_color_b ;
|
||||
|
||||
GtkCanvasItem* group ; /* the group */
|
||||
GtkCanvasItem* vestigial_frame ; /* simplerect */
|
||||
GtkCanvasItem* frame ; /* simplerect */
|
||||
GtkCanvasItem* name_text ; /* text */
|
||||
GtkCanvasItem* name_highlight ; /* simplerect */
|
||||
GtkCanvasItem* frame_handle_start ; /* simplerect */
|
||||
GtkCanvasItem* frame_handle_end ; /* simplerect */
|
||||
GnomeCanvasItem* group ; /* the group */
|
||||
GnomeCanvasItem* vestigial_frame ; /* simplerect */
|
||||
GnomeCanvasItem* frame ; /* simplerect */
|
||||
GnomeCanvasItem* name_text ; /* text */
|
||||
GnomeCanvasItem* name_highlight ; /* simplerect */
|
||||
GnomeCanvasItem* frame_handle_start ; /* simplerect */
|
||||
GnomeCanvasItem* frame_handle_end ; /* simplerect */
|
||||
|
||||
}; /* class TimeAxisViewItem */
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
|
||||
return (savergb);
|
||||
}
|
||||
|
||||
GtkCanvasPoints*
|
||||
GnomeCanvasPoints*
|
||||
get_canvas_points (string who, uint32_t npoints)
|
||||
{
|
||||
// cerr << who << ": wants " << npoints << " canvas points" << endl;
|
||||
@@ -322,7 +322,7 @@ get_canvas_points (string who, uint32_t npoints)
|
||||
abort ();
|
||||
}
|
||||
#endif
|
||||
return gtk_canvas_points_new (npoints);
|
||||
return gnome_canvas_points_new (npoints);
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <ardour/types.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <gdk--/types.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gdkmm/types.h>
|
||||
|
||||
namespace Gtk {
|
||||
class Window;
|
||||
@@ -63,7 +63,7 @@ void allow_keyboard_focus (bool);
|
||||
unsigned char* xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h);
|
||||
unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h);
|
||||
|
||||
GtkCanvasPoints* get_canvas_points (std::string who, uint32_t npoints);
|
||||
GnomeCanvasPoints* get_canvas_points (std::string who, uint32_t npoints);
|
||||
|
||||
int channel_combo_get_channel_count (Gtk::Combo& combo);
|
||||
std::string get_font_for_style (std::string widgetname);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define __ardour_visual_time_axis_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <gtk-canvas.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <gtkmm2ext/popup_selector.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user