Commit Graph

19 Commits

Author SHA1 Message Date
Paul Davis f913373351 canvas: change Item::bb_clean() to better named Item::set_bbox_clean() 2022-04-26 22:04:08 -06:00
Mads Kiilerich cb4e10683d
gtkmm: use size_request() function instead of deprecated Gtk::Widget::size_request(&) 2022-04-08 21:11:07 +02:00
Paul Davis 63a74d0911 Canvas: improve behavior of Widget::compute_bounding_box()
Firstly, ::compute_bounding_box() cannot allocate space, so do not try to do that here.
Secondly, if there is no allocation yet, use the CairoWidget's own size_request()
2021-09-10 12:59:29 -06:00
Paul Davis 90322399fc canvas: use fwd decl instead of header inclusion for CairoWidget 2021-09-10 12:15:24 -06:00
Paul Davis b416caf1bb canvas: several steps further with box packing and size allocation 2021-08-13 12:51:37 -06:00
Paul Davis ad6afbe68a canvas: use Item::bb_clean() to mark _bounding_box_dirty false 2021-08-13 12:51:36 -06:00
Robin Gareus 5957e14259
Remove unused #include<> (2/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02:00
Robin Gareus cec5ce8f45
Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Robin Gareus 601c317d70 Clean up library inheritance (colors.h, utils.h)
make libwidget independent of libcanvas.
Confine basics to pbd and gtkmm2ext.
2017-07-17 21:06:04 +02:00
Robin Gareus d06de26a4f Towards a consistent render() API.
This fixes an -Woverloaded-virtual ambiguity introduced in b5e613d45

  void render (cairo_t*, cairo_rectagle*)
  void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*)

ArdourCanvas prefers cairomm and CairoWidget itself uses Cairo::Context,
this improves overall API consistency.
2017-03-20 17:12:08 +01:00
Paul Davis 14cb9ec795 canvas::grid starts being able to do its job a little 2017-02-01 21:58:20 +01:00
Paul Davis 4fa4b9a135 remove use of boost::optional to define "undefined" Canvas::Rect, and use Rect::empty instead.
This commit includes Rect::operator bool() which might be a candidate for removal in a future commit, in an attempt
to make the meaning clearer
2017-01-19 20:54:54 +01:00
Paul Davis 73acd5b413 correct translation matrix for Canvas::Widget 2017-01-19 00:24:54 +01:00
Robin Gareus 004431426d Towards packing CairoWidgets on ArdourCanvas. 2016-12-19 13:36:42 +01:00
David Robillard bd577a0663 Avoid possible use of uninitialized values.
This could only happen with a broken widget, but it shuts up clang and doesn't
hurt.
2014-11-18 02:55:03 -05:00
Paul Davis a8bd6ecc4f refactor Canvas so that all Items have children; add Container abstract base class; rename Group as "Layout" and retain only drawing semantics 2014-06-21 11:43:42 -04:00
Paul Davis 590882f3c8 change Canvas heirarchy and constructors
Items no longer need a parent group (they require a Canvas pointer instead), so all constructors have been rationalized
and have two variants, one with a parent and one with a canvas.

All Items now inherit from Fill and Outline, to banish diagonal inheritance and virtual base classes and all that.

There were zero changes to the Ardour GUI arising from these changes.
2014-06-12 14:53:44 -04:00
Paul Davis 8c79f70eef remove debugging output 2014-06-05 12:04:42 -04:00
Paul Davis 1d354f746a basic, initial structure for canvas widget item 2014-06-05 12:04:42 -04:00