#define GTK_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_BOX, GtkBoxPrivate))
-static void gtk_box_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gtk_box_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gtk_box_size_request (GtkWidget *widget,
- GtkRequisition *requisition);
-static void gtk_box_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation);
-
-static void gtk_box_add (GtkContainer *container,
- GtkWidget *widget);
-static void gtk_box_remove (GtkContainer *container,
- GtkWidget *widget);
-static void gtk_box_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data);
-static void gtk_box_set_child_property (GtkContainer *container,
- GtkWidget *child,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gtk_box_get_child_property (GtkContainer *container,
- GtkWidget *child,
- guint property_id,
- GValue *value,
- GParamSpec *pspec);
-static GType gtk_box_child_type (GtkContainer *container);
-
-
-G_DEFINE_TYPE_WITH_CODE (GtkBox, gtk_box, GTK_TYPE_CONTAINER,
- G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
- NULL))
-
+static void gtk_box_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gtk_box_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static void gtk_box_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void gtk_box_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+
+static void gtk_box_add (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_box_remove (GtkContainer *container,
+ GtkWidget *widget);
+static void gtk_box_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer callback_data);
+static void gtk_box_set_child_property (GtkContainer *container,
+ GtkWidget *child,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gtk_box_get_child_property (GtkContainer *container,
+ GtkWidget *child,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec);
+static GType gtk_box_child_type (GtkContainer *container);
+
+
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GtkBox, gtk_box, GTK_TYPE_CONTAINER,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE,
+ NULL));
static void
gtk_box_class_init (GtkBoxClass *class)
child = children->data;
children = children->next;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
{
child = children->data;
- if (GTK_WIDGET_VISIBLE (child->widget))
+ if (gtk_widget_get_visible (child->widget))
{
nvis_children += 1;
if (child->expand)
child = children->data;
children = children->next;
- if ((child->pack == GTK_PACK_START) && GTK_WIDGET_VISIBLE (child->widget))
+ if ((child->pack == GTK_PACK_START) && gtk_widget_get_visible (child->widget))
{
if (box->homogeneous)
{
child = children->data;
children = children->next;
- if ((child->pack == GTK_PACK_END) && GTK_WIDGET_VISIBLE (child->widget))
+ if ((child->pack == GTK_PACK_END) && gtk_widget_get_visible (child->widget))
{
GtkRequisition child_requisition;
}
static void
-gtk_box_set_child_property (GtkContainer *container,
- GtkWidget *child,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+gtk_box_set_child_property (GtkContainer *container,
+ GtkWidget *child,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
gboolean expand = 0;
gboolean fill = 0;
*
* Since: 2.16
**/
-GtkWidget *
-gtk_box_new (GtkOrientation orientation,
- gboolean homogeneous,
- gint spacing)
+GtkWidget*
+_gtk_box_new (GtkOrientation orientation,
+ gboolean homogeneous,
+ gint spacing)
{
return g_object_new (GTK_TYPE_BOX,
"orientation", orientation,
box->children = g_list_insert_before (box->children, new_link, child_info);
gtk_widget_child_notify (child, "position");
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
+ if (gtk_widget_get_visible (child)
+ && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (child);
}
child_info->pack = GTK_PACK_START;
gtk_widget_child_notify (child, "pack-type");
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
+ if (gtk_widget_get_visible (child)
+ && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (child);
}
gtk_widget_thaw_child_notify (child);
}
void
-_gtk_box_set_default_expand (GtkBox *box)
+_gtk_box_set_old_defaults (GtkBox *box)
{
GtkBoxPrivate *private;
{
gboolean was_visible;
- was_visible = GTK_WIDGET_VISIBLE (widget);
+ was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
box->children = g_list_remove_link (box->children, children);
g_list_free (children);
g_free (child);
- /* queue resize regardless of GTK_WIDGET_VISIBLE (container),
+ /* queue resize regardless of gtk_widget_get_visible (container),
* since that's what is needed by toplevels.
*/
if (was_visible)