convert set_property("foo", bar) to property_foo() = bar
authorKarsten Wiese <fzuuzf@googlemail.com>
Sun, 27 Nov 2005 22:35:04 +0000 (22:35 +0000)
committerKarsten Wiese <fzuuzf@googlemail.com>
Sun, 27 Nov 2005 22:35:04 +0000 (22:35 +0000)
git-svn-id: svn://localhost/trunk/ardour2@133 d708f5d6-7413-0410-9779-e7cbd77b26cf

17 files changed:
gtk2_ardour/automation_line.cc
gtk2_ardour/automation_time_axis.cc
gtk2_ardour/crossfade_view.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_canvas_events.cc
gtk2_ardour/editor_markers.cc
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_tempodisplay.cc
gtk2_ardour/ghostregion.cc
gtk2_ardour/imageframe_view.cc
gtk2_ardour/marker.cc
gtk2_ardour/marker_time_axis_view.cc
gtk2_ardour/regionview.cc
gtk2_ardour/regionview.h
gtk2_ardour/streamview.cc
gtk2_ardour/time_axis_view_item.cc

index f168a9f9f0137d44db695b8722d6bc118b888f82..bf75edb461e2198d65eeff455e31f04fab86a2b6 100644 (file)
@@ -129,7 +129,7 @@ ControlPoint::show()
 void
 ControlPoint::set_visible (bool yn)
 {
-       item->set_property ("draw", (gboolean) yn);
+       item->property_draw() = (gboolean) yn;
 }
 
 void
@@ -145,10 +145,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
 {
        if (entered) {
                if (selected) {
-                       item->set_property ("outline_color_rgba", color_map[cEnteredControlPointSelected]);
+                       item->property_outline_color_rgba() = color_map[cEnteredControlPointSelected];
                        set_visible(true);
                } else {
-                       item->set_property ("outline_color_rgba", color_map[cEnteredControlPoint]);
+                       item->property_outline_color_rgba() = color_map[cEnteredControlPoint];
                        if (hide_too) {
                                set_visible(false);
                        }
@@ -156,10 +156,10 @@ ControlPoint::show_color (bool entered, bool hide_too)
 
        } else {
                if (selected) {
-                       item->set_property ("outline_color_rgba", color_map[cControlPointSelected]);
+                       item->property_outline_color_rgba() = color_map[cControlPointSelected];
                        set_visible(true);
                } else {
-                       item->set_property ("outline_color_rgba", color_map[cControlPoint]);
+                       item->property_outline_color_rgba() = color_map[cControlPoint];
                        if (hide_too) {
                                set_visible(false);
                        }
@@ -174,9 +174,9 @@ ControlPoint::set_size (double sz)
 
 #if 0  
        if (_size > 6.0) {
-               item->set_property ("fill", (gboolean) TRUE);
+               item->property_fill() = (gboolean) TRUE;
        } else {
-               item->set_property ("fill", (gboolean) FALSE);
+               item->property_fill() = (gboolean) FALSE;
        }
 #endif
 
@@ -205,10 +205,10 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
                break;
        }
 
-       item->set_property ("x1", x1);
-       item->set_property ("x2", x2);
-       item->set_property ("y1", y - half_size);
-       item->set_property ("y2", y + half_size);
+       item->property_x1() = x1;
+       item->property_x2() = x2;
+       item->property_y1() = y - half_size;
+       item->property_y2() = y + half_size;
 
        _x = x;
        _y = y;
@@ -232,11 +232,11 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Gro
        _height = 0;
 
        group = new ArdourCanvas::Group (parent);
-       group->set_property ("x", 0.0);
-       group->set_property ("y", 0.0);
+       group->property_x() = 0.0;
+       group->property_y() = 0.0;
 
        line = new ArdourCanvas::Line (*group);
-       line->set_property ("width_pixels", (guint)1);
+       line->property_width_pixels() = (guint)1;
 
        line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));
 
@@ -319,7 +319,7 @@ void
 AutomationLine::set_line_color (uint32_t color)
 {
        _line_color = color;
-       line->set_property ("fill_color_rgba", color);
+       line->property_fill_color_rgba() = color;
 }
 
 void
index 9e3fb09a4a795060f59e8a5bdf4bbca0c0f5e5ce..286730bf14090f4a4b52f7a53c24d34ee8c1f96c 100644 (file)
@@ -66,13 +66,13 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, Route& r, PublicEdit
        //                       "fill_color_rgba", color_map[cAutomationTrackFill],
        //                       NULL);
        base_rect = new SimpleRect(*canvas_display);
-       base_rect->set_property ("x1", 0.0);
-       base_rect->set_property ("y1", 0.0);
-       base_rect->set_property ("x2", 1000000.0);
-       base_rect->set_property ("outline_color_rgba", color_map[cAutomationTrackOutline]);
+       base_rect->property_x1() = 0.0;
+       base_rect->property_y1() = 0.0;
+       base_rect->property_x2() = 1000000.0;
+       base_rect->property_outline_color_rgba() = color_map[cAutomationTrackOutline];
        /* outline ends and bottom */
-       base_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
-       base_rect->set_property ("fill_color_rgba", color_map[cAutomationTrackFill]);
+       base_rect->property_outline_what() = (guint32) (0x1|0x2|0x8);
+       base_rect->property_fill_color_rgba() = color_map[cAutomationTrackFill];
        
        base_rect->set_data ("trackview", this);
 
index e27b055bab1abb5a9790e3fb6a27e910a4e2c220..4681a0f6c3026b85cd6ab057b9722e99d1510007 100644 (file)
@@ -71,7 +71,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
 
        /* no frame around the xfade or overlap rects */
 
-       frame->set_property ("outline_what", 0);
+       frame->property_outline_what() = 0;
 
        /* never show the vestigial frame */
 
@@ -216,9 +216,9 @@ void
 CrossfadeView::active_changed ()
 {
        if (crossfade.active()) {
-               frame->set_property ("fill_color_rgba", color_map[cActiveCrossfade]);
+               frame->property_fill_color_rgba() = color_map[cActiveCrossfade];
        } else {
-               frame->set_property ("fill_color_rgba", color_map[cInactiveCrossfade]);
+               frame->property_fill_color_rgba() = color_map[cInactiveCrossfade];
        }
 
        redraw_curves ();
index 057639897eeba008b4f0745fbfea0a5983943617..7e223b05ef9f415f5839141d944939d3a33346a0 100644 (file)
@@ -540,8 +540,8 @@ Editor::Editor (AudioEngine& eng)
        /* use checkbox for the active column */
 
        CellRendererToggle *active_cell = dynamic_cast<CellRendererToggle*>(edit_group_list.get_column_cell_renderer (0));
-       active_cell->set_property ("activatable", true);
-       active_cell->set_property ("radio", false);
+       active_cell->property_activatable() = true;
+       active_cell->property_radio() = false;
 
        edit_group_list.set_name ("MixerGroupList");
        //edit_group_list.set_shadow_type (Gtk::SHADOW_IN);
@@ -826,10 +826,10 @@ Editor::initialize_canvas ()
        Pango::FontDescription font = get_font_for_style (N_("VerboseCanvasCursor"));
 
        verbose_canvas_cursor = new ArdourCanvas::Text (*track_canvas.root());
-       verbose_canvas_cursor->set_property ("font_desc", font);
+       verbose_canvas_cursor->property_font_desc() = font;
        // GTK2FIX
-       // verbose_canvas_cursor->set_property ("anchor", GTK_ANCHOR_NW);
-       verbose_canvas_cursor->set_property ("fill_color_rgba", color_map[cVerboseCanvasCursor]);
+       // verbose_canvas_cursor->property_anchor() = GTK_ANCHOR_NW;
+       verbose_canvas_cursor->property_fill_color_rgba() = color_map[cVerboseCanvasCursor];
        
        verbose_cursor_visible = false;
        
@@ -848,95 +848,95 @@ Editor::initialize_canvas ()
        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->set_property ("fill_color_rgba", color_map[cTempoBar]);
-       tempo_bar->set_property ("outline_pixels", 0);
+       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->set_property ("fill_color_rgba", color_map[cMeterBar]);
-       meter_bar->set_property ("outline_pixels",0);
+       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->set_property ("fill_color_rgba", color_map[cMarkerBar]);
-       marker_bar->set_property ("outline_pixels", 0);
+       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->set_property ("fill_color_rgba", color_map[cRangeMarkerBar]);
-       range_marker_bar->set_property ("outline_pixels", 0);
+       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->set_property ("fill_color_rgba", color_map[cTransportMarkerBar]);
-       transport_marker_bar->set_property ("outline_pixels", 0);
+       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->set_property ("fill_color_rgba", color_map[cRangeDragBarRectFill]);
-       range_bar_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragBarRect]);
-       range_bar_drag_rect->set_property ("outline_pixels", 0);
+       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 ->set_property ("fill_color_rgba", color_map[cTransportDragRectFill]);
-       transport_bar_drag_rect->set_property ("outline_color_rgba", color_map[cTransportDragRect]);
-       transport_bar_drag_rect->set_property ("outline_pixels", 0);
+       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->set_property ("width_pixels", 1);
-       marker_drag_line->set_property("fill_color_rgba", color_map[cMarkerDragLine]);
-       marker_drag_line->set_property("points", marker_drag_line_points);
+       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->set_property ("fill_color_rgba", color_map[cRangeDragRectFill]);
-       range_marker_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragRect]);
+       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->set_property ("fill_color_rgba", color_map[cTransportLoopRectFill]);
-       transport_loop_range_rect->set_property ("outline_color_rgba", color_map[cTransportLoopRect]);
-       transport_loop_range_rect->set_property ("outline_pixels", 1);
+       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->set_property ("fill_color_rgba", color_map[cTransportPunchRectFill]);
-       transport_punch_range_rect->set_property ("outline_color_rgba", color_map[cTransportPunchRect]);
-       transport_punch_range_rect->set_property ("outline_pixels", 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->set_property ("x1", 0.0);
-       transport_punchin_line->set_property ("y1", 0.0);
-       transport_punchin_line->set_property ("x2", 0.0);
-       transport_punchin_line->set_property ("y2", 0.0);
+       transport_punchin_line->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->set_property ("x1", 0.0);
-       transport_punchout_line->set_property ("y1", 0.0);
-       transport_punchout_line->set_property ("x2", 0.0);
-       transport_punchout_line->set_property ("y2", 0.0);
+       transport_punchout_line->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->set_property ("fill_color_rgba", color_map[cZoomRectFill]);
-       zoom_rect->set_property ("outline_color_rgba", color_map[cZoomRect]);
-       zoom_rect->set_property ("outline_pixels", 1);
+       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->set_property ("outline_color_rgba", color_map[cRubberBandRect]);
-       rubberband_rect->set_property ("fill_color_rgba", (guint32) color_map[cRubberBandRectFill]);
-       rubberband_rect->set_property ("outline_pixels", 1);
+       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));
@@ -1242,18 +1242,18 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
                        strcat (txt, _(txt2));
                        
                        first_action_message = new ArdourCanvas::Text (*track_canvas.root());
