2013-04-15 22:10:18 -04:00
|
|
|
/*
|
2019-08-02 22:40:09 -04:00
|
|
|
* Copyright (C) 2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2013-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.
|
|
|
|
*/
|
2013-04-15 22:10:18 -04:00
|
|
|
|
2020-06-10 17:48:58 -04:00
|
|
|
#include "pbd/stacktrace.h"
|
|
|
|
|
2013-04-04 00:32:52 -04:00
|
|
|
#include "canvas/root_group.h"
|
|
|
|
#include "canvas/canvas.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace ArdourCanvas;
|
|
|
|
|
2014-06-21 11:43:42 -04:00
|
|
|
Root::Root (Canvas* canvas)
|
2014-06-22 11:41:05 -04:00
|
|
|
: Container (canvas)
|
2013-04-04 00:32:52 -04:00
|
|
|
{
|
|
|
|
#ifdef CANVAS_DEBUG
|
|
|
|
name = "ROOT";
|
2015-10-05 10:17:49 -04:00
|
|
|
#endif
|
2013-04-04 00:32:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2021-08-01 23:18:35 -04:00
|
|
|
Root::size_request (Distance& w, Distance& h) const
|
2013-04-04 00:32:52 -04:00
|
|
|
{
|
2020-06-10 17:48:58 -04:00
|
|
|
if (_items.size() == 1) {
|
2021-08-01 23:18:35 -04:00
|
|
|
_items.front()->size_request (w, h);
|
2020-06-10 17:48:58 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-08-01 23:18:35 -04:00
|
|
|
Item::size_request (w, h);
|
2020-06-10 17:48:58 -04:00
|
|
|
}
|
|
|
|
|