mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
mega commit to remove gtk_object cruft, and much other stuff
git-svn-id: svn://localhost/trunk/ardour2@139 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d6a27c9537
commit
2b49b2433b
30 changed files with 402 additions and 704 deletions
|
|
@ -89,6 +89,7 @@ editing.cc
|
|||
editor.cc
|
||||
editor_actions.cc
|
||||
editor_audiotrack.cc
|
||||
editor_canvas.cc
|
||||
editor_canvas_events.cc
|
||||
editor_cursors.cc
|
||||
editor_edit_groups.cc
|
||||
|
|
|
|||
|
|
@ -55,9 +55,13 @@ ActionManager::init ()
|
|||
} catch (Glib::MarkupError& err) {
|
||||
error << "badly formatted UI definition file" << endmsg;
|
||||
} catch (...) {
|
||||
std::cerr << "ardour action xml file not found" << endl;
|
||||
cerr << "ardour action xml file not found" << endl;
|
||||
}
|
||||
|
||||
RefPtr<ActionGroup> grp = ActionGroup::create ("misc");
|
||||
register_action (grp, "null", "relax");
|
||||
|
||||
ui_manager->insert_action_group (grp);
|
||||
}
|
||||
|
||||
RefPtr<Action>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,7 @@
|
|||
<ui>
|
||||
|
||||
<popup name='ShuttleUnitsMenu'>
|
||||
<menuitem action='SetShuttleUnitsSemitones'/>
|
||||
<menuitem action='SetShuttleUnitsPercentage'/>
|
||||
</popup>
|
||||
|
||||
<popup name='ShuttleStyleMenu'>
|
||||
<menuitem action='SetShuttleActionSprung'/>
|
||||
<menuitem action='SetShuttleActionWheel'/>
|
||||
</popup>
|
||||
|
||||
<popup name='RegionListMenu'>
|
||||
<menuitem action='rlAudition'/>
|
||||
<menuitem action='rlHide'/>
|
||||
<menuitem action='rlRemove'/>
|
||||
<separator/>
|
||||
<menuitem action='rlShowAll'/>
|
||||
<separator/>
|
||||
<menuitem action='rlImportAudio'/>
|
||||
<menuitem action='rlEmbedAudio'/>
|
||||
</popup>
|
||||
|
||||
<menubar name='Main'>
|
||||
<menu action='Session'>
|
||||
<menubar name='Main' action='null'>
|
||||
<menu name='Session' action='null'>
|
||||
<menuitem action='New'/>
|
||||
<menuitem action='Open'/>
|
||||
<menuitem action='Recent'/>
|
||||
|
|
@ -30,22 +9,22 @@
|
|||
<separator/>
|
||||
<menuitem action='AddTrackBus'/>
|
||||
<separator/>
|
||||
<menu action='Export'>
|
||||
<menu name='Export' action='null'>
|
||||
<menuitem action='ExportSession'/>
|
||||
<menuitem action='ExportRange'/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menu name='Cleanup'>
|
||||
<menu name='Cleanup' action='null'>
|
||||
<menuitem action='CleanupUnused'/>
|
||||
<menuitem action='FlushWastebasket'/>
|
||||
</menu>
|
||||
<separator/>
|
||||
<menuitem action='Quit'/>
|
||||
</menu>
|
||||
<menu name='JACK'>
|
||||
<menuitem action='Disconnect'/>
|
||||
<menuitem action='Connect'/>
|
||||
<menu name='Latency'>
|
||||
<menu name='JACK' action='null'>
|
||||
<menuitem action='JACKDisconnect'/>
|
||||
<menuitem action='JACKReconnect'/>
|
||||
<menu name='Latency' action='null'>
|
||||
<menuitem action='JACKLatency32'/>
|
||||
<menuitem action='JACKLatency64'/>
|
||||
<menuitem action='JACKLatency128'/>
|
||||
|
|
@ -57,7 +36,7 @@
|
|||
<menuitem action='JACKLatency8192'/>
|
||||
</menu>
|
||||
</menu>
|
||||
<menu name='Windows'>
|
||||
<menu name='Windows' action = 'null'>
|
||||
<menuitem action='GotoEditor'/>
|
||||
<menuitem action='GotoMixer'/>
|
||||
<menuitem action='ToggleOptionsEditor'/>
|
||||
|
|
@ -65,7 +44,6 @@
|
|||
<menuitem action='ToggleConnections'/>
|
||||
<menuitem action='ToggleLocations'/>
|
||||
<menuitem action='ToggleBigClock'/>
|
||||
<menuitem action='ToggleAbout'/>
|
||||
</menu>
|
||||
</menubar>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -63,7 +63,10 @@ ARDOUR_UI::install_actions ()
|
|||
Glib::RefPtr<ActionGroup> main_actions = ActionGroup::create (X_("Main"));
|
||||
Glib::RefPtr<Action> act;
|
||||
|
||||
ActionManager::ActionManager::register_action (main_actions, X_("New"), _("New"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string ()));
|
||||
act = ActionManager::ActionManager::register_action (main_actions, X_("New"), _("New"), bind (mem_fun(*this, &ARDOUR_UI::new_session), false, string ()));
|
||||
|
||||
cerr << "\n\n\n NEW has accel path " << act->get_accel_path() << endl;
|
||||
|
||||
ActionManager::ActionManager::register_action (main_actions, X_("Open"), _("Open"), mem_fun(*this, &ARDOUR_UI::open_session));
|
||||
ActionManager::ActionManager::register_action (main_actions, X_("Recent"), _("Recent"), mem_fun(*this, &ARDOUR_UI::open_recent_session));
|
||||
act = ActionManager::register_action (main_actions, X_("Close"), _("Close"), mem_fun(*this, &ARDOUR_UI::close_session));
|
||||
|
|
|
|||
|
|
@ -500,12 +500,10 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
|||
x2 = (end - 1) / editor.get_current_zoom();
|
||||
y2 = height - 2;
|
||||
|
||||
gtk_object_set (GTK_OBJECT(timestretch_rect),
|
||||
"x1", x1,
|
||||
"y1", 1.0,
|
||||
"x2", x2,
|
||||
"y2", y2,
|
||||
NULL);
|
||||
timestretch_rect->property_x1() = x1;
|
||||
timestretch_rect->property_y1() = 1.0;
|
||||
timestretch_rect->property_x2() = x2;
|
||||
timestretch_rect->property_y2() = y2;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool dummy_arg_to_force_s
|
|||
|
||||
ControlPoint::~ControlPoint ()
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT(item));
|
||||
delete item;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -246,8 +246,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Gro
|
|||
AutomationLine::~AutomationLine ()
|
||||
{
|
||||
vector_delete (&control_points);
|
||||
|
||||
gtk_object_destroy (GTK_OBJECT(group));
|
||||
delete group;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ AutomationTimeAxisView::set_height (TrackHeight h)
|
|||
controls_table.show_all ();
|
||||
|
||||
TimeAxisView::set_height (h);
|
||||
gtk_object_set (GTK_OBJECT(base_rect), "y2", (double) h, NULL);
|
||||
base_rect->property_y2() = h;
|
||||
|
||||
for (vector<AutomationLine*>::iterator i = lines.begin(); i != lines.end(); ++i) {
|
||||
(*i)->set_height (h);
|
||||
|
|
|
|||
|
|
@ -100,10 +100,9 @@ gnome_canvas_imageframe_class_init (GnomeCanvasImageFrameClass *class)
|
|||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_PIXBUF,
|
||||
g_param_spec_boxed ("pixbuf",
|
||||
g_param_spec_pointer ("pixbuf",
|
||||
_("pixbuf"),
|
||||
_("the pixbuf"),
|
||||
GDK_TYPE_PIXBUF,
|
||||
G_PARAM_WRITABLE));
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_X,
|
||||
|
|
@ -291,10 +290,10 @@ gnome_canvas_imageframe_set_property (GObject *object,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_PIXBUF:
|
||||
if (item->canvas->aa && g_value_get_boxed (value)) {
|
||||
if (item->canvas->aa && g_value_get_pointer (value)) {
|
||||
if (image->pixbuf != NULL)
|
||||
art_pixbuf_free (image->pixbuf);
|
||||
image->pixbuf = g_value_get_boxed (value);
|
||||
image->pixbuf = g_value_get_pointer (value);
|
||||
}
|
||||
update = TRUE;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -150,8 +150,7 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
|||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_DATA_SRC,
|
||||
g_param_spec_boxed ("data_src", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("data_src", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
|
|
@ -164,43 +163,37 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
|||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_LENGTH_FUNCTION,
|
||||
g_param_spec_boxed ("length_function", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("length_function", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_SOURCEFILE_LENGTH_FUNCTION,
|
||||
g_param_spec_boxed ("sourcefile_length_function", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("sourcefile_length_function", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_PEAK_FUNCTION,
|
||||
g_param_spec_boxed ("peak_function", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("peak_function", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_GAIN_FUNCTION,
|
||||
g_param_spec_boxed ("gain_function", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("gain_function", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_GAIN_SRC,
|
||||
g_param_spec_boxed ("gain_src", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("gain_src", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_CACHE,
|
||||
g_param_spec_boxed ("cache", NULL, NULL,
|
||||
GTK_TYPE_POINTER,
|
||||
g_param_spec_pointer ("cache", NULL, NULL,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
g_object_class_install_property
|
||||
|
|
@ -213,7 +206,7 @@ gnome_canvas_waveview_class_init (GnomeCanvasWaveViewClass *class)
|
|||
g_object_class_install_property
|
||||
(gobject_class,
|
||||
PROP_SAMPLES_PER_UNIT,
|
||||
g_param_spec_double ("sample_per_unit", NULL, NULL,
|
||||
g_param_spec_double ("samples_per_unit", NULL, NULL,
|
||||
0.0, G_MAXDOUBLE, 0.0,
|
||||
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
|
||||
|
||||
|
|
|
|||
|
|
@ -333,8 +333,8 @@ ConnectionEditor::refill_connection_display ()
|
|||
input_connection_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
output_connection_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
|
||||
input_connection_model.clear();
|
||||
output_connection_model.clear();
|
||||
input_connection_model->clear();
|
||||
output_connection_model->clear();
|
||||
|
||||
current_connection = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ CrossfadeEditor::canvas_event (GdkEvent* event)
|
|||
|
||||
CrossfadeEditor::Point::~Point()
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT(box));
|
||||
delete box;
|
||||
}
|
||||
|
||||
CrossfadeEditor::Point*
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include <sigc++/bind.h>
|
||||
|
||||
#include <libgnomecanvasmm/init.h>
|
||||
|
||||
#include <pbd/error.h>
|
||||
|
||||
#include <gtkmm/image.h>
|
||||
|
|
@ -60,7 +58,6 @@
|
|||
#include "rgb_macros.h"
|
||||
#include "selection.h"
|
||||
#include "streamview.h"
|
||||
#include "simpleline.h"
|
||||
#include "time_axis_view.h"
|
||||
#include "utils.h"
|
||||
#include "crossfade_view.h"
|
||||
|
|
@ -85,9 +82,6 @@ using namespace Glib;
|
|||
using namespace Gtkmm2ext;
|
||||
using namespace Editing;
|
||||
|
||||
/* XXX this is a hack. it ought to be the maximum value of an jack_nframes_t */
|
||||
|
||||
const double max_canvas_coordinate = 100000000.0;
|
||||
const double Editor::timebar_height = 15.0;
|
||||
|
||||
#include "editor_xpms"
|
||||
|
|
@ -795,186 +789,6 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
Editor::initialize_canvas ()
|
||||
{
|
||||
ArdourCanvas::init ();
|
||||
|
||||
/* adjust sensitivity for "picking" items */
|
||||
|
||||
// GNOME_CANVAS(track_canvas)->close_enough = 2;
|
||||
|
||||
track_canvas.signal_event().connect (bind (mem_fun (*this, &Editor::track_canvas_event), (ArdourCanvas::Item*) 0));
|
||||
track_canvas.set_name ("EditorMainCanvas");
|
||||
track_canvas.add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
track_canvas.signal_leave_notify_event().connect (mem_fun(*this, &Editor::left_track_canvas));
|
||||
|
||||
/* set up drag-n-drop */
|
||||
vector<Gtk::TargetEntry> target_table;
|
||||
|
||||
target_table.push_back (TargetEntry ("STRING"));
|
||||
target_table.push_back (TargetEntry ("text/plain"));
|
||||
target_table.push_back (TargetEntry ("text/uri-list"));
|
||||
target_table.push_back (TargetEntry ("application/x-rootwin-drop"));
|
||||
|
||||
// GTK2FIX
|
||||
// track_canvas.drag_dest_set (target_table, DEST_DEFAULT_ALL, GdkDragAction (Gdk::ACTION_COPY|Gdk::ACTION_MOVE));
|
||||
// track_canvas.signal_drag_data_received().connect (mem_fun(*this, &Editor::track_canvas_drag_data_received));
|
||||
|
||||
/* stuff for the verbose canvas cursor */
|
||||
|
||||
Pango::FontDescription font = get_font_for_style (N_("VerboseCanvasCursor"));
|
||||
|
||||
verbose_canvas_cursor = new ArdourCanvas::Text (*track_canvas.root());
|
||||
verbose_canvas_cursor->property_font_desc() = font;
|
||||
// GTK2FIX
|
||||
// verbose_canvas_cursor->property_anchor() = GTK_ANCHOR_NW;
|
||||
verbose_canvas_cursor->property_fill_color_rgba() = color_map[cVerboseCanvasCursor];
|
||||
|
||||
verbose_cursor_visible = false;
|
||||
|
||||
/* a group to hold time (measure) lines */
|
||||
|
||||
time_line_group = new ArdourCanvas::Group (*track_canvas.root(), 0.0, 0.0);
|
||||
cursor_group = new ArdourCanvas::Group (*track_canvas.root(), 0.0, 0.0);
|
||||
|
||||
time_canvas.set_name ("EditorTimeCanvas");
|
||||
time_canvas.add_events (Gdk::POINTER_MOTION_HINT_MASK);
|
||||
|
||||
meter_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0);
|
||||
tempo_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0);
|
||||
marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 2.0);
|
||||
range_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 3.0);
|
||||
transport_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 4.0);
|
||||
|
||||
tempo_bar = new ArdourCanvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
tempo_bar->property_fill_color_rgba() = color_map[cTempoBar];
|
||||
tempo_bar->property_outline_pixels() = 0;
|
||||
|
||||
meter_bar = new ArdourCanvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
meter_bar->property_fill_color_rgba() = color_map[cMeterBar];
|
||||
meter_bar->property_outline_pixels() = 0;
|
||||
|
||||
marker_bar = new ArdourCanvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
marker_bar->property_fill_color_rgba() = color_map[cMarkerBar];
|
||||
marker_bar->property_outline_pixels() = 0;
|
||||
|
||||
range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
range_marker_bar->property_fill_color_rgba() = color_map[cRangeMarkerBar];
|
||||
range_marker_bar->property_outline_pixels() = 0;
|
||||
|
||||
transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
transport_marker_bar->property_fill_color_rgba() = color_map[cTransportMarkerBar];
|
||||
transport_marker_bar->property_outline_pixels() = 0;
|
||||
|
||||
range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
range_bar_drag_rect->property_fill_color_rgba() = color_map[cRangeDragBarRectFill];
|
||||
range_bar_drag_rect->property_outline_color_rgba() = color_map[cRangeDragBarRect];
|
||||
range_bar_drag_rect->property_outline_pixels() = 0;
|
||||
range_bar_drag_rect->hide ();
|
||||
|
||||
transport_bar_drag_rect = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
|
||||
transport_bar_drag_rect ->property_fill_color_rgba() = color_map[cTransportDragRectFill];
|
||||
transport_bar_drag_rect->property_outline_color_rgba() = color_map[cTransportDragRect];
|
||||
transport_bar_drag_rect->property_outline_pixels() = 0;
|
||||
transport_bar_drag_rect->hide ();
|
||||
|
||||
marker_drag_line_points.push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
marker_drag_line_points.push_back(Gnome::Art::Point(0.0, 0.0));
|
||||
|
||||
marker_drag_line = new ArdourCanvas::Line (*track_canvas.root());
|
||||
marker_drag_line->property_width_pixels() = 1;
|
||||
marker_drag_line->property_fill_color_rgba() = color_map[cMarkerDragLine];
|
||||
marker_drag_line->property_points() = marker_drag_line_points;
|
||||
marker_drag_line->hide();
|
||||
|
||||
range_marker_drag_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
|
||||
range_marker_drag_rect->property_fill_color_rgba() = color_map[cRangeDragRectFill];
|
||||
range_marker_drag_rect->property_outline_color_rgba() = color_map[cRangeDragRect];
|
||||
range_marker_drag_rect->hide ();
|
||||
|
||||
transport_loop_range_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
|
||||
transport_loop_range_rect->property_fill_color_rgba() = color_map[cTransportLoopRectFill];
|
||||
transport_loop_range_rect->property_outline_color_rgba() = color_map[cTransportLoopRect];
|
||||
transport_loop_range_rect->property_outline_pixels() = 1;
|
||||
transport_loop_range_rect->hide();
|
||||
|
||||
transport_punch_range_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
|
||||
transport_punch_range_rect->property_fill_color_rgba() = color_map[cTransportPunchRectFill];
|
||||
transport_punch_range_rect->property_outline_color_rgba() = color_map[cTransportPunchRect];
|
||||
transport_punch_range_rect->property_outline_pixels() = 0;
|
||||
transport_punch_range_rect->hide();
|
||||
|
||||
transport_loop_range_rect->lower_to_bottom (); // loop on the bottom
|
||||
|
||||
transport_punchin_line = new ArdourCanvas::SimpleLine (*time_line_group);
|
||||
transport_punchin_line->property_x1() = 0.0;
|
||||
transport_punchin_line->property_y1() = 0.0;
|
||||
transport_punchin_line->property_x2() = 0.0;
|
||||
transport_punchin_line->property_y2() = 0.0;
|
||||
transport_punchin_line->property_color_rgba() = color_map[cPunchInLine];
|
||||
transport_punchin_line->hide ();
|
||||
|
||||
transport_punchout_line = new ArdourCanvas::SimpleLine (*time_line_group);
|
||||
transport_punchout_line->property_x1() = 0.0;
|
||||
transport_punchout_line->property_y1() = 0.0;
|
||||
transport_punchout_line->property_x2() = 0.0;
|
||||
transport_punchout_line->property_y2() = 0.0;
|
||||
transport_punchout_line->property_color_rgba() = color_map[cPunchOutLine];
|
||||
transport_punchout_line->hide();
|
||||
|
||||
// used to show zoom mode active zooming
|
||||
zoom_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
|
||||
zoom_rect->property_fill_color_rgba() = color_map[cZoomRectFill];
|
||||
zoom_rect->property_outline_color_rgba() = color_map[cZoomRect];
|
||||
zoom_rect->property_outline_pixels() = 1;
|
||||
zoom_rect->hide();
|
||||
|
||||
zoom_rect->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_zoom_rect_event), (ArdourCanvas::Item*) 0));
|
||||
|
||||
// used as rubberband rect
|
||||
rubberband_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
|
||||
rubberband_rect->property_outline_color_rgba() = color_map[cRubberBandRect];
|
||||
rubberband_rect->property_fill_color_rgba() = (guint32) color_map[cRubberBandRectFill];
|
||||
rubberband_rect->property_outline_pixels() = 1;
|
||||
rubberband_rect->hide();
|
||||
|
||||
tempo_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_tempo_bar_event), tempo_bar));
|
||||
meter_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_meter_bar_event), meter_bar));
|
||||
marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_marker_bar_event), marker_bar));
|
||||
range_marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_range_marker_bar_event), range_marker_bar));
|
||||
transport_marker_bar->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_transport_marker_bar_event), transport_marker_bar));
|
||||
|
||||
/* separator lines */
|
||||
|
||||
tempo_line = new ArdourCanvas::SimpleLine (*tempo_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
|
||||
tempo_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
|
||||
|
||||
meter_line = new ArdourCanvas::SimpleLine (*meter_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
|
||||
meter_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
|
||||
|
||||
marker_line = new ArdourCanvas::SimpleLine (*marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
|
||||
marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
|
||||
|
||||
range_marker_line = new ArdourCanvas::SimpleLine (*range_marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
|
||||
range_marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
|
||||
|
||||
transport_marker_line = new ArdourCanvas::SimpleLine (*transport_marker_group, 0, timebar_height, max_canvas_coordinate, timebar_height);
|
||||
transport_marker_line->property_color_rgba() = RGBA_TO_UINT (0,0,0,255);
|
||||
|
||||
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_loop_range_view), false));
|
||||
ZoomChanged.connect (bind (mem_fun(*this, &Editor::update_punch_range_view), false));
|
||||
|
||||
double time_height = timebar_height * 5;
|
||||
double time_width = FLT_MAX/frames_per_unit;
|
||||
time_canvas.set_scroll_region(0.0, 0.0, time_width, time_height);
|
||||
|
||||
edit_cursor = new Cursor (*this, "blue", &Editor::canvas_edit_cursor_event);
|
||||
playhead_cursor = new Cursor (*this, "red", &Editor::canvas_playhead_cursor_event);
|
||||
|
||||
track_canvas.signal_size_allocate().connect (mem_fun(*this, &Editor::track_canvas_allocate));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::show_window ()
|
||||
{
|
||||
|
|
@ -1265,103 +1079,6 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
|
|||
Resized (); /* EMIT_SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_scrolling_region (Gtk::Allocation* alloc)
|
||||
{
|
||||
guint32 last_canvas_unit;
|
||||
double height;
|
||||
guint32 canvas_alloc_height, canvas_alloc_width;
|
||||
TrackViewList::iterator i;
|
||||
static bool first_time = true;
|
||||
|
||||
/* We need to make sure that the canvas always has its
|
||||
scrolling region set to larger of:
|
||||
|
||||
- the size allocated for it (within the container its packed in)
|
||||
- the size required to see the entire session
|
||||
|
||||
If we don't ensure at least the first of these, the canvas
|
||||
does some wierd and in my view unnecessary stuff to center
|
||||
itself within the allocated area, which causes bad, bad
|
||||
results.
|
||||
|
||||
XXX GnomeCanvas has fixed this, and has an option to
|
||||
control the centering behaviour.
|
||||
*/
|
||||
|
||||
last_canvas_unit = (guint32) ceil ((float) max_frames / frames_per_unit);
|
||||
|
||||
height = 0;
|
||||
|
||||
if (session) {
|
||||
for (i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
if ((*i)->control_parent) {
|
||||
height += (*i)->effective_height;
|
||||
height += track_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
if (height) {
|
||||
height -= track_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
canvas_height = (guint32) height;
|
||||
|
||||
if (alloc) {
|
||||
canvas_alloc_height = alloc->get_height();
|
||||
canvas_alloc_width = alloc->get_width();
|
||||
} else {
|
||||
canvas_alloc_height = track_canvas.get_height();
|
||||
canvas_alloc_width = track_canvas.get_width();
|
||||
}
|
||||
|
||||
canvas_height = max (canvas_height, canvas_alloc_height);
|
||||
track_canvas.set_scroll_region ( 0.0, 0.0, max (last_canvas_unit, canvas_alloc_width), canvas_height);
|
||||
|
||||
if (edit_cursor) edit_cursor->set_length (canvas_alloc_height);
|
||||
if (playhead_cursor) playhead_cursor->set_length (canvas_alloc_height);
|
||||
|
||||
if (marker_drag_line) {
|
||||
marker_drag_line_points.back().set_x(canvas_height);
|
||||
// cerr << "set mlA points, nc = " << marker_drag_line_points.num_points << endl;
|
||||
marker_drag_line->property_points() = marker_drag_line_points;
|
||||
}
|
||||
if (range_marker_drag_rect) {
|
||||
range_marker_drag_rect->property_y1() = 0.0;
|
||||
range_marker_drag_rect->property_y2() = (double) canvas_height;
|
||||
}
|
||||
|
||||
if (transport_loop_range_rect) {
|
||||
transport_loop_range_rect->property_y1() = 0.0;
|
||||
transport_loop_range_rect->property_y2() = (double) canvas_height;
|
||||
}
|
||||
|
||||
if (transport_punch_range_rect) {
|
||||
transport_punch_range_rect->property_y1() = 0.0;
|
||||
transport_punch_range_rect->property_y2() = (double) canvas_height;
|
||||
}
|
||||
|
||||
if (transport_punchin_line) {
|
||||
transport_punchin_line->property_y1() = 0.0;
|
||||
transport_punchin_line->property_y2() = (double) canvas_height;
|
||||
}
|
||||
|
||||
if (transport_punchout_line) {
|
||||
transport_punchout_line->property_y1() = 0.0;
|
||||
transport_punchout_line->property_y2() = (double) canvas_height;
|
||||
}
|
||||
|
||||
update_fixed_rulers ();
|
||||
|
||||
if (is_visible() && first_time) {
|
||||
tempo_map_changed (Change (0));
|
||||
first_time = false;
|
||||
} else {
|
||||
redisplay_tempo ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::queue_session_control_changed (Session::ControlType t)
|
||||
{
|
||||
|
|
@ -1626,7 +1343,7 @@ Editor::connect_to_session (Session *t)
|
|||
redisplay_named_selections ();
|
||||
|
||||
//route_list.freeze (); GTK2FIX
|
||||
route_display_model.clear ();
|
||||
route_display_model->clear ();
|
||||
session->foreach_route (this, &Editor::handle_new_route);
|
||||
// route_list.select_all ();
|
||||
// GTK2FIX
|
||||
|
|
@ -1740,7 +1457,7 @@ void
|
|||
Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* item, ItemType item_type)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
AudioRegionView* arv = static_cast<AudioRegionView*> (item->get_data ("regionview"));
|
||||
|
||||
if (arv == 0) {
|
||||
fatal << _("programming error: fade in canvas item has no regionview data pointer!") << endmsg;
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ void
|
|||
Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
|
||||
{
|
||||
Marker * marker;
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -505,7 +505,7 @@ Editor::marker_menu_hide ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -523,7 +523,7 @@ Editor::marker_menu_play_from ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -553,7 +553,7 @@ Editor::marker_menu_set_playhead ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -581,7 +581,7 @@ Editor::marker_menu_set_from_playhead ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -609,7 +609,7 @@ Editor::marker_menu_set_from_selection ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -647,7 +647,7 @@ Editor::marker_menu_loop_range ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -674,7 +674,7 @@ Editor::marker_menu_edit ()
|
|||
TempoMarker* tm;
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -697,7 +697,7 @@ Editor::marker_menu_remove ()
|
|||
TempoMarker* tm;
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -716,7 +716,7 @@ Editor::marker_menu_rename ()
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(marker_menu_item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -263,9 +263,9 @@ Editor::session_going_away ()
|
|||
/* rip everything out of the list displays */
|
||||
|
||||
region_list_clear (); // no clear() method in gtkmm 1.2
|
||||
route_display_model.clear ();
|
||||
named_selection_model.clear ();
|
||||
group_model.clear ();
|
||||
route_display_model->clear ();
|
||||
named_selection_model->clear ();
|
||||
group_model->clear ();
|
||||
|
||||
edit_cursor_clock.set_session (0);
|
||||
selection_start_clock.set_session (0);
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
case AudioRegionViewNameHighlight:
|
||||
case AudioRegionViewName:
|
||||
if ((rv = reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"))) != 0) {
|
||||
if ((rv = reinterpret_cast<AudioRegionView *> (item->get_data ("regionview"))) != 0) {
|
||||
set_selected_regionview_from_click (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift), true);
|
||||
}
|
||||
break;
|
||||
|
|
@ -323,7 +323,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
case GainAutomationControlPointItem:
|
||||
case PanAutomationControlPointItem:
|
||||
case RedirectAutomationControlPointItem:
|
||||
if ((cp = reinterpret_cast<ControlPoint *> (gtk_object_get_data(GTK_OBJECT(item), "control_point"))) != 0) {
|
||||
if ((cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))) != 0) {
|
||||
set_selected_control_point_from_click (Keyboard::modifier_state_equals (event->button.state, Keyboard::Shift), true);
|
||||
}
|
||||
break;
|
||||
|
|
@ -358,7 +358,7 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
|
|||
|
||||
case AudioRegionViewNameHighlight:
|
||||
case AudioRegionViewName:
|
||||
rv = reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"));
|
||||
rv = reinterpret_cast<AudioRegionView *> (item->get_data ("regionview"));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1125,7 +1125,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
switch (item_type) {
|
||||
case GainControlPointItem:
|
||||
if (mouse_mode == MouseGain) {
|
||||
cp = reinterpret_cast<ControlPoint*>(gtk_object_get_data (GTK_OBJECT(item), "control_point"));
|
||||
cp = reinterpret_cast<ControlPoint*>(item->get_data ("control_point"));
|
||||
cp->set_visible (true);
|
||||
|
||||
double at_x, at_y;
|
||||
|
|
@ -1149,7 +1149,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
case GainAutomationControlPointItem:
|
||||
case PanAutomationControlPointItem:
|
||||
case RedirectAutomationControlPointItem:
|
||||
cp = reinterpret_cast<ControlPoint*>(gtk_object_get_data (GTK_OBJECT(item), "control_point"));
|
||||
cp = reinterpret_cast<ControlPoint*>(item->get_data ("control_point"));
|
||||
cp->set_visible (true);
|
||||
|
||||
double at_x, at_y;
|
||||
|
|
@ -1224,7 +1224,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
|
||||
/* when the name is not an active item, the entire name highlight is for trimming */
|
||||
|
||||
if (!reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"))->name_active()) {
|
||||
if (!reinterpret_cast<AudioRegionView *> (item->get_data ("regionview"))->name_active()) {
|
||||
if (mouse_mode == MouseObject && is_drawable()) {
|
||||
track_canvas_scroller.get_window()->set_cursor (*trimmer_cursor);
|
||||
}
|
||||
|
|
@ -1250,7 +1250,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
track_canvas_scroller.get_window()->set_cursor (*cursor);
|
||||
|
||||
AutomationTimeAxisView* atv;
|
||||
if ((atv = static_cast<AutomationTimeAxisView*>(gtk_object_get_data(GTK_OBJECT(item), "trackview"))) != 0) {
|
||||
if ((atv = static_cast<AutomationTimeAxisView*>(item->get_data ("trackview"))) != 0) {
|
||||
clear_entered_track = false;
|
||||
set_entered_track (atv);
|
||||
}
|
||||
|
|
@ -1268,7 +1268,7 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
break;
|
||||
|
||||
case MarkerItem:
|
||||
if ((marker = static_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
break;
|
||||
}
|
||||
marker->set_color_rgba (color_map[cEnteredMarker]);
|
||||
|
|
@ -1337,7 +1337,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
case GainAutomationControlPointItem:
|
||||
case PanAutomationControlPointItem:
|
||||
case RedirectAutomationControlPointItem:
|
||||
cp = reinterpret_cast<ControlPoint*>(gtk_object_get_data (GTK_OBJECT(item), "control_point"));
|
||||
cp = reinterpret_cast<ControlPoint*>(item->get_data ("control_point"));
|
||||
if (cp->line.npoints() > 1) {
|
||||
if (!cp->selected) {
|
||||
cp->set_visible (false);
|
||||
|
|
@ -1371,7 +1371,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
case GainAutomationLineItem:
|
||||
case RedirectAutomationLineItem:
|
||||
case PanAutomationLineItem:
|
||||
al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
|
||||
al = reinterpret_cast<AutomationLine*> (item->get_data ("line"));
|
||||
{
|
||||
ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
|
||||
if (line)
|
||||
|
|
@ -1384,7 +1384,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
|
||||
case AudioRegionViewName:
|
||||
/* see enter_handler() for notes */
|
||||
if (!reinterpret_cast<AudioRegionView *> (gtk_object_get_data(GTK_OBJECT(item), "regionview"))->name_active()) {
|
||||
if (!reinterpret_cast<AudioRegionView *> (item->get_data ("regionview"))->name_active()) {
|
||||
if (is_drawable() && mouse_mode == MouseObject) {
|
||||
track_canvas_scroller.get_window()->set_cursor (*current_canvas_cursor);
|
||||
}
|
||||
|
|
@ -1402,7 +1402,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
break;
|
||||
|
||||
case MarkerItem:
|
||||
if ((marker = static_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
break;
|
||||
}
|
||||
loc = find_location_from_marker (marker, is_start);
|
||||
|
|
@ -1419,7 +1419,7 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
|
|||
|
||||
case FadeInHandleItem:
|
||||
case FadeOutHandleItem:
|
||||
rv = static_cast<AudioRegionView*>(gtk_object_get_data (GTK_OBJECT(item), "regionview"));
|
||||
rv = static_cast<AudioRegionView*>(item->get_data ("regionview"));
|
||||
{
|
||||
ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
|
||||
if (rect) {
|
||||
|
|
@ -1701,7 +1701,7 @@ Editor::start_fade_in_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
start_grab (event);
|
||||
|
||||
if ((drag_info.data = (gtk_object_get_data (GTK_OBJECT(item), "regionview"))) == 0) {
|
||||
if ((drag_info.data = (item->get_data ("regionview"))) == 0) {
|
||||
fatal << _("programming error: fade in canvas item has no regionview data pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -1791,7 +1791,7 @@ Editor::start_fade_out_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
start_grab (event);
|
||||
|
||||
if ((drag_info.data = (gtk_object_get_data (GTK_OBJECT(item), "regionview"))) == 0) {
|
||||
if ((drag_info.data = (item->get_data ("regionview"))) == 0) {
|
||||
fatal << _("programming error: fade out canvas item has no regionview data pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -1884,7 +1884,7 @@ Editor::start_cursor_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
|
||||
start_grab (event);
|
||||
|
||||
if ((drag_info.data = (gtk_object_get_data (GTK_OBJECT(item), "cursor"))) == 0) {
|
||||
if ((drag_info.data = (item->get_data ("cursor"))) == 0) {
|
||||
fatal << _("programming error: cursor canvas item has no cursor data pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -1974,7 +1974,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
{
|
||||
Marker* marker;
|
||||
|
||||
if ((marker = static_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2112,7 +2112,7 @@ Editor::start_meter_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: meter marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2191,7 +2191,7 @@ Editor::start_tempo_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "tempo_marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("tempo_marker"))) == 0) {
|
||||
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2272,7 +2272,7 @@ Editor::remove_gain_control_point (ArdourCanvas::Item*item, GdkEvent* event)
|
|||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (gtk_object_get_data (GTK_OBJECT(item), "control_point"))) == 0) {
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))) == 0) {
|
||||
fatal << _("programming error: control point canvas item has no control point object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2291,7 +2291,7 @@ Editor::remove_control_point (ArdourCanvas::Item*item, GdkEvent* event)
|
|||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (gtk_object_get_data (GTK_OBJECT(item), "control_point"))) == 0) {
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))) == 0) {
|
||||
fatal << _("programming error: control point canvas item has no control point object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2304,7 +2304,7 @@ Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
{
|
||||
ControlPoint* control_point;
|
||||
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (gtk_object_get_data (GTK_OBJECT(item), "control_point"))) == 0) {
|
||||
if ((control_point = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"))) == 0) {
|
||||
fatal << _("programming error: control point canvas item has no control point object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2402,7 +2402,7 @@ Editor::start_line_grab_from_line (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
{
|
||||
AutomationLine* al;
|
||||
|
||||
if ((al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item), "line"))) == 0) {
|
||||
if ((al = reinterpret_cast<AutomationLine*> (item->get_data ("line"))) == 0) {
|
||||
fatal << _("programming error: line canvas item has no line pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -4089,7 +4089,7 @@ Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
Marker* marker;
|
||||
bool is_start;
|
||||
|
||||
if ((marker = static_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = static_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -4397,12 +4397,10 @@ Editor::drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
double x1 = frame_to_pixel (start);
|
||||
double x2 = frame_to_pixel (end);
|
||||
|
||||
gtk_object_set (GTK_OBJECT(rubberband_rect),
|
||||
"x1", x1,
|
||||
"y1", y1,
|
||||
"x2", x2,
|
||||
"y2", y2,
|
||||
NULL);
|
||||
rubberband_rect->property_x1() = x1;
|
||||
rubberband_rect->property_y1() = y1;
|
||||
rubberband_rect->property_x2() = x2;
|
||||
rubberband_rect->property_y2() = y2;
|
||||
|
||||
rubberband_rect->show();
|
||||
rubberband_rect->raise_to_top();
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
|
|||
|
||||
TreeModel::iterator i;
|
||||
TreeModel::Children rows = region_list_model->children();
|
||||
bool found_parent = false;
|
||||
|
||||
for (i = rows.begin(); i != rows.end(); ++i) {
|
||||
|
||||
|
|
@ -271,13 +272,14 @@ Editor::add_audio_region_to_region_display (AudioRegion *region)
|
|||
|
||||
if (region->source_equivalent (*r)) {
|
||||
row = *(region_list_model->append ((*i).children()));
|
||||
found_parent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i == rows.end()) {
|
||||
TreeModel::Row row = *(region_list_model->append());
|
||||
if (!found_parent) {
|
||||
row = *(region_list_model->append());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -330,7 +332,7 @@ Editor::redisplay_regions ()
|
|||
if (session) {
|
||||
|
||||
region_list_display.set_model (Glib::RefPtr<Gtk::TreeStore>(0));
|
||||
region_list_model.clear ();
|
||||
region_list_model->clear ();
|
||||
|
||||
/* now add everything we have, via a temporary list used to help with
|
||||
sorting.
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ Editor::update_ruler_visibility ()
|
|||
|
||||
if (ruler_shown[ruler_time_tempo]) {
|
||||
lab_children.push_back (Element(tempo_label, PACK_SHRINK, PACK_START));
|
||||
gtk_object_get (GTK_OBJECT(tempo_group), "y", &old_unit_pos);
|
||||
old_unit_pos = tempo_group->property_y();
|
||||
if (tbpos != old_unit_pos) {
|
||||
tempo_group->move(0.0, tbpos - old_unit_pos);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ Editor::redisplay_named_selections ()
|
|||
{
|
||||
//GTK2FIX
|
||||
//named_selection_display.freeze ();
|
||||
named_selection_model.clear ();
|
||||
named_selection_model->clear ();
|
||||
session->foreach_named_selection (*this, &Editor::add_named_selection_to_named_selection_display);
|
||||
//named_selection_display.thaw ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ Editor::remove_tempo_marker (ArdourCanvas::Item* item)
|
|||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -409,7 +409,7 @@ Editor::edit_tempo_marker (ArdourCanvas::Item *item)
|
|||
Marker* marker;
|
||||
TempoMarker* tempo_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ Editor::edit_meter_marker (ArdourCanvas::Item *item)
|
|||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: tempo marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -459,7 +459,7 @@ Editor::remove_meter_marker (ArdourCanvas::Item* item)
|
|||
Marker* marker;
|
||||
MeterMarker* meter_marker;
|
||||
|
||||
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
|
||||
if ((marker = reinterpret_cast<Marker *> (item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: meter marker canvas item has no marker object pointer!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,21 +116,21 @@ ImageFrameTimeAxis::~ImageFrameTimeAxis ()
|
|||
|
||||
for(list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i)
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->rect));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->start_trim));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->end_trim));
|
||||
delete (*i)->rect;
|
||||
delete (*i)->start_trim;
|
||||
delete (*i)->end_trim;
|
||||
}
|
||||
|
||||
for(list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i)
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->rect));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->start_trim));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->end_trim));
|
||||
delete (*i)->rect;
|
||||
delete (*i)->start_trim;
|
||||
delete (*i)->end_trim;
|
||||
}
|
||||
|
||||
if (selection_group)
|
||||
{
|
||||
gtk_object_destroy (GTK_OBJECT (selection_group));
|
||||
delete selection_group;
|
||||
selection_group = 0 ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -95,13 +95,13 @@ MarkerTimeAxisView::~MarkerTimeAxisView()
|
|||
|
||||
if(canvas_rect)
|
||||
{
|
||||
gtk_object_destroy(GTK_OBJECT(canvas_rect)) ;
|
||||
delete canvas_rect;
|
||||
canvas_rect = 0 ;
|
||||
}
|
||||
|
||||
if(canvas_group)
|
||||
{
|
||||
gtk_object_destroy(GTK_OBJECT(canvas_group)) ;
|
||||
delete canvas_group;
|
||||
canvas_group = 0 ;
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ MarkerTimeAxisView::set_height(gdouble h)
|
|||
return -1 ;
|
||||
}
|
||||
|
||||
gtk_object_set (GTK_OBJECT(canvas_rect), "y2", h, NULL);
|
||||
canvas_rect->property_y2() = h;
|
||||
|
||||
for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ Mixer_UI::connect_to_session (Session* sess)
|
|||
// GTK2FIX
|
||||
// track_display_list.freeze ();
|
||||
|
||||
track_display_model.clear ();
|
||||
track_display_model->clear ();
|
||||
|
||||
session->foreach_route (this, &Mixer_UI::add_strip);
|
||||
|
||||
|
|
@ -784,7 +784,7 @@ Mixer_UI::redisplay_snapshots ()
|
|||
return;
|
||||
}
|
||||
|
||||
snapshot_display_model.clear ();
|
||||
snapshot_display_model->clear ();
|
||||
|
||||
for (vector<string*>::iterator i = states->begin(); i != states->end(); ++i) {
|
||||
string statename = *(*i);
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ RedirectBox::redirects_changed (void *src)
|
|||
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RedirectBox::redirects_changed), src));
|
||||
|
||||
//redirect_display.freeze ();
|
||||
model.clear ();
|
||||
model->clear ();
|
||||
redirect_active_connections.clear ();
|
||||
redirect_name_connections.clear ();
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView
|
|||
fade_out_shape->set_data ("regionview", this);
|
||||
|
||||
|
||||
|
||||
{
|
||||
uint32_t r,g,b,a;
|
||||
UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
|
||||
|
|
@ -144,7 +143,7 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView
|
|||
fade_out_handle->property_y1() = 2.0;
|
||||
fade_out_handle->property_y2() = 7.0;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(fade_out_handle), "regionview", this);
|
||||
fade_out_handle->set_data ("regionview", this);
|
||||
}
|
||||
|
||||
string foo = region.name();
|
||||
|
|
@ -186,7 +185,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView
|
|||
set_colors ();
|
||||
|
||||
/* XXX sync mark drag? */
|
||||
|
||||
}
|
||||
|
||||
AudioRegionView::~AudioRegionView ()
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ RouteParams_UI::set_session (Session *sess)
|
|||
// GTK2FIX
|
||||
// route_select_list.freeze ();
|
||||
|
||||
route_display_model.clear();
|
||||
route_display_model->clear();
|
||||
|
||||
if (session) {
|
||||
session->foreach_route (this, &RouteParams_UI::add_route);
|
||||
|
|
@ -386,7 +386,7 @@ RouteParams_UI::session_gone ()
|
|||
{
|
||||
ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::session_gone));
|
||||
|
||||
route_display_model.clear();
|
||||
route_display_model->clear();
|
||||
|
||||
cleanup_io_frames();
|
||||
cleanup_pre_view();
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "crossfade_view.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "gui_thread.h"
|
||||
#include "utils.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace Editing;
|
||||
|
|
@ -94,7 +95,7 @@ StreamView::StreamView (AudioTimeAxisView& tv)
|
|||
StreamView::~StreamView ()
|
||||
{
|
||||
undisplay_diskstream ();
|
||||
gtk_object_destroy (GTK_OBJECT(canvas_group));
|
||||
delete canvas_group;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -123,7 +124,7 @@ StreamView::set_height (gdouble h)
|
|||
return -1;
|
||||
}
|
||||
|
||||
gtk_object_set (GTK_OBJECT(canvas_rect), "y2", h, NULL);
|
||||
canvas_rect->property_y2() = h;
|
||||
|
||||
for (AudioRegionViewList::iterator i = region_views.begin(); i != region_views.end(); ++i) {
|
||||
(*i)->set_height (h);
|
||||
|
|
@ -135,7 +136,7 @@ StreamView::set_height (gdouble h)
|
|||
|
||||
for (vector<RecBoxInfo>::iterator i = rec_rects.begin(); i != rec_rects.end(); ++i) {
|
||||
RecBoxInfo &recbox = (*i);
|
||||
gtk_object_set (GTK_OBJECT( recbox.rectangle ), "y2", h - 1, NULL);
|
||||
recbox.rectangle->property_y2() = h - 1.0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -740,7 +741,7 @@ StreamView::setup_rec_box ()
|
|||
/* transport stopped, clear boxes */
|
||||
for (vector<RecBoxInfo>::iterator iter=rec_rects.begin(); iter != rec_rects.end(); ++iter) {
|
||||
RecBoxInfo &rect = (*iter);
|
||||
gtk_object_destroy (GTK_OBJECT(rect.rectangle));
|
||||
delete rect.rectangle;
|
||||
}
|
||||
|
||||
rec_rects.clear();
|
||||
|
|
@ -829,7 +830,7 @@ StreamView::update_rec_regions ()
|
|||
tmp = iter;
|
||||
++tmp;
|
||||
|
||||
if ((GTK_OBJECT_FLAGS(GTK_OBJECT(rec_rects[n].rectangle)) & GNOME_CANVAS_ITEM_VISIBLE) == 0) {
|
||||
if (!canvas_item_visible (rec_rects[n].rectangle)) {
|
||||
/* rect already hidden, this region is done */
|
||||
iter = tmp;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "selection.h"
|
||||
#include "keyboard.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
@ -142,15 +143,16 @@ TimeAxisView::~TimeAxisView()
|
|||
}
|
||||
|
||||
for (list<SelectionRect*>::iterator i = free_selection_rects.begin(); i != free_selection_rects.end(); ++i) {
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->rect));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->start_trim));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->end_trim));
|
||||
delete (*i)->rect;
|
||||
delete (*i)->start_trim;
|
||||
delete (*i)->end_trim;
|
||||
|
||||
}
|
||||
|
||||
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->rect));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->start_trim));
|
||||
gtk_object_destroy (GTK_OBJECT((*i)->end_trim));
|
||||
delete (*i)->rect;
|
||||
delete (*i)->start_trim;
|
||||
delete (*i)->end_trim;
|
||||
}
|
||||
|
||||
if (selection_group) {
|
||||
|
|
@ -219,7 +221,7 @@ TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
|||
(*i)->canvas_display->show();
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT((*i)->canvas_display)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
if (canvas_item_visible ((*i)->canvas_display)) {
|
||||
++nth;
|
||||
effective_height += (*i)->show_at (y + effective_height, nth, parent);
|
||||
}
|
||||
|
|
@ -342,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)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
if (canvas_item_visible (selection_group)) {
|
||||
/* resize the selection rect */
|
||||
show_selection (editor.get_selection().time);
|
||||
}
|
||||
|
|
@ -495,7 +497,7 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||
(*i)->show_selection (ts);
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
if (canvas_item_visible (selection_group)) {
|
||||
while (!used_selection_rects.empty()) {
|
||||
free_selection_rects.push_front (used_selection_rects.front());
|
||||
used_selection_rects.pop_front();
|
||||
|
|
@ -522,28 +524,24 @@ TimeAxisView::show_selection (TimeSelection& ts)
|
|||
x2 = (start + cnt - 1) / editor.get_current_zoom();
|
||||
y2 = height;
|
||||
|
||||
gtk_object_set (GTK_OBJECT(rect->rect),
|
||||
"x1", x1,
|
||||
"y1", 1.0,
|
||||
"x2", x2,
|
||||
"y2", y2,
|
||||
NULL);
|
||||
rect->rect->property_x1() = x1;
|
||||
rect->rect->property_y1() = 1.0;
|
||||
rect->rect->property_x2() = x2;
|
||||
rect->rect->property_y2() = y2;
|
||||
|
||||
// trim boxes are at the top for selections
|
||||
|
||||
if (x2 > x1) {
|
||||
gtk_object_set (GTK_OBJECT(rect->start_trim),
|
||||
"x1", x1,
|
||||
"y1", 1.0,
|
||||
"x2", x1 + trim_handle_size,
|
||||
"y2", 1.0 + trim_handle_size,
|
||||
NULL);
|
||||
gtk_object_set (GTK_OBJECT(rect->end_trim),
|
||||
"x1", x2 - trim_handle_size,
|
||||
"y1", 1.0,
|
||||
"x2", x2,
|
||||
"y2", 1.0 + trim_handle_size,
|
||||
NULL);
|
||||
rect->start_trim->property_x1() = x1;
|
||||
rect->start_trim->property_y1() = 1.0;
|
||||
rect->start_trim->property_x2() = x1 + trim_handle_size;
|
||||
rect->start_trim->property_y2() = 1.0 + trim_handle_size;
|
||||
|
||||
rect->end_trim->property_x1() = x2 - trim_handle_size;
|
||||
rect->end_trim->property_y1() = 1.0;
|
||||
rect->end_trim->property_x2() = x2;
|
||||
rect->end_trim->property_y2() = 1.0 + trim_handle_size;
|
||||
|
||||
rect->start_trim->show();
|
||||
rect->end_trim->show();
|
||||
} else {
|
||||
|
|
@ -569,7 +567,7 @@ TimeAxisView::reshow_selection (TimeSelection& ts)
|
|||
void
|
||||
TimeAxisView::hide_selection ()
|
||||
{
|
||||
if (GTK_OBJECT_FLAGS(GTK_OBJECT(selection_group)) & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
if (canvas_item_visible (selection_group)) {
|
||||
while (!used_selection_rects.empty()) {
|
||||
free_selection_rects.push_front (used_selection_rects.front());
|
||||
used_selection_rects.pop_front();
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "utils.h"
|
||||
#include "i18n.h"
|
||||
#include "rgb_macros.h"
|
||||
#include "canvas_impl.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Gtk;
|
||||
|
|
@ -502,3 +503,8 @@ rgba_from_style (string style, uint32_t r, uint32_t g, uint32_t b, uint32_t a)
|
|||
return (uint32_t) RGBA_TO_UINT(r,g,b,a);
|
||||
}
|
||||
|
||||
bool
|
||||
canvas_item_visible (ArdourCanvas::Item* item)
|
||||
{
|
||||
return (item->gobj()->object.flags & GNOME_CANVAS_ITEM_VISIBLE) ? true : false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include <libgnomecanvasmm/line.h>
|
||||
#include <gdkmm/types.h>
|
||||
#include "canvas.h"
|
||||
|
||||
namespace Gtk {
|
||||
class Window;
|
||||
class ComboBoxText;
|
||||
|
|
@ -73,4 +74,6 @@ uint32_t rgba_from_style (std::string style, uint32_t, uint32_t, uint32_t, uint3
|
|||
|
||||
void decorate (Gtk::Window& w, Gdk::WMDecoration d);
|
||||
|
||||
bool canvas_item_visible (ArdourCanvas::Item* item);
|
||||
|
||||
#endif /* __ardour_gtk_utils_h__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue