示例#1
0
static ObjectChange *
realizes_delete_segment_callback(DiaObject *obj, Point *clicked, gpointer data)
{
  ObjectChange *change;
  change = orthconn_delete_segment((OrthConn *)obj, clicked);
  realizes_update_data((Realizes *)obj);
  return change;
}
示例#2
0
static ObjectChange*
realizes_move(Realizes *realize, Point *to)
{
  orthconn_move(&realize->orth, to);
  realizes_update_data(realize);

  return NULL;
}
示例#3
0
static void
realizes_set_props(Realizes *realizes, GPtrArray *props)
{
  object_set_props_from_offsets(&realizes->orth.object, 
                                realizes_offsets, props);
  g_free(realizes->st_stereotype);
  realizes->st_stereotype = NULL;
  realizes_update_data(realizes);
}
示例#4
0
static ObjectChange*
realizes_move_handle(Realizes *realize, Handle *handle,
		     Point *to, ConnectionPoint *cp,
		     HandleMoveReason reason, ModifierKeys modifiers)
{
  ObjectChange *change;
  assert(realize!=NULL);
  assert(handle!=NULL);
  assert(to!=NULL);
  
  change = orthconn_move_handle(&realize->orth, handle, to, cp, reason, modifiers);
  realizes_update_data(realize);

  return change;
}
示例#5
0
文件: realizes.c 项目: UIKit0/dia
static DiaObject *
realizes_create(Point *startpoint,
	       void *user_data,
  	       Handle **handle1,
	       Handle **handle2)
{
  Realizes *realize;
  OrthConn *orth;
  DiaObject *obj;
  PolyBBExtras *extra;

  realize = g_malloc0(sizeof(Realizes));
  /* old defaults */
  realize->font_height = 0.8;
  realize->font =
      dia_font_new_from_style (DIA_FONT_MONOSPACE, realize->font_height);
  realize->line_width = 0.1;

  orth = &realize->orth;
  obj = &orth->object;
  extra = &orth->extra_spacing;

  obj->type = &realizes_type;

  obj->ops = &realizes_ops;

  orthconn_init(orth, startpoint);

  realize->text_color = color_black;
  realize->line_color = attributes_get_foreground();

  realize->name = NULL;
  realize->stereotype = NULL;
  realize->st_stereotype = NULL;
  realize->text_width = 0;

  extra->start_trans = realize->line_width/2.0 + REALIZES_TRIANGLESIZE;
  extra->start_long = 
    extra->middle_trans = 
    extra->end_trans = 
    extra->end_long = realize->line_width/2.0;

  realizes_update_data(realize);
  
  *handle1 = orth->handles[0];
  *handle2 = orth->handles[orth->numpoints-2];
  return &realize->orth.object;
}