forked from AuroraMiddleware/gtk
boxgadget: add APIs to insert gadgets next to siblings
This commit is contained in:
parent
6401e2405e
commit
6370d6cb27
@ -690,6 +690,40 @@ expand_func_from_flags (gboolean hexpand,
|
||||
: (vexpand ? only_vertical : (ComputeExpandFunc) gtk_false);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_box_gadget_insert_gadget_before (GtkBoxGadget *gadget,
|
||||
GtkCssGadget *sibling,
|
||||
GtkCssGadget *cssgadget,
|
||||
gboolean hexpand,
|
||||
gboolean vexpand,
|
||||
GtkAlign align)
|
||||
{
|
||||
/* Insert at the end if no sibling specified */
|
||||
int pos = -1;
|
||||
|
||||
if (sibling)
|
||||
gtk_box_gadget_find_object (gadget, G_OBJECT (sibling), &pos);
|
||||
|
||||
gtk_box_gadget_insert_gadget (gadget, pos, cssgadget, hexpand, vexpand, align);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_box_gadget_insert_gadget_after (GtkBoxGadget *gadget,
|
||||
GtkCssGadget *sibling,
|
||||
GtkCssGadget *cssgadget,
|
||||
gboolean hexpand,
|
||||
gboolean vexpand,
|
||||
GtkAlign align)
|
||||
{
|
||||
/* Insert at the beginning if no sibling specified */
|
||||
int pos = 0;
|
||||
|
||||
if (sibling && gtk_box_gadget_find_object (gadget, G_OBJECT (sibling), &pos))
|
||||
pos++;
|
||||
|
||||
gtk_box_gadget_insert_gadget (gadget, pos, cssgadget, hexpand, vexpand, align);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_box_gadget_insert_gadget (GtkBoxGadget *gadget,
|
||||
int pos,
|
||||
|
@ -72,6 +72,19 @@ void gtk_box_gadget_insert_gadget (GtkBoxGadget
|
||||
gboolean hexpand,
|
||||
gboolean vexpand,
|
||||
GtkAlign align);
|
||||
void gtk_box_gadget_insert_gadget_before (GtkBoxGadget *gadget,
|
||||
GtkCssGadget *sibling,
|
||||
GtkCssGadget *cssgadget,
|
||||
gboolean hexpand,
|
||||
gboolean vexpand,
|
||||
GtkAlign align);
|
||||
void gtk_box_gadget_insert_gadget_after (GtkBoxGadget *gadget,
|
||||
GtkCssGadget *sibling,
|
||||
GtkCssGadget *cssgadget,
|
||||
gboolean hexpand,
|
||||
gboolean vexpand,
|
||||
GtkAlign align);
|
||||
|
||||
void gtk_box_gadget_remove_gadget (GtkBoxGadget *gadget,
|
||||
GtkCssGadget *cssgadget);
|
||||
void gtk_box_gadget_reverse_children (GtkBoxGadget *gadget);
|
||||
|
Loading…
Reference in New Issue
Block a user