-                       first_action_message->set_property ("font_desc", font);
-                       first_action_message->set_property ("fill_color_rgba", color_map[cFirstActionMessage]);
-                       first_action_message->set_property ("x", (gdouble) (canvas_width - pixel_width) / 2.0);
-                       first_action_message->set_property ("y", (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height)));
-                       first_action_message->set_property ("anchor", GTK_ANCHOR_NORTH_WEST);
-                       first_action_message->set_property ("text", ustring (txt));
+                       first_action_message->property_font_desc() = font;
+                       first_action_message->property_fill_color_rgba() = color_map[cFirstActionMessage];
+                       first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
+                       first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
+                       first_action_message->property_anchor() = ANCHOR_NORTH_WEST;
+                       first_action_message->property_text() = ustring (txt);
                        
                } else {
 
                        /* center it */
-                       first_action_message->set_property ("x", (gdouble) (canvas_width - pixel_width) / 2.0),
-                       first_action_message->set_property ("y", (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height)));
+                       first_action_message->property_x() = (gdouble) (canvas_width - pixel_width) / 2.0;
+                       first_action_message->property_y() = (gdouble) (canvas_height/2.0) - (2.0 * (pixel_height));
                }
        }
 
@@ -1325,31 +1325,31 @@ Editor::reset_scrolling_region (Gtk::Allocation* alloc)
        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->set_property("points", marker_drag_line_points);
+               marker_drag_line->property_points() = marker_drag_line_points;
        }
        if (range_marker_drag_rect) {
-               range_marker_drag_rect->set_property("y1", 0.0);
-               range_marker_drag_rect->set_property("y2", (double) canvas_height);
+               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->set_property("y1", 0.0);
-               transport_loop_range_rect->set_property("y2", (double) canvas_height);
+               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->set_property("y1", 0.0);
-               transport_punch_range_rect->set_property("y2", (double) canvas_height);
+               transport_punch_range_rect->property_y1() = 0.0;
+               transport_punch_range_rect->property_y2() = (double) canvas_height;
        }
 
        if (transport_punchin_line) {
-               transport_punchin_line->set_property("y1", 0.0);
-               transport_punchin_line->set_property("y2", (double) canvas_height);
+               transport_punchin_line->property_y1() = 0.0;
+               transport_punchin_line->property_y2() = (double) canvas_height;
        }
 
        if (transport_punchout_line) {
-               transport_punchout_line->set_property("y1", 0.0);
-               transport_punchout_line->set_property("y2", (double) canvas_height);
+               transport_punchout_line->property_y1() = 0.0;
+               transport_punchout_line->property_y2() = (double) canvas_height;
        }
                
        update_fixed_rulers ();
