mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 15:37:48 +01:00
YTKMM: expose ytk_set_child_packing
This commit is contained in:
parent
ee1a507c36
commit
430b326174
2 changed files with 34 additions and 0 deletions
|
|
@ -134,6 +134,22 @@ void Box::pack_end(Widget& child, PackOptions options, guint padding)
|
|||
gtk_box_pack_end(gobj(), child.gobj(), (gboolean)expand, (gboolean)fill, padding);
|
||||
}
|
||||
|
||||
void Box::set_child_packing(Widget& child, bool expand, bool fill, guint padding)
|
||||
{
|
||||
gboolean p_expand = 0;
|
||||
gboolean p_fill = 0;
|
||||
guint p_padding = 0;
|
||||
GtkPackType p_pack_type = GTK_PACK_START;
|
||||
|
||||
gtk_box_query_child_packing (gobj(), (child).gobj(), &p_expand, &p_fill, &p_padding, &p_pack_type);
|
||||
|
||||
if (p_expand == expand && p_fill == fill && p_padding == padding) {
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_box_set_child_packing(gobj(), (child).gobj(), expand, fill, padding, p_pack_type);
|
||||
}
|
||||
|
||||
|
||||
} /* namespace Gtk */
|
||||
|
||||
|
|
|
|||
|
|
@ -392,6 +392,24 @@ public:
|
|||
*/
|
||||
void pack_end(Widget& child, PackOptions options = PACK_EXPAND_WIDGET, guint padding = 0);
|
||||
|
||||
/** Updates the way @child is packed into @a box The pack-type (start, end) is retained.
|
||||
*
|
||||
* @param child The Widget to be update
|
||||
* @param expand <tt>true</tt> if the new child is to be given extra space allocated to
|
||||
* @a box. The extra space will be divided evenly between all children of
|
||||
* @a box that use this option.
|
||||
* @param fill <tt>true</tt> if space given to @a child by the @a expand option is
|
||||
* actually allocated to @a child, rather than just padding it. This
|
||||
* parameter has no effect if @a expand is set to <tt>false</tt>. A child is
|
||||
* always allocated the full height of a Gtk::HBox and the full width
|
||||
* of a Gtk::VBox. This option affects the other dimension.
|
||||
* @param padding Extra space in pixels to put between this child and its
|
||||
* neighbors, over and above the global amount specified by
|
||||
* Gtk::Box::property_spacing() property. If @a child is a widget at one of the
|
||||
* reference ends of @a box, then @a padding pixels are also put between
|
||||
* @a child and the reference edge of @a box.
|
||||
*/
|
||||
void set_child_packing(Widget& child, bool expand, bool fill, guint padding = 0);
|
||||
|
||||
/** Sets the Gtk::Box::property_homogeneous() property of @a box, controlling
|
||||
* whether or not all children of @a box are given equal space
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue