2014-06-22 09:53:14 -04:00
|
|
|
/*
|
2019-08-02 22:40:09 -04:00
|
|
|
* Copyright (C) 2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2014-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2014-06-22 09:53:14 -04:00
|
|
|
|
|
|
|
#include "canvas/container.h"
|
|
|
|
|
|
|
|
using namespace ArdourCanvas;
|
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
Container::Container (Canvas* canvas)
|
2014-06-22 09:53:14 -04:00
|
|
|
: Item (canvas)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
Container::Container (Item* parent)
|
2014-06-22 09:53:14 -04:00
|
|
|
: Item (parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
Container::Container (Item* parent, Duple const & p)
|
2014-06-22 09:53:14 -04:00
|
|
|
: Item (parent, p)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-04-01 09:02:49 -04:00
|
|
|
void
|
|
|
|
Container::prepare_for_render (Rect const & area) const
|
|
|
|
{
|
|
|
|
Item::prepare_for_render_children (area);
|
|
|
|
}
|
|
|
|
|
2014-06-22 11:41:05 -04:00
|
|
|
void
|
|
|
|
Container::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
|
|
|
{
|
|
|
|
Item::render_children (area, context);
|
|
|
|
}
|
|
|
|
|
2014-06-22 09:53:14 -04:00
|
|
|
void
|
|
|
|
Container::compute_bounding_box () const
|
|
|
|
{
|
2017-01-19 14:54:24 -05:00
|
|
|
_bounding_box = Rect ();
|
2021-07-27 15:21:03 -04:00
|
|
|
/* nothing to do here; Item::bounding_box() will add all children for us */
|
2022-04-27 00:02:22 -04:00
|
|
|
set_bbox_clean ();
|
2014-06-22 09:53:14 -04:00
|
|
|
}
|