@@ -3818,15 +3818,15 @@ 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}
        */
-       verbose_canvas_cursor->set_property("text", txt.c_str());
-       verbose_canvas_cursor->set_property("x", x);
-       verbose_canvas_cursor->set_property("y", y);
+       verbose_canvas_cursor->property_text() = txt.c_str();
+       verbose_canvas_cursor->property_x() = x;
+       verbose_canvas_cursor->property_y() = y;
 }
 
 void
 Editor::set_verbose_canvas_cursor_text (string txt)
 {
-       verbose_canvas_cursor->set_property("text", txt.c_str());
+       verbose_canvas_cursor->property_text() = txt.c_str();
 }
 
 void
index d8c8d2a229fa9b6fdef3a351f767ccba5607c04d..5dd5e237e1eb33ddb2f995c1f1392cff132c2c44 100644 (file)
@@ -1226,12 +1226,12 @@ class Editor : public PublicEditor
 
        ARDOUR::TempoMap::BBTPointList *current_bbt_points;
        
-       typedef vector<ArdourCanvas::Line*> TimeLineList;
+       typedef vector<ArdourCanvas::SimpleLine*> TimeLineList;
        TimeLineList free_measure_lines;
        TimeLineList used_measure_lines;
 
        ArdourCanvas::Group* time_line_group;
-       ArdourCanvas::Line* get_time_line ();
+       ArdourCanvas::SimpleLine* get_time_line ();
        void hide_measures ();
        void draw_measures ();
        void draw_time_bars ();
@@ -1448,7 +1448,7 @@ class Editor : public PublicEditor
 
        bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
        
-       ArdourCanvas::Item   *rubberband_rect;
+       ArdourCanvas::SimpleRect   *rubberband_rect;
        
        /* mouse zoom process */
 
@@ -1456,7 +1456,7 @@ class Editor : public PublicEditor
        void drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
        void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
 
-       ArdourCanvas::Item   *zoom_rect;
+       ArdourCanvas::SimpleRect   *zoom_rect;
        void reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end);
        
        /* diskstream/route display management */
index b2b64e55450a46ffedd666e0ae81f2ce0dcdc8d8..c4bd2081e7890ca80fc3fe385ebef8c767375eea 100644 (file)
@@ -75,8 +75,8 @@ bool
 Editor::track_canvas_motion (GdkEvent *ev)
 {
        if (verbose_cursor_visible) {
-               verbose_canvas_cursor->set_property ("x", ev->motion.x + 20);
-               verbose_canvas_cursor->set_property ("y", ev->motion.y + 20);
+               verbose_canvas_cursor->property_x() = ev->motion.x + 20;
+               verbose_canvas_cursor->property_y() = ev->motion.y + 20;
        }
        return false;
 }
index 8c4e3aec8f4ca81fc1a6c129e12df81c1d32ed40..2d4bebf8b64b079f202cf4d8762fd1c1bc211fc5 100644 (file)
@@ -850,8 +850,8 @@ Editor::update_loop_range_view (bool visibility)
                double x1 = frame_to_pixel (tll->start());
                double x2 = frame_to_pixel (tll->end());
                
-               transport_loop_range_rect->set_property ("x1", x1);
-               transport_loop_range_rect->set_property ("x2", x2);
+               transport_loop_range_rect->property_x1() = x1;
+               transport_loop_range_rect->property_x2() = x2;
                
                if (visibility) {
                        transport_loop_range_rect->show();
@@ -876,8 +876,8 @@ Editor::update_punch_range_view (bool visibility)
                double x1 = frame_to_pixel (tpl->start());
                double x2 = frame_to_pixel (tpl->end());
                
-               transport_punch_range_rect->set_property ("x1", x1);
-               transport_punch_range_rect->set_property ("x2", x2);
+               transport_punch_range_rect->property_x1() = x1;
+               transport_punch_range_rect->property_x2() = x2;
                
                if (visibility) {
                        transport_punch_range_rect->show();
index fb2bfafc5d216206a46a30f4bd95f2bc7d338090..03e6d43e720fe9b1e4e13cda09b6a641beec990b 100644 (file)
@@ -1171,7 +1171,9 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
                
        case GainLineItem:
                if (mouse_mode == MouseGain) {
-                       item->set_property ("fill_color_rgba", color_map[cEnteredGainLine]);
+                       ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
+                       if (line)
+                               line->property_fill_color_rgba() = color_map[cEnteredGainLine];
                        if (is_drawable()) {
                                track_canvas_scroller.get_window()->set_cursor (*fader_cursor);
                        }
@@ -1181,7 +1183,11 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
        case GainAutomationLineItem:
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
-               item->set_property ("fill_color_rgba", color_map[cEnteredAutomationLine]);
+               {
+                       ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
+                       if (line)
+                               line->property_fill_color_rgba() = color_map[cEnteredAutomationLine];
+               }
                if (is_drawable()) {
                        track_canvas_scroller.get_window()->set_cursor (*fader_cursor);
                }
@@ -1276,8 +1282,11 @@ Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
        case FadeInHandleItem:
        case FadeOutHandleItem:
                if (mouse_mode == MouseObject) {
-                       item->set_property ("fill_color_rgba", 0);
-                       item->set_property ("outline_pixels", 1);
+                       ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
+                       if (rect) {
+                               rect->property_fill_color_rgba() = 0;
+                               rect->property_outline_pixels() = 1;
+                       }
                }
                break;
 
@@ -1363,7 +1372,11 @@ Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_
        case RedirectAutomationLineItem:
        case PanAutomationLineItem:
                al = reinterpret_cast<AutomationLine*> (gtk_object_get_data (GTK_OBJECT(item),"line"));
-               item->set_property ("fill_color_rgba", al->get_line_color());
+               {
+                       ArdourCanvas::Line *line = dynamic_cast<ArdourCanvas::Line *> (item);
+                       if (line)
+                               line->property_fill_color_rgba() = al->get_line_color();
+               }
                if (is_drawable()) {
                        track_canvas_scroller.get_window()->set_cursor (*current_canvas_cursor);
                }
@@ -1407,8 +1420,13 @@ 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"));
-               item->set_property ("fill_color_rgba", rv->get_fill_color());
-               item->set_property ("outline_pixels", 0);
+               {
+                       ArdourCanvas::SimpleRect *rect = dynamic_cast<ArdourCanvas::SimpleRect *> (item);
+                       if (rect) {
+                               rect->property_fill_color_rgba() = rv->get_fill_color();
+                               rect->property_outline_pixels() = 0;
+                       }
+               }
                break;
 
        case AutomationTrackItem:
@@ -1943,11 +1961,11 @@ Editor::update_marker_drag_item (Location *location)
        if (location->is_mark()) {
                marker_drag_line_points.front().set_x(x1);
                marker_drag_line_points.back().set_x(x1);
-               marker_drag_line->set_property ("points", marker_drag_line_points);
+               marker_drag_line->property_points() = marker_drag_line_points;
        }
        else {
-               range_marker_drag_rect->set_property ("x1", x1);
-               range_marker_drag_rect->set_property ("x2", x2);
+               range_marker_drag_rect->property_x1() = x1;
+               range_marker_drag_rect->property_x2() = x2;
        }
 }
 
@@ -4121,7 +4139,7 @@ Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
 {
        jack_nframes_t start = 0;
        jack_nframes_t end = 0;
-       ArdourCanvas::Item* crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
+       ArdourCanvas::SimpleRect *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);
@@ -4176,8 +4194,8 @@ Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
 
                double x1 = frame_to_pixel (start);
                double x2 = frame_to_pixel (end);
-               crect->set_property ("x1", x1);
-               crect->set_property ("x2", x2);
+               crect->property_x1() = x1;
+               crect->property_x2() = x2;
 
                update_marker_drag_item (temp_location);
        }
@@ -4314,10 +4332,10 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
        double x2 = frame_to_pixel (end);
        double y2 = canvas_height - 2;
 
-       zoom_rect->set_property ("x1", x1);
-       zoom_rect->set_property ("y1", 1.0);
-       zoom_rect->set_property ("x2", x2);
-       zoom_rect->set_property ("y2", y2);
+       zoom_rect->property_x1() = x1;
+       zoom_rect->property_y1() = 1.0;
+       zoom_rect->property_x2() = x2;
+       zoom_rect->property_y2() = y2;
 }
 
 void
