void rut_fold_set_header_child(rut_fold_t *fold, rut_object_t *child) { c_return_if_fail(rut_object_get_type(fold) == &rut_fold_type); if (child) rut_object_claim(child, fold); if (fold->header_child) { rut_box_layout_remove(fold->header_hbox_right, fold->header_child); rut_object_release(fold->header_child, fold); } fold->header_child = child; rut_box_layout_add(fold->header_hbox_right, true, child); }
void rut_fold_set_header_child (RutFold *fold, RutObject *child) { g_return_if_fail (rut_object_get_type (fold) == &rut_fold_type); if (child) rut_refable_claim (child, fold); if (fold->header_child) { rut_box_layout_remove (fold->header_hbox_right, fold->header_child); rut_refable_release (fold->header_child, fold); } fold->header_child = child; rut_box_layout_add (fold->header_hbox_right, TRUE, child); }
void rut_fold_set_child(rut_fold_t *fold, rut_object_t *child) { c_return_if_fail(rut_object_get_type(fold) == &rut_fold_type); if (child) rut_object_claim(child, fold); if (fold->child) { if (!fold->folded) rut_box_layout_remove(fold->vbox, fold->child); rut_object_release(fold->child, fold); } fold->child = child; if (child && !fold->folded) rut_box_layout_add(fold->vbox, true, child); }
void rut_fold_set_child (RutFold *fold, RutObject *child) { g_return_if_fail (rut_object_get_type (fold) == &rut_fold_type); if (child) rut_refable_claim (child, fold); if (fold->child) { if (!fold->folded) rut_box_layout_remove (fold->vbox, fold->child); rut_refable_release (fold->child, fold); } fold->child = child; if (child && !fold->folded) rut_box_layout_add (fold->vbox, TRUE, child); }
void rut_fold_set_folded(rut_fold_t *fold, bool folded) { if (fold->folded == folded || fold->child == NULL) return; if (folded) { rut_fixed_remove_child(fold->fold_icon_shim, fold->fold_down_icon); rut_fixed_add_child(fold->fold_icon_shim, fold->fold_up_icon); rut_box_layout_remove(fold->vbox, fold->child); } else { rut_fixed_remove_child(fold->fold_icon_shim, fold->fold_up_icon); rut_fixed_add_child(fold->fold_icon_shim, fold->fold_down_icon); rut_box_layout_add(fold->vbox, true, fold->child); } fold->folded = folded; rut_shell_queue_redraw(fold->shell); }
void rut_fold_set_folded (RutFold *fold, CoglBool folded) { if (fold->folded == folded || fold->child == NULL) return; if (folded) { rut_fixed_remove_child (fold->fold_icon_shim, fold->fold_down_icon); rut_fixed_add_child (fold->fold_icon_shim, fold->fold_up_icon); rut_box_layout_remove (fold->vbox, fold->child); } else { rut_fixed_remove_child (fold->fold_icon_shim, fold->fold_up_icon); rut_fixed_add_child (fold->fold_icon_shim, fold->fold_down_icon); rut_box_layout_add (fold->vbox, TRUE, fold->child); } fold->folded = folded; rut_shell_queue_redraw (fold->context->shell); }