#include "gtk2ardour-config.h"
#endif
-#include <jack/types.h>
-
#include "gtkmm2ext/utils.h"
#include "ardour/profile.h"
/* XXX this is a hack. it ought to be the maximum value of an framepos_t */
-const double max_canvas_coordinate = (double) JACK_MAX_FRAMES;
+const double max_canvas_coordinate = (double) UINT32_MAX;
void
Editor::initialize_canvas ()
// logo_item->property_width_in_pixels() = true;
// logo_item->property_height_set() = true;
// logo_item->property_width_set() = true;
- logo_item->show ();
+ // logo_item->show ();
}
/*a group to hold global rects like punch/loop indicators */
logo_item->lower_to_bottom ();
}
+
+ _canvas_bottom_rect = new ArdourCanvas::Rectangle (_track_canvas->root(), ArdourCanvas::Rect (0.0, 0.0, max_canvas_coordinate, 20));
+ /* this thing is transparent */
+ _canvas_bottom_rect->set_fill (false);
+ _canvas_bottom_rect->set_outline (false);
+ _canvas_bottom_rect->Event.connect (sigc::mem_fun (*this, &Editor::canvas_bottom_rect_event));
+
/* these signals will initially be delivered to the canvas itself, but if they end up remaining unhandled, they are passed to Editor-level
handlers.
*/
track_canvas_viewport_size_allocated ();
}
-bool
+void
Editor::track_canvas_viewport_size_allocated ()
{
bool height_changed = _visible_canvas_height != _canvas_viewport_allocation.get_height();
update_fixed_rulers();
redisplay_tempo (false);
_summary->set_overlays_dirty ();
-
- return false;
}
void
void
Editor::reset_controls_layout_height (int32_t h)
{
+ /* ensure that the rect that represents the "bottom" of the canvas
+ * (the drag-n-drop zone) is, in fact, at the bottom.
+ */
+
+ _canvas_bottom_rect->set_position (ArdourCanvas::Duple (0, h));
+
+ /* track controls layout must span the full height of "h" (all tracks)
+ * plus the bottom rect.
+ */
+
+ h += _canvas_bottom_rect->height ();
+
/* set the height of the scrollable area (i.e. the sum of all contained widgets)
+ * for the controls layout. The size request is set elsewhere.
*/
controls_layout.property_height() = h;
- /* size request is set elsewhere, see ::track_canvas_allocate() */
}
bool