canvasL Item gets packing options similar to GTK
This commit is contained in:
parent
aa46a91b0c
commit
1a70cf5b8e
@ -236,6 +236,9 @@ public:
|
|||||||
void lower_child_to_bottom (Item *);
|
void lower_child_to_bottom (Item *);
|
||||||
virtual void child_changed (bool bbox_changed);
|
virtual void child_changed (bool bbox_changed);
|
||||||
|
|
||||||
|
PackOptions pack_options () const { return _pack_options; }
|
||||||
|
void set_pack_options (PackOptions);
|
||||||
|
|
||||||
static int default_items_per_cell;
|
static int default_items_per_cell;
|
||||||
|
|
||||||
|
|
||||||
@ -330,6 +333,7 @@ public:
|
|||||||
mutable Rect _bounding_box;
|
mutable Rect _bounding_box;
|
||||||
/** true if _bounding_box might be out of date, false if its definitely not */
|
/** true if _bounding_box might be out of date, false if its definitely not */
|
||||||
mutable bool _bounding_box_dirty;
|
mutable bool _bounding_box_dirty;
|
||||||
|
PackOptions _pack_options;
|
||||||
|
|
||||||
void bb_clean () const;
|
void bb_clean () const;
|
||||||
|
|
||||||
|
@ -195,10 +195,14 @@ struct LIBCANVAS_API Rect
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum PackOptions {
|
enum PackOptions {
|
||||||
PackExpand = 0x1,
|
PackExpand = 0x1, /* use all available space ... */
|
||||||
PackFill = 0x2,
|
PackFill = 0x2, /* if PackExpand set, this means actually
|
||||||
PackFromStart = 0x4,
|
expand size of Item; if PackExpand not
|
||||||
PackFromEnd = 0x8
|
set, this does nothing.
|
||||||
|
*/
|
||||||
|
PackShrink = 0x4, /* allow Item to be smaller than its natural size */
|
||||||
|
PackFromStart = 0x8,
|
||||||
|
PackFromEnd = 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
extern LIBCANVAS_API std::ostream & operator<< (std::ostream &, Rect const &);
|
extern LIBCANVAS_API std::ostream & operator<< (std::ostream &, Rect const &);
|
||||||
|
@ -43,6 +43,7 @@ Item::Item (Canvas* canvas)
|
|||||||
, _scroll_parent (0)
|
, _scroll_parent (0)
|
||||||
, _visible (true)
|
, _visible (true)
|
||||||
, _bounding_box_dirty (true)
|
, _bounding_box_dirty (true)
|
||||||
|
, _pack_options (PackOptions (0))
|
||||||
, _layout_sensitive (false)
|
, _layout_sensitive (false)
|
||||||
, _intrinsic_width (-1.)
|
, _intrinsic_width (-1.)
|
||||||
, _intrinsic_height(-1.)
|
, _intrinsic_height(-1.)
|
||||||
@ -63,6 +64,7 @@ Item::Item (Item* parent)
|
|||||||
, _scroll_parent (0)
|
, _scroll_parent (0)
|
||||||
, _visible (true)
|
, _visible (true)
|
||||||
, _bounding_box_dirty (true)
|
, _bounding_box_dirty (true)
|
||||||
|
, _pack_options (PackOptions (0))
|
||||||
, _layout_sensitive (false)
|
, _layout_sensitive (false)
|
||||||
, _intrinsic_width (-1.)
|
, _intrinsic_width (-1.)
|
||||||
, _intrinsic_height(-1.)
|
, _intrinsic_height(-1.)
|
||||||
@ -90,6 +92,7 @@ Item::Item (Item* parent, Duple const& p)
|
|||||||
, _position (p)
|
, _position (p)
|
||||||
, _visible (true)
|
, _visible (true)
|
||||||
, _bounding_box_dirty (true)
|
, _bounding_box_dirty (true)
|
||||||
|
, _pack_options (PackOptions (0))
|
||||||
, _layout_sensitive (false)
|
, _layout_sensitive (false)
|
||||||
, _intrinsic_width (-1.)
|
, _intrinsic_width (-1.)
|
||||||
, _intrinsic_height(-1.)
|
, _intrinsic_height(-1.)
|
||||||
|
Loading…
Reference in New Issue
Block a user