summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view_item.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-15 13:50:05 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-15 13:50:05 -0400
commit7e19053b88b4ab174052a44f2ee99dce92517aa9 (patch)
treed996b22ac8661421cc661d336322923deda00f73 /gtk2_ardour/time_axis_view_item.h
parentaf4539f857a14be3856da89a20811bf39e4ffb6e (diff)
Fix dragging objects on the canvas and remove redundant canvas groups
Delivery of fake motion events to the editor needed the event coordinates to be in canvas space, as they are with "real" events. Editor and other objects had many redundant groups from timbyr's work on gnomecanvas to scroll by moving groups. We don't need this anymore with cairo-canvas (though possibly a stationay background group for the canvas might be useful again one day as in the SAE logo. Its implementation would be fairly different though, since we would have to explicitly move the group on every scroll, since nothing else ever moves on scroll). Also tweaks to text item placement, and switch TimeAxisViewItem from name_pixbuf to name_text, since ArdourCanvas::Text is already "pixbuf optimized".
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.h')
-rw-r--r--gtk2_ardour/time_axis_view_item.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h
index 2f4e5f465d..dd6ebe0120 100644
--- a/gtk2_ardour/time_axis_view_item.h
+++ b/gtk2_ardour/time_axis_view_item.h
@@ -33,6 +33,7 @@ namespace ArdourCanvas {
class Rectangle;
class Item;
class Group;
+ class Text;
}
using ARDOUR::framepos_t;
@@ -75,7 +76,6 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
ArdourCanvas::Item* get_canvas_frame();
ArdourCanvas::Group* get_canvas_group();
ArdourCanvas::Item* get_name_highlight();
- ArdourCanvas::Pixbuf* get_name_pixbuf();
virtual void set_samples_per_pixel (double);
@@ -165,7 +165,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
virtual void reset_width_dependent_items (double);
void reset_name_width (double);
- void update_name_pixbuf_visibility ();
+ void update_name_text_visibility ();
static gint idle_remove_this_item(TimeAxisViewItem*, void*);
@@ -228,7 +228,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
uint32_t lock_handle_color_g;
uint32_t lock_handle_color_b;
uint32_t last_item_width;
- int name_pixbuf_width;
+ int name_text_width;
bool wide_enough_for_name;
bool high_enough_for_name;
bool rect_visible;
@@ -236,7 +236,7 @@ class TimeAxisViewItem : public Selectable, public PBD::ScopedConnectionList
ArdourCanvas::Group* group;
ArdourCanvas::Rectangle* vestigial_frame;
ArdourCanvas::Rectangle* frame;
- ArdourCanvas::Pixbuf* name_pixbuf;
+ ArdourCanvas::Text* name_text;
ArdourCanvas::Rectangle* name_highlight;
/* with these two values, if frame_handle_start == 0 then frame_handle_end will also be 0 */