-
- gtk_object_add_arg_type ("GtkAlignment::xalign", GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_XALIGN);
- gtk_object_add_arg_type ("GtkAlignment::yalign", GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_YALIGN);
- gtk_object_add_arg_type ("GtkAlignment::xscale", GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_XSCALE);
- gtk_object_add_arg_type ("GtkAlignment::yscale", GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_YSCALE);
-
- object_class->set_arg = gtk_alignment_set_arg;
- object_class->get_arg = gtk_alignment_get_arg;
-
- widget_class->size_request = gtk_alignment_size_request;
- widget_class->size_allocate = gtk_alignment_size_allocate;
+
+ gobject_class->set_property = gtk_alignment_set_property;
+ gobject_class->get_property = gtk_alignment_get_property;
+
+ widget_class->size_allocate = gtk_alignment_size_allocate;
+ widget_class->get_preferred_width = gtk_alignment_get_preferred_width;
+ widget_class->get_preferred_height = gtk_alignment_get_preferred_height;
+ widget_class->get_preferred_width_for_height = gtk_alignment_get_preferred_width_for_height;
+ widget_class->get_preferred_height_for_width = gtk_alignment_get_preferred_height_for_width;
+
+ g_object_class_install_property (gobject_class,
+ PROP_XALIGN,
+ g_param_spec_float("xalign",
+ P_("Horizontal alignment"),
+ P_("Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned"),
+ 0.0,
+ 1.0,
+ 0.5,
+ GTK_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_YALIGN,
+ g_param_spec_float("yalign",
+ P_("Vertical alignment"),
+ P_("Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned"),
+ 0.0,
+ 1.0,
+ 0.5,
+ GTK_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class,
+ PROP_XSCALE,
+ g_param_spec_float("xscale",
+ P_("Horizontal scale"),
+ P_("If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all"),
+ 0.0,
+ 1.0,
+ 1.0,
+ GTK_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class,
+ PROP_YSCALE,
+ g_param_spec_float("yscale",
+ P_("Vertical scale"),
+ P_("If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all"),
+ 0.0,
+ 1.0,
+ 1.0,
+ GTK_PARAM_READWRITE));
+
+
+/**
+ * GtkAlignment:top-padding:
+ *
+ * The padding to insert at the top of the widget.
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_TOP_PADDING,
+ g_param_spec_uint("top-padding",
+ P_("Top Padding"),
+ P_("The padding to insert at the top of the widget."),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READWRITE));
+
+/**
+ * GtkAlignment:bottom-padding:
+ *
+ * The padding to insert at the bottom of the widget.
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_BOTTOM_PADDING,
+ g_param_spec_uint("bottom-padding",
+ P_("Bottom Padding"),
+ P_("The padding to insert at the bottom of the widget."),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READWRITE));
+
+/**
+ * GtkAlignment:left-padding:
+ *
+ * The padding to insert at the left of the widget.
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_LEFT_PADDING,
+ g_param_spec_uint("left-padding",
+ P_("Left Padding"),
+ P_("The padding to insert at the left of the widget."),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READWRITE));
+
+/**
+ * GtkAlignment:right-padding:
+ *
+ * The padding to insert at the right of the widget.
+ *
+ * Since: 2.4
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_RIGHT_PADDING,
+ g_param_spec_uint("right-padding",
+ P_("Right Padding"),
+ P_("The padding to insert at the right of the widget."),
+ 0,
+ G_MAXINT,
+ 0,
+ GTK_PARAM_READWRITE));
+
+ g_type_class_add_private (gobject_class, sizeof (GtkAlignmentPrivate));