canvas: start to extend size allocation process for box packing
This commit is contained in:
parent
b0e9ad07ca
commit
5e3460aaae
@ -224,6 +224,20 @@ Box::reposition_children ()
|
||||
set (r);
|
||||
}
|
||||
|
||||
void
|
||||
Box::size_request (double& w, double& h) const
|
||||
{
|
||||
w = width();
|
||||
h = height();
|
||||
}
|
||||
|
||||
void
|
||||
Box::size_allocate_children (Rect const & r)
|
||||
{
|
||||
std::cerr << "Box allocated " << r << std::endl;
|
||||
Item::size_allocate_children (r);
|
||||
}
|
||||
|
||||
void
|
||||
Box::add (Item* i)
|
||||
{
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
void set_homogenous (bool);
|
||||
|
||||
void compute_bounding_box () const;
|
||||
void size_request (double& w, double& h) const;
|
||||
void size_allocate_children (Rect const & r);
|
||||
|
||||
protected:
|
||||
Orientation orientation;
|
||||
|
@ -153,6 +153,7 @@ public:
|
||||
|
||||
virtual void preferred_size (Duple& minimum, Duple& natural) const;
|
||||
virtual void size_allocate (Rect const&);
|
||||
virtual void size_allocate_children (Rect const & r);
|
||||
Rect allocation() const { return _allocation; }
|
||||
void set_layout_sensitive (bool);
|
||||
bool layout_sensitive () const { return _layout_sensitive; }
|
||||
@ -353,7 +354,6 @@ public:
|
||||
void add_child_bounding_boxes (bool include_hidden = false) const;
|
||||
void render_children (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const;
|
||||
void prepare_for_render_children (Rect const & area) const;
|
||||
void size_allocate_children (Rect const & r);
|
||||
|
||||
Duple scroll_offset() const;
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user