index c3436119672683f2c8378510e06103a89a073002..217d99438f994150924097443334f6b00552895b 100644 (file)
@@ -37,7 +37,7 @@
 
 #include "editor.h"
 #include "marker.h"
-#include "canvas-simpleline.h"
+#include "simpleline.h"
 #include "tempo_dialog.h"
 #include "rgb_macros.h"
 #include "gui_thread.h"
@@ -126,13 +126,13 @@ Editor::hide_measures ()
        used_measure_lines.clear ();
 }
 
-ArdourCanvas::Line *
+ArdourCanvas::SimpleLine *
 Editor::get_time_line ()
 {
-         ArdourCanvas::Line *line;
+         ArdourCanvas::SimpleLine *line;
 
        if (free_measure_lines.empty()) {
-               line = new ArdourCanvas::Line (*time_line_group);
+               line = new ArdourCanvas::SimpleLine (*time_line_group);
                // cerr << "measure line @ " << line << endl;
                used_measure_lines.push_back (line);
        } else {
@@ -153,7 +153,7 @@ Editor::draw_measures ()
 
        TempoMap::BBTPointList::iterator i;
        TempoMap::BBTPointList *all_bbt_points;
-       ArdourCanvas::Line *line;
+       ArdourCanvas::SimpleLine *line;
        gdouble xpos, last_xpos;
        uint32_t cnt;
        uint32_t color;
@@ -215,10 +215,10 @@ Editor::draw_measures ()
 
                        if (cnt == 0 || xpos - last_xpos > 4.0) {
                                line = get_time_line ();
-                               line->set_property ("x1", xpos);
-                               line->set_property ("x2", xpos);
-                               line->set_property ("y2", (gdouble) canvas_height);
-                               line->set_property ("color_rgba", color);
+                               line->property_x1() = xpos;
+                               line->property_x2() = xpos;
+                               line->property_y2() = (gdouble) canvas_height;
+                               line->property_color_rgba() = color;
                                line->raise_to_top();
                                line->show();
                                last_xpos = xpos;       
index 0a001da0b6ddff4ae9fe97052bad119c043668ab..2cd26014061273df3b7ecae0f3b85d602db6847a 100644 (file)
@@ -16,16 +16,16 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
   //                        "y", 0.0,
   //                        NULL);
        group = new ArdourCanvas::Group (*trackview.canvas_display);
-       group->set_property ("x", initial_pos);
-       group->set_property ("y", 0.0);
+       group->property_x() = initial_pos;
+       group->property_y() = 0.0;
 
        base_rect = new ArdourCanvas::SimpleRect (*group);
-       base_rect->set_property ("x1", (double) 0.0);
-       base_rect->set_property ("y1", (double) 0.0);
-       base_rect->set_property ("y2", (double) trackview.height);
-       base_rect->set_property ("outline_what", (guint32) 0);
-       base_rect->set_property ("outline_color_rgba", color_map[cGhostTrackBaseOutline]);
-       base_rect->set_property ("fill_color_rgba", color_map[cGhostTrackBaseFill]);
+       base_rect->property_x1() = (double) 0.0;
+       base_rect->property_y1() = (double) 0.0;
+       base_rect->property_y2() = (double) trackview.height;
+       base_rect->property_outline_what() = (guint32) 0;
+       base_rect->property_outline_color_rgba() = color_map[cGhostTrackBaseOutline];
+       base_rect->property_fill_color_rgba() = color_map[cGhostTrackBaseFill];
        group->lower_to_bottom ();
 
        atv.add_ghost (this);
@@ -49,7 +49,7 @@ GhostRegion::set_samples_per_unit (double spu)
 void
 GhostRegion::set_duration (double units)
 {
-        base_rect->set_property ("x2", units);
+        base_rect->property_x2() = units;
 }
 
 void
@@ -59,7 +59,7 @@ GhostRegion::set_height ()
        vector<WaveView*>::iterator i;
        uint32_t n;
 
-       base_rect->set_property ("y2", (double) trackview.height);
+       base_rect->property_y2() = (double) trackview.height;
        ht = ((trackview.height) / (double) waves.size());
        
        for (n = 0, i = waves.begin(); i != waves.end(); ++i, ++n) {
index 68a404936f82407b42c83471e1a0493074ec115a..8ebdeec5355e628931f74920880aef56f977ab78 100644 (file)
@@ -271,11 +271,11 @@ ImageFrameView::set_height (gdouble h)
        frame_handle_start->raise_to_top();
        frame_handle_end->raise_to_top();
  
-       name_text->set_property ("y", h - TimeAxisViewItem::NAME_Y_OFFSET);
-       frame->set_property ("y2", h);
+       name_text->property_y() = h - TimeAxisViewItem::NAME_Y_OFFSET;
+       frame->property_y2() = h;
 
-       name_highlight->set_property ("y1", (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
-       name_highlight->set_property ("y2", (gdouble) h - 1.0);
+       name_highlight->property_y1() = (gdouble) h - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE;
+       name_highlight->property_y2() = (gdouble) h - 1.0;
 }
 
 
index e5d792988b3ca9ac9365fc07707a9202fb1301e6..a15697eb2067ddb4bfcbf7407b798f333fe779ee 100644 (file)
@@ -241,23 +241,23 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con
        unit_position -= shift;
 
        group = &parent;
-       group->set_property ("x", unit_position);
-       group->set_property ("y", 1.0);
+       group->property_x() = unit_position;
+       group->property_y() = 1.0;
        // cerr << "set mark al points, nc = " << points->num_points << endl;
        mark = new Polygon (*group);
-       mark->set_property ("points", points);
-       mark->set_property ("fill_color_rgba", rgba);
-       mark->set_property ("outline_color", Gdk::Color ("black"));
+       mark->property_points() = *points;
+       mark->property_fill_color_rgba() = rgba;
+       mark->property_outline_color() = "black";
 
        Pango::FontDescription font = get_font_for_style (N_("MarkerText"));
 
        text = new Text (*group);
-       text->set_property ("text", annotation.c_str());
-       text->set_property ("x", label_offset);
-       text->set_property ("y", 0.0);
-       text->set_property ("fontdesc", font);
-       text->set_property ("anchor", Gtk::ANCHOR_NW);
-       text->set_property ("fill_color", Gdk::Color ("black"));
+       text->property_text() = annotation.c_str();
+       text->property_x() = label_offset;
+       text->property_y() = 0.0;
+       text->property_font_desc() = font;
+       text->property_anchor() = Gtk::ANCHOR_NW;
+       text->property_fill_color() = "black";
 
        editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
 
@@ -286,7 +286,7 @@ Marker::the_item() const
 void
 Marker::set_name (const string& name)
 {
-       text->set_property ("text", name.c_str());
+       text->property_text() = name.c_str();
 }
 
 void
@@ -320,7 +320,7 @@ Marker::hide ()
 void
 Marker::set_color_rgba (uint32_t color)
 {
-       mark->set_property ("fill_color_rgba", color);
+       mark->property_fill_color_rgba() = color;
 }
 
 /***********************************************************************/
index c1374c4f962f5c0cfe4cf66bd360d46edf9b84e7..53010300b17f5f920ce9b058b355dcc8aa49136c 100644 (file)
@@ -57,12 +57,12 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
        canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
 
        canvas_rect =  new ArdourCanvas::SimpleRect (*canvas_group);
-       canvas_rect->set_property ("x1", 0.0);
-       canvas_rect->set_property ("y1", 0.0);
-       canvas_rect->set_property ("x2", 1000000.0);
-       canvas_rect->set_property ("y2", (double)20);
-       canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]);
-       canvas_rect->set_property ("fill_color_rgba", stream_base_color);
+       canvas_rect->property_x1() = 0.0;
+       canvas_rect->property_y1() = 0.0;
+       canvas_rect->property_x2() = 1000000.0;
+       canvas_rect->property_y2() = (double)20;
+       canvas_rect->property_outline_color_rgba() = color_map[cMarkerTrackOutline];
+       canvas_rect->property_fill_color_rgba() = stream_base_color;
                   
        canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
 
@@ -142,8 +142,8 @@ MarkerTimeAxisView::set_height(gdouble h)
 int
 MarkerTimeAxisView::set_position(gdouble x, gdouble y)
 {
-       canvas_group->set_property ("x", x);
-       canvas_group->set_property ("y", y);
+       canvas_group->property_x() = x;
+       canvas_group->property_y() = y;
        return 0;
 }
 
index 1556038aac3fc2ae7a5b239a74f779d8c6765a36..b07869bea57a2ea8fb9489adf4795d42d055cf96 100644 (file)
@@ -112,15 +112,15 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView
 
        sync_mark =  new ArdourCanvas::Polygon (*group);
        sync_mark->property_points() = shape;
-       sync_mark->set_property ("fill_color_rgba", fill_color);
+       sync_mark->property_fill_color_rgba() = fill_color;
        sync_mark->hide();
 
        fade_in_shape = new ArdourCanvas::Polygon (*group);
-       fade_in_shape->set_property ("fill_color_rgba", fade_color);
+       fade_in_shape->property_fill_color_rgba() = fade_color;
        fade_in_shape->set_data ("regionview", this);
        
        fade_out_shape = new ArdourCanvas::Polygon (*group);
-       fade_out_shape->set_property ("fill_color_rgba", fade_color);
+       fade_out_shape->property_fill_color_rgba() = fade_color;
        fade_out_shape->set_data ("regionview", this);
        
 
@@ -131,18 +131,18 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView
        
 
        fade_in_handle = new ArdourCanvas::SimpleRect (*group);
-       fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
-       fade_in_handle->set_property ("outline_pixels", 0);
-       fade_in_handle->set_property ("y1", 2.0);
-       fade_in_handle->set_property ("y2", 7.0);
+       fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,0);
+       fade_in_handle->property_outline_pixels() = 0;
+       fade_in_handle->property_y1() = 2.0;
+       fade_in_handle->property_y2() = 7.0;
 
        fade_in_handle->set_data ("regionview", this);
        
        fade_out_handle = new ArdourCanvas::SimpleRect (*group);
-       fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
-       fade_out_handle->set_property ("outline_pixels", 0);
-       fade_out_handle->set_property ("y1", 2.0);
-       fade_out_handle->set_property ("y2", 7.0);
+       fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,0);
+       fade_out_handle->property_outline_pixels() = 0;
+       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);
        }
