projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OSC: Add group name feedback to strips
[ardour.git]
/
libs
/
canvas
/
tracking_text.cc
diff --git
a/libs/canvas/tracking_text.cc
b/libs/canvas/tracking_text.cc
index 24def571d3d17d95a9b4b87fc1fd291ae42aa10d..1b3004b3b1f5fd4becfbd23e228c8b4233c9dfaa 100644
(file)
--- a/
libs/canvas/tracking_text.cc
+++ b/
libs/canvas/tracking_text.cc
@@
-46,6
+46,7
@@
TrackingText::init ()
{
_canvas->MouseMotion.connect (sigc::mem_fun (*this, &TrackingText::pointer_motion));
set_ignore_events (true);
{
_canvas->MouseMotion.connect (sigc::mem_fun (*this, &TrackingText::pointer_motion));
set_ignore_events (true);
+ set_outline (true);
hide ();
}
hide ();
}
@@
-69,7
+70,7
@@
TrackingText::pointer_motion (Duple const & winpos)
pos = pos.translate (offset);
/* keep inside the window */
pos = pos.translate (offset);
/* keep inside the window */
-
+
Rect r (0, 0, _canvas->width(), _canvas->height());
/* border of 200 pixels on the right, and 50 on all other sides */
Rect r (0, 0, _canvas->width(), _canvas->height());
/* border of 200 pixels on the right, and 50 on all other sides */
@@
-82,7
+83,7
@@
TrackingText::pointer_motion (Duple const & winpos)
r.y1 = std::max (r.y0, (r.y1 - border));
/* clamp */
r.y1 = std::max (r.y0, (r.y1 - border));
/* clamp */
-
+
if (pos.x < r.x0) {
pos.x = r.x0;
} else if (pos.x > r.x1) {
if (pos.x < r.x0) {
pos.x = r.x0;
} else if (pos.x > r.x1) {
@@
-111,7
+112,7
@@
TrackingText::show_and_track (bool tx, bool ty)
if (!was_visible) {
/* move to current pointer location. do this after show() so that
if (!was_visible) {
/* move to current pointer location. do this after show() so that
- * _visible is true, and thus ::pointer_motion() will do
+ * _visible is true, and thus ::pointer_motion() will do
* something.
*/
Duple winpos;
* something.
*/
Duple winpos;
@@
-127,17
+128,23
@@
TrackingText::show_and_track (bool tx, bool ty)
void
TrackingText::set_x_offset (double o)
{
void
TrackingText::set_x_offset (double o)
{
+ begin_change ();
offset.x = o;
offset.x = o;
+ end_change ();
}
void
TrackingText::set_y_offset (double o)
{
}
void
TrackingText::set_y_offset (double o)
{
+ begin_change ();
offset.y = o;
offset.y = o;
+ end_change ();
}
void
TrackingText::set_offset (Duple const & d)
{
}
void
TrackingText::set_offset (Duple const & d)
{
+ begin_change ();
offset = d;
offset = d;
+ end_change ();
}
}