static DiaMenu *
generalization_get_object_menu(Generalization *genlz, Point *clickedpoint)
{
  OrthConn *orth;

  orth = &genlz->orth;
  /* Set entries sensitive/selected etc here */
  object_menu_items[0].active = orthconn_can_add_segment(orth, clickedpoint);
  object_menu_items[1].active = orthconn_can_delete_segment(orth, clickedpoint);
  return &object_menu;
}
示例#2
0
static DiaMenu *
realizes_get_object_menu(Realizes *realize, Point *clickedpoint)
{
  OrthConn *orth;

  orth = &realize->orth;
  /* Set entries sensitive/selected etc here */
  object_menu_items[0].active = orthconn_can_add_segment(orth, clickedpoint);
  object_menu_items[1].active = orthconn_can_delete_segment(orth, clickedpoint);
  orthconn_update_object_menu(orth, clickedpoint, &object_menu_items[2]);
  return &object_menu;
}
示例#3
0
static DiaMenu *
zigzagline_get_object_menu(Zigzagline *zigzagline, Point *clickedpoint)
{
  OrthConn *orth;

  orth = &zigzagline->orth;
  /* Set entries sensitive/selected etc here */
  object_menu_items[0].active = orthconn_can_add_segment(orth, clickedpoint);
  object_menu_items[1].active = orthconn_can_delete_segment(orth, clickedpoint);
  object_menu_items[2].active = TRUE;
  orthconn_update_object_menu(orth, clickedpoint, &object_menu_items[3]);

  return &object_menu;
}
示例#4
0
static DiaMenu*
transition_get_object_menu(Transition* transition, Point* clickedpoint)
{
  OrthConn *orth = &transition->orth;
  /* Set/clear the active flag of the add/remove segment according to the 
     placement of mouse pointer and placement of the transition and its handles */
  transition_menu_items[TRANSITION_MENU_ADD_SEGMENT_OFFSET].active =
      orthconn_can_add_segment(orth, clickedpoint);
  transition_menu_items[TRANSITION_MENU_DEL_SEGMENT_OFFSET].active =
      orthconn_can_delete_segment(orth, clickedpoint);
      
  orthconn_update_object_menu(orth, clickedpoint, 
             &transition_menu_items[TRANSITION_MENU_OFFSET_TO_ORTH_COMMON]);
  return &transition_menu;
}