@@ -312,14 +312,14 @@ AudioRegionView::fade_in_active_changed ()
 
        if (region.fade_in_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
-               fade_in_shape->set_property ("fill_color_rgba", col);
-               fade_in_shape->set_property ("width_pixels", 0);
-               fade_in_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,0));
+               fade_in_shape->property_fill_color_rgba() = col;
+               fade_in_shape->property_width_pixels() = 0;
+               fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,0);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
-               fade_in_shape->set_property ("fill_color_rgba", col);
-               fade_in_shape->set_property ("width_pixels", 1);
-               fade_in_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,255));
+               fade_in_shape->property_fill_color_rgba() = col;
+               fade_in_shape->property_width_pixels() = 1;
+               fade_in_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,255);
        }
 }
 
@@ -332,14 +332,14 @@ AudioRegionView::fade_out_active_changed ()
 
        if (region.fade_out_active()) {
                col = RGBA_TO_UINT(r,g,b,120);
-               fade_out_shape->set_property ("fill_color_rgba", col);
-               fade_out_shape->set_property ("width_pixels", 0);
-               fade_out_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,0));
+               fade_out_shape->property_fill_color_rgba() = col;
+               fade_out_shape->property_width_pixels() = 0;
+               fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,0);
        } else { 
                col = RGBA_TO_UINT(r,g,b,0);
-               fade_out_shape->set_property ("fill_color_rgba", col);
-               fade_out_shape->set_property ("width_pixels", 1);
-               fade_out_shape->set_property ("outline_color_rgba", RGBA_TO_UINT(r,g,b,255));
+               fade_out_shape->property_fill_color_rgba() = col;
+               fade_out_shape->property_width_pixels() = 1;
+               fade_out_shape->property_outline_color_rgba() = RGBA_TO_UINT(r,g,b,255);
        }
 }
 
