Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_knot_set_flag ( SPKnot knot,
guint  flag,
bool  set 
)

Set flag in knot, with side effects.

Definition at line 594 of file knot.cpp.

References SPKnot::flags, SPKnot::item, sp_canvas_item_hide(), sp_canvas_item_show(), and sp_knot_set_ctrl_state().

Referenced by sp_knot_handler(), sp_knot_hide(), sp_knot_show(), and sp_knot_start_dragging().

{
    g_assert(knot != NULL);
    g_assert(SP_IS_KNOT(knot));

    if (set) {
        knot->flags |= flag;
    } else {
        knot->flags &= ~flag;
    }

    switch (flag) {
      case SP_KNOT_VISIBLE:
            if (set) {
                sp_canvas_item_show(knot->item);
            } else {
                sp_canvas_item_hide(knot->item);
            }
            break;
      case SP_KNOT_MOUSEOVER:
      case SP_KNOT_DRAGGING:
            sp_knot_set_ctrl_state(knot);
            break;
      case SP_KNOT_GRABBED:
            break;
      default:
            g_assert_not_reached();
            break;
    }
}


Generated by  Doxygen 1.6.0   Back to index