/** * gdaui_data_entry_can_expand: * @de: a #GtkWidget object which implements the #GdauiDataEntry interface * @horiz: %TRUE to query horizontal expansion requirements, or %FALSE for vertical * * Used for the layout of #GdaDataEntry widgets in containers: queries if @de requires * horizontal or vertical expansion, depending on @horiz * * Returns: %TRUE if the widget requires expansion * * Since: 4.2 * * Deprecated: 5.2: use the GtkWidget::hexpand, GtkWidget::wexpand or GtkWidget::expand properties */ gboolean gdaui_data_entry_can_expand (GdauiDataEntry *de, gboolean horiz) { g_return_val_if_fail (GDAUI_IS_DATA_ENTRY (de), FALSE); if (GDAUI_DATA_ENTRY_GET_IFACE (de)->can_expand) g_warning ("The GdauiDataEntry::can_expand virtual method is not used anymore, " "please clean your code"); if (horiz) return gtk_widget_get_hexpand ((GtkWidget*) de); else return gtk_widget_get_vexpand ((GtkWidget*) de); }
/** This function moves a GtkWidget from one GtkGrid to another, * preserving its attachment data, etc. It is called when adding one * partial preference page to another. * * @internal * * @param widget A pointer to the widget to move. * * @param data A pointer to a data structure passed in by the caller. * This data structure contains pointers to the old and new grids * plus the row offset into the new grid. */ static void gnc_prefs_move_grid_entry (GtkWidget *child, gpointer data) { struct copy_data *copydata = data; gint top, left, height, width; gboolean hexpand, vexpand; GtkAlign halign, valign; gint topm, bottomm, leftm, rightm; ENTER("child %p, copy data %p", child, data); gtk_container_child_get(GTK_CONTAINER(copydata->grid_from), child, "left-attach", &left, "top-attach", &top, "height", &height, "width", &width, NULL); hexpand = gtk_widget_get_hexpand (child); vexpand = gtk_widget_get_vexpand (child); halign = gtk_widget_get_halign (child); valign = gtk_widget_get_valign (child); g_object_get (child, "margin-top", &topm, "margin-bottom", &bottomm, NULL); g_object_get (child, "margin-left", &leftm, "margin-right", &rightm, NULL); g_object_ref(child); gtk_container_remove(GTK_CONTAINER(copydata->grid_from), child); gtk_grid_attach(copydata->grid_to, child, left, copydata->rows + top , width, height); gtk_widget_set_hexpand (child, hexpand); gtk_widget_set_vexpand (child, vexpand); gtk_widget_set_halign (child, halign); gtk_widget_set_valign (child, valign); g_object_set (child, "margin-left", leftm, "margin-right", rightm, NULL); g_object_set (child, "margin-top", topm, "margin-bottom", bottomm, NULL); g_object_unref(child); LEAVE(" "); }
uiprivChild *uiprivNewChild(uiControl *child, uiControl *parent, GtkContainer *parentContainer) { uiprivChild *c; if (child == NULL) return NULL; c = uiprivNew(uiprivChild); c->c = child; c->widget = GTK_WIDGET(uiControlHandle(c->c)); c->oldhexpand = gtk_widget_get_hexpand(c->widget); c->oldhalign = gtk_widget_get_halign(c->widget); c->oldvexpand = gtk_widget_get_vexpand(c->widget); c->oldvalign = gtk_widget_get_valign(c->widget); uiControlSetParent(c->c, parent); uiUnixControlSetContainer(uiUnixControl(c->c), parentContainer, FALSE); c->parent = parentContainer; return c; }
/* * Class: org_java_gtk_gtk_Widget * Method: gtk_widget_get_vexpand * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_java_1gtk_gtk_Widget_gtk_1widget_1get_1vexpand (JNIEnv *env, jclass cls, jlong widget) { return (jboolean)gtk_widget_get_vexpand((GtkWidget*)widget); }