@@ -401,7 +401,7 @@ AudioRegionView::reset_width_dependent_items (double pixel_width)
        _pixel_width = pixel_width;
 
        if (zero_line) {
-               zero_line->set_property ("x2", pixel_width - 1.0);
+               zero_line->property_x2() = pixel_width - 1.0;
        }
 
        if (pixel_width <= 6.0) {
@@ -543,8 +543,8 @@ AudioRegionView::manage_zero_line ()
 
        if (_height >= 100) {
                gdouble wave_midpoint = (_height - NAME_HIGHLIGHT_SIZE) / 2.0;
-               zero_line->set_property ("y1", wave_midpoint);
-               zero_line->set_property ("y2", wave_midpoint);
+               zero_line->property_y1() = wave_midpoint;
+               zero_line->property_y2() = wave_midpoint;
                zero_line->show();
        } else {
                zero_line->hide();
@@ -591,8 +591,8 @@ AudioRegionView::reset_fade_in_shape_width (jack_nframes_t width)
                handle_center = 3.0;
        }
        
-       fade_in_handle->set_property ("x1",  handle_center - 3.0);
-       fade_in_handle->set_property ("x2",  handle_center + 3.0);
+       fade_in_handle->property_x1() =  handle_center - 3.0;
+       fade_in_handle->property_x2() =  handle_center + 3.0;
        
        if (pwidth < 5) {
                fade_in_shape->hide();
@@ -671,8 +671,8 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
                handle_center = 3.0;
        }
        
-       fade_out_handle->set_property ("x1",  handle_center - 3.0);
-       fade_out_handle->set_property ("x2",  handle_center + 3.0);
+       fade_out_handle->property_x1() =  handle_center - 3.0;
+       fade_out_handle->property_x2() =  handle_center + 3.0;
 
        /* don't show shape if its too small */
        
@@ -716,7 +716,7 @@ AudioRegionView::reset_fade_out_shape_width (jack_nframes_t width)
 
        (*points)[pi] = (*points)[0];
 
-       fade_out_shape->set_property ("points", *points);
+       fade_out_shape->property_points() = *points;
        delete points;
 }
 
@@ -779,7 +779,7 @@ AudioRegionView::set_colors ()
        TimeAxisViewItem::set_colors ();
        
        gain_line->set_line_color (region.envelope_active() ? color_map[cGainLine] : color_map[cGainLineInactive]);
-       sync_mark->set_property ("fill_color_rgba", fill_color);
+       sync_mark->property_fill_color_rgba() = fill_color;
 
        for (uint32_t n=0; n < waves.size(); ++n) {
                if (region.muted()) {
@@ -988,10 +988,10 @@ AudioRegionView::create_waves ()
        }
 
        if (create_zero_line) {
-               zero_line = new ArdourCanvas::Line (*group);
-               zero_line->set_property ("x1", (gdouble) 1.0);
-               zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
-               zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
+               zero_line = new ArdourCanvas::SimpleLine (*group);
+               zero_line->property_x1() = (gdouble) 1.0;
+               zero_line->property_x2() = (gdouble) (region.length() / samples_per_unit) - 1.0;
+               zero_line->property_color_rgba() = (guint) color_map[cZeroLine];
                manage_zero_line ();
        }
 }
@@ -1077,10 +1077,10 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
                tmp_waves.clear ();
                
                if (!zero_line) {
-                       zero_line = new ArdourCanvas::Line (*group);
-                       zero_line->set_property ("x1", (gdouble) 1.0);
-                       zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
-                       zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
+                       zero_line = new ArdourCanvas::SimpleLine (*group);
+                       zero_line->property_x1() = (gdouble) 1.0;
+                       zero_line->property_x2() = (gdouble) (region.length() / samples_per_unit) - 1.0;
+                       zero_line->property_color_rgba() = (guint) color_map[cZeroLine];
                        manage_zero_line ();
                }
        }
@@ -1325,8 +1325,8 @@ AudioRegionView::entered ()
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=255;
        
-       fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
-       fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
+       fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
+       fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
 }
 
 void
@@ -1338,8 +1338,8 @@ AudioRegionView::exited ()
        UINT_TO_RGBA(fade_color,&r,&g,&b,&a);
        a=0;
        
-       fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
-       fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,a));
+       fade_in_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
+       fade_out_handle->property_fill_color_rgba() = RGBA_TO_UINT(r,g,b,a);
 }
 
 void
index ee42e6209ffd0699d6ba85dfde5512c279aeeeb7..5468abaaf84100e9c035ea2542d7e418da856efe 100644 (file)
@@ -126,7 +126,7 @@ class AudioRegionView : public TimeAxisViewItem
     vector<ArdourCanvas::WaveView *> tmp_waves; /* see ::create_waves()*/
     ArdourCanvas::Polygon* sync_mark; /* polgyon for sync position */
     ArdourCanvas::Text* no_wave_msg; /* text */
-    ArdourCanvas::Line* zero_line; /* simpleline */
+    ArdourCanvas::SimpleLine* zero_line; /* simpleline */
     ArdourCanvas::Polygon* fade_in_shape; /* polygon */
     ArdourCanvas::Polygon* fade_out_shape; /* polygon */
     ArdourCanvas::SimpleRect* fade_in_handle; /* simplerect */
index 72d657c1274b507dd4370f4384ac0e0516f13629..7ad23bb0eef6ccd1fab166317ce489b02c7bfcde 100644 (file)
@@ -63,14 +63,14 @@ StreamView::StreamView (AudioTimeAxisView& tv)
        //                         "fill_color_rgba", stream_base_color,
        //      ]                  NULL);
        canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
-       canvas_rect->set_property ("x1", 0.0);
-       canvas_rect->set_property ("y1", 0.0);
-       canvas_rect->set_property ("x2", 1000000.0);
-       canvas_rect->set_property ("y2", (double) tv.height);
-       canvas_rect->set_property ("outline_color_rgba", color_map[cAudioTrackOutline]);
+       canvas_rect->property_x1() = 0.0;
+       canvas_rect->property_y1() = 0.0;
+       canvas_rect->property_x2() = 1000000.0;
+       canvas_rect->property_y2() = (double) tv.height;
+       canvas_rect->property_outline_color_rgba() = color_map[cAudioTrackOutline];
        /* outline ends and bottom */
-       canvas_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
-       canvas_rect->set_property ("fill_color_rgba", stream_base_color);
+       canvas_rect->property_outline_what() = (guint32) (0x1|0x2|0x8);
+       canvas_rect->property_fill_color_rgba() = stream_base_color;
 
        canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_stream_view_event), canvas_rect, &_trackview));
 
@@ -109,8 +109,8 @@ int
 StreamView::set_position (gdouble x, gdouble y)
 
 {
-       canvas_group->set_property ("x", x);
-       canvas_group->set_property ("y", y);
+       canvas_group->property_x() = x;
+       canvas_group->property_y() = y;
        return 0;
 }
 
