stub constraint-based packer for canvas

This commit is contained in:
Paul Davis 2020-05-20 22:29:07 -06:00
parent 33cb376c68
commit 539e1a1f1b
20 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,51 @@
/*
* Copyright (C) 2020 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.
*/
#ifndef __CANVAS_CONSTRAINT_PACKER_H__
#define __CANVAS_CONSTRAINT_PACKER_H__
#include "canvas/item.h"
namespace ArdourCanvas
{
class Rectangle;
class LIBCANVAS_API ConstraintPacker : public Item
{
public:
ConstraintPacker (Canvas *);
ConstraintPacker (Item *);
void compute_bounding_box () const;
void render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const;
protected:
void child_changed ();
private:
Rectangle *self;
bool collapse_on_hide;
void reset_self ();
void reposition_children ();
};
}
#endif