示例#1
0
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);
}
示例#2
0
文件: rut-fold.c 项目: cee1/rig
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);
}
示例#3
0
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);
}
示例#4
0
文件: rut-fold.c 项目: cee1/rig
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);
}
示例#5
0
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);
}
示例#6
0
文件: rut-fold.c 项目: cee1/rig
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);
}