@@ -166,8 +166,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 );
 
-               recbox.rectangle->set_property ("x1", xstart);
-               recbox.rectangle->set_property ("x2", xend);
+               recbox.rectangle->property_x1() = xstart;
+               recbox.rectangle->property_x2() = xend;
        }
 
        return 0;
@@ -671,12 +671,12 @@ StreamView::setup_rec_box ()
                        gdouble xend = xstart;
                        
                        ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
-                       rec_rect->set_property ("x1", xstart);
-                       rec_rect->set_property ("y1", 1.0);
-                       rec_rect->set_property ("x2", xend);
-                       rec_rect->set_property ("y2", (double) _trackview.height - 1);
-                       rec_rect->set_property ("outline_color_rgba", color_map[cRecordingRectOutline]);
-                       rec_rect->set_property ("fill_color_rgba",  color_map[cRecordingRectFill]);
+                       rec_rect->property_x1() = xstart;
+                       rec_rect->property_y1() = 1.0;
+                       rec_rect->property_x2() = xend;
+                       rec_rect->property_y2() = (double) _trackview.height - 1;
+                       rec_rect->property_outline_color_rgba() = color_map[cRecordingRectOutline];
+                       rec_rect->property_fill_color_rgba() =  color_map[cRecordingRectFill];
                        
                        RecBoxInfo recbox;
                        recbox.rectangle = rec_rect;
@@ -763,8 +763,8 @@ StreamView::update_rec_box ()
                gdouble xstart = _trackview.editor.frame_to_pixel ( rect.start );
                gdouble xend = _trackview.editor.frame_to_pixel ( at );
 
-               rect.rectangle->set_property ("x1", xstart);
-               rect.rectangle->set_property ("x2", xend);
+               rect.rectangle->property_x1() = xstart;
+               rect.rectangle->property_x2() = xend;
        }
 }
 
@@ -857,9 +857,9 @@ StreamView::update_rec_regions ()
                                                }
 
                                                /* also update rect */
-                                               ArdourCanvas::Item * rect = rec_rects[n].rectangle;
+                                               ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle;
                                                gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
-                                               rect->set_property ("x2", xend);
+                                               rect->property_x2() = xend;
                                        }
                                }
 
index 8f4c31aead4685db48a1520b2d7b83c57b68a4d1..fb6b5cf6a50a70e5d3e06efab945f4b62eea0a36 100644 (file)
@@ -91,22 +91,22 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& par
        group = new ArdourCanvas::Group (parent);
 
        vestigial_frame = new ArdourCanvas::SimpleRect (*group);
-       vestigial_frame->set_property ("x1", (double) 0.0);
-       vestigial_frame->set_property ("y1", (double) 1.0);
-       vestigial_frame->set_property ("x2", 2.0);
-       vestigial_frame->set_property ("y2", (double) trackview.height);
-       vestigial_frame->set_property ("outline_color_rgba", color_map[cVestigialFrameOutline]);
-       vestigial_frame->set_property ("fill_color_rgba", color_map[cVestigialFrameFill]);
+       vestigial_frame->property_x1() = (double) 0.0;
+       vestigial_frame->property_y1() = (double) 1.0;
+       vestigial_frame->property_x2() = 2.0;
+       vestigial_frame->property_y2() = (double) trackview.height;
+       vestigial_frame->property_outline_color_rgba() = color_map[cVestigialFrameOutline];
+       vestigial_frame->property_fill_color_rgba() = color_map[cVestigialFrameFill];
        vestigial_frame->hide ();
 
        if (visibility & ShowFrame) {
                frame = new ArdourCanvas::SimpleRect (*group);
-               frame->set_property ("x1", (double) 0.0);
-               frame->set_property ("y1", (double) 1.0);
-               frame->set_property ("x2", (double) trackview.editor.frame_to_pixel(duration));
-               frame->set_property ("y2", (double) trackview.height);
-               frame->set_property ("outline_color_rgba", color_map[cTimeAxisFrameOutline]);
-               frame->set_property ("fill_color_rgba", color_map[cTimeAxisFrameFill]);
+               frame->property_x1() = (double) 0.0;
+               frame->property_y1() = (double) 1.0;
+               frame->property_x2() = (double) trackview.editor.frame_to_pixel(duration);
+               frame->property_y2() = (double) trackview.height;
+               frame->property_outline_color_rgba() = color_map[cTimeAxisFrameOutline];
+               frame->property_fill_color_rgba() = color_map[cTimeAxisFrameFill];
 
        } else {
                frame = 0;
@@ -114,12 +114,12 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& par
 
        if (visibility & ShowNameHighlight) {
                name_highlight = new ArdourCanvas::SimpleRect (*group);
-               name_highlight->set_property ("x1", (double) 1.0);
-               name_highlight->set_property ("x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1);
-               name_highlight->set_property ("y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
-               name_highlight->set_property ("y2", (double) (trackview.height - 1));
-               name_highlight->set_property ("outline_color_rgba", color_map[cNameHighlightFill]);
-               name_highlight->set_property ("fill_color_rgba", color_map[cNameHighlightOutline]);
+               name_highlight->property_x1() = (double) 1.0;
+               name_highlight->property_x2() = (double) (trackview.editor.frame_to_pixel(item_duration)) - 1;
+               name_highlight->property_y1() = (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE);
+               name_highlight->property_y2() = (double) (trackview.height - 1);
+               name_highlight->property_outline_color_rgba() = color_map[cNameHighlightFill];
+               name_highlight->property_fill_color_rgba() = color_map[cNameHighlightOutline];
 
                name_highlight->set_data ("timeaxisviewitem", this);
 
@@ -129,10 +129,10 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& par
 
        if (visibility & ShowNameText) {
                name_text = new ArdourCanvas::Text (*group);
-               name_text->set_property ("x", (double) TimeAxisViewItem::NAME_X_OFFSET);
-               name_text->set_property ("y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET);
-               name_text->set_property ("font", NAME_FONT);
-               name_text->set_property ("anchor", GTK_ANCHOR_NW);
+               name_text->property_x() = (double) TimeAxisViewItem::NAME_X_OFFSET;
+               name_text->property_y() = (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET;
+               name_text->property_font_desc() = NAME_FONT;
+               name_text->property_anchor() = Gtk::ANCHOR_NW;
 
                name_text->set_data ("timeaxisviewitem", this);
                
@@ -144,20 +144,20 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& par
 
        if (visibility & ShowHandles) {
                frame_handle_start = new ArdourCanvas::SimpleRect (*group);
-               frame_handle_start->set_property ("x1", (double) 0.0);
-               frame_handle_start->set_property ("x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH);
-               frame_handle_start->set_property ("y1", (double) 1.0);
-               frame_handle_start->set_property ("y2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH+1);
-               frame_handle_start->set_property ("outline_color_rgba", color_map[cFrameHandleStartOutline]);
-               frame_handle_start->set_property ("fill_color_rgba", color_map[cFrameHandleStartFill]);
+               frame_handle_start->property_x1() = (double) 0.0;
+               frame_handle_start->property_x2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH;
+               frame_handle_start->property_y1() = (double) 1.0;
+               frame_handle_start->property_y2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH+1;
+               frame_handle_start->property_outline_color_rgba() = color_map[cFrameHandleStartOutline];
+               frame_handle_start->property_fill_color_rgba() = color_map[cFrameHandleStartFill];
                
                frame_handle_end = new ArdourCanvas::SimpleRect (*group);
-               frame_handle_end->set_property ("x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH));
-               frame_handle_end->set_property ("x2", (double) trackview.editor.frame_to_pixel(get_duration()));
-               frame_handle_end->set_property ("y1", (double) 1);
-               frame_handle_end->set_property ("y2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH + 1);
-               frame_handle_end->set_property ("outline_color_rgba", color_map[cFrameHandleEndOutline]);
-               frame_handle_end->set_property ("fill_color_rgba", color_map[cFrameHandleEndFill]);
+               frame_handle_end->property_x1() = (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH);
+               frame_handle_end->property_x2() = (double) trackview.editor.frame_to_pixel(get_duration());
+               frame_handle_end->property_y1() = (double) 1;
+               frame_handle_end->property_y2() = (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH + 1;
+               frame_handle_end->property_outline_color_rgba() = color_map[cFrameHandleEndOutline];
+               frame_handle_end->property_fill_color_rgba() = color_map[cFrameHandleEndFill];
 
        } else {
                frame_handle_start = 0;
@@ -493,7 +493,7 @@ void
 TimeAxisViewItem::set_name_text(std::string new_name)
 {
        if (name_text) {
-               name_text->set_property ("text", new_name.c_str());
+               name_text->property_text() = new_name.c_str();
        }
 }
 
@@ -515,31 +515,31 @@ TimeAxisViewItem::set_height(double height)
                }
 
                if (height > NAME_HIGHLIGHT_SIZE) {
-                       name_highlight->set_property ("y1", (double) height+1 - NAME_HIGHLIGHT_SIZE);
-                       name_highlight->set_property ("y2", (double) height);
+                       name_highlight->property_y1() = (double) height+1 - NAME_HIGHLIGHT_SIZE;
+                       name_highlight->property_y2() = (double) height;
                }
                else {
                        /* it gets hidden now anyway */
-                       name_highlight->set_property ("y1", (double) 1.0);
-                       name_highlight->set_property ("y2", (double) height);
+                       name_highlight->property_y1() = (double) 1.0;
+                       name_highlight->property_y2() = (double) height;
                }
        }
 
        if (name_text) {
-               name_text->set_property ("y", height+1 - NAME_Y_OFFSET);
+               name_text->property_y() = height+1 - NAME_Y_OFFSET;
                if (height < NAME_HIGHLIGHT_THRESH) {
-                       name_text->set_property ("fill_color_rgba",  fill_color) ;
+                       name_text->property_fill_color_rgba() =  fill_color;
                }
                else {
-                       name_text->set_property ("fill_color_rgba", label_color) ;
+                       name_text->property_fill_color_rgba() = label_color;
                }
        }
 
        if (frame) {
-               frame->set_property ("y2", height+1) ;
+               frame->property_y2() = height+1;
        }
 
-       vestigial_frame->set_property ("y2", height+1) ;
+       vestigial_frame->property_y2() = height+1;
 }
 
 /**
@@ -697,16 +697,16 @@ TimeAxisViewItem::set_colors()
                }
 
                if (height < NAME_HIGHLIGHT_THRESH) {
-                       name_text->set_property ("fill_color_rgba",  fill_color);
+                       name_text->property_fill_color_rgba() =  fill_color;
                }
                else {
-                       name_text->set_property ("fill_color_rgba", label_color);
+                       name_text->property_fill_color_rgba() = label_color;
                }
        }
 
        if (name_highlight) {
-               name_highlight->set_property ("fill_color_rgba", fill_color);
-               name_highlight->set_property ("outline_color_rgba", fill_color);
+               name_highlight->property_fill_color_rgba() = fill_color;
+               name_highlight->property_outline_color_rgba() = fill_color;
        }
        set_trim_handle_colors() ;
 }
@@ -722,10 +722,10 @@ TimeAxisViewItem::set_frame_color()
                
                if (_selected && should_show_selection) {
                        UINT_TO_RGBA(color_map[cSelectedFrameBase], &r, &g, &b, &a);
-                       frame->set_property ("fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity));
+                       frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity);
                } else {
                        UINT_TO_RGBA(color_map[cFrameBase], &r, &g, &b, &a);
-                       frame->set_property ("fill_color_rgba", RGBA_TO_UINT(r, g, b, fill_opacity));
+                       frame->property_fill_color_rgba() = RGBA_TO_UINT(r, g, b, fill_opacity);
                }
        }
 }
@@ -739,11 +739,11 @@ TimeAxisViewItem::set_trim_handle_colors()
 {
        if (frame_handle_start) {
                if (position_locked) {
-                       frame_handle_start->set_property ("fill_color_rgba", color_map[cTrimHandleLockedStart]);
-                       frame_handle_end->set_property ("fill_color_rgba", color_map[cTrimHandleLockedEnd]);
+                       frame_handle_start->property_fill_color_rgba() = color_map[cTrimHandleLockedStart];
+                       frame_handle_end->property_fill_color_rgba() = color_map[cTrimHandleLockedEnd];
                } else {
-                       frame_handle_start->set_property ("fill_color_rgba", color_map[cTrimHandleStart]);
-                       frame_handle_end->set_property ("fill_color_rgba", color_map[cTrimHandleEnd]);
+                       frame_handle_start->property_fill_color_rgba() = color_map[cTrimHandleStart];
+                       frame_handle_end->property_fill_color_rgba() = color_map[cTrimHandleEnd];
                }
        }
 }
@@ -808,12 +808,12 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
                                reset_name_width (pixel_width);
                        }
 
-                       name_highlight->set_property ("x2", pixel_width - 1.0);
+                       name_highlight->property_x2() = pixel_width - 1.0;
                }
 
                if (frame) {
                        frame->show();
-                       frame->set_property ("x2", pixel_width);
+                       frame->property_x2() = pixel_width;
                }
 
                if (frame_handle_start) {
@@ -822,9 +822,9 @@ TimeAxisViewItem::reset_width_dependent_items (double pixel_width)
                                frame_handle_end->hide();
                        }
                        frame_handle_start->show();
-                       frame_handle_end->set_property ("x1", pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH));
+                       frame_handle_end->property_x1() = pixel_width - (TimeAxisViewItem::GRAB_HANDLE_LENGTH);
                        frame_handle_end->show();
-                       frame_handle_end->set_property ("x2", pixel_width);
+                       frame_handle_end->property_x2() = pixel_width;
                }
        }
 }