Пример #1
0
static void
textobj_select(Textobj *textobj, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(textobj->text, clicked_point, interactive_renderer);
  text_grab_focus(textobj->text, &textobj->object);
}
Пример #2
0
static void
box_select(Box *box, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  real radius;

  text_set_cursor(box->text, clicked_point, interactive_renderer);
  text_grab_focus(box->text, &box->element.object);

  element_update_handles(&box->element);

  if (box->corner_radius > 0) {
    Element *elem = (Element *)box;
    radius = box->corner_radius;
    radius = MIN(radius, elem->width/2);
    radius = MIN(radius, elem->height/2);
    radius *= (1-M_SQRT1_2);

    elem->resize_handles[0].pos.x += radius;
    elem->resize_handles[0].pos.y += radius;
    elem->resize_handles[2].pos.x -= radius;
    elem->resize_handles[2].pos.y += radius;
    elem->resize_handles[5].pos.x += radius;
    elem->resize_handles[5].pos.y -= radius;
    elem->resize_handles[7].pos.x -= radius;
    elem->resize_handles[7].pos.y -= radius;
  }
}
Пример #3
0
Файл: other.c Проект: UIKit0/dia
static void
other_select(Other *other, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(other->text, clicked_point, interactive_renderer);
  text_grab_focus(other->text, &other->element.object);
  element_update_handles(&other->element);
}
Пример #4
0
static void
function_select(Function *pkg, Point *clicked_point,
		DiaRenderer *interactive_renderer)
{
  text_set_cursor(pkg->text, clicked_point, interactive_renderer);
  text_grab_focus(pkg->text, &pkg->element.object);
  element_update_handles(&pkg->element);
}
Пример #5
0
static void
req_select(Requirement *req, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(req->text, clicked_point, interactive_renderer);
  text_grab_focus(req->text, &req->element.object);
  element_update_handles(&req->element);
}
Пример #6
0
static void
radiocell_select(RadioCell *radiocell, Point *clicked_point,
		 DiaRenderer *interactive_renderer)
{
  text_set_cursor(radiocell->text, clicked_point, interactive_renderer);
  text_grab_focus(radiocell->text, &radiocell->poly.object);
  radiocell_update_data(radiocell);
}
Пример #7
0
Файл: node.c Проект: UIKit0/dia
static void
node_select(Node *node, Point *clicked_point,
		    DiaRenderer *interactive_renderer)
{
  text_set_cursor(node->name, clicked_point, interactive_renderer);
  text_grab_focus(node->name, &node->element.object);
  element_update_handles(&node->element);
}
Пример #8
0
static void
classicon_select(Classicon *cicon, Point *clicked_point,
		 DiaRenderer *interactive_renderer)
{
  text_set_cursor(cicon->text, clicked_point, interactive_renderer);
  text_grab_focus(cicon->text, &cicon->element.object);
  element_update_handles(&cicon->element);
}
Пример #9
0
static void
goal_select(Goal *goal, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(goal->text, clicked_point, interactive_renderer);
  text_grab_focus(goal->text, &goal->element.object);
  element_update_handles(&goal->element);
}
Пример #10
0
static void
smallpackage_select(SmallPackage *pkg, Point *clicked_point,
	       Renderer *interactive_renderer)
{
  text_set_cursor(pkg->text, clicked_point, interactive_renderer);
  text_grab_focus(pkg->text, (Object *)pkg);
  element_update_handles(&pkg->element);
}
Пример #11
0
static void
usecase_select(Usecase *usecase, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(usecase->text, clicked_point, interactive_renderer);
  text_grab_focus(usecase->text, &usecase->element.object);
  element_update_handles(&usecase->element);
}
Пример #12
0
void
aadlbox_select(Aadlbox *aadlbox, Point *clicked_point,
		    DiaRenderer *interactive_renderer)
{
  text_set_cursor(aadlbox->name, clicked_point, interactive_renderer);
  text_grab_focus(aadlbox->name, &aadlbox->element.object);
  element_update_handles(&aadlbox->element);
}
Пример #13
0
static void
component_select(Component *cmp, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(cmp->text, clicked_point, interactive_renderer);
  text_grab_focus(cmp->text, &cmp->element.object);
  element_update_handles(&cmp->element);
}
Пример #14
0
static void
state_select(State *state, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(state->text, clicked_point, interactive_renderer);
  text_grab_focus(state->text, &state->element.object);
  element_update_handles(&state->element);
}
Пример #15
0
static void
basestation_select(Basestation *basestation, Point *clicked_point,
                   DiaRenderer *interactive_renderer)
{
    text_set_cursor(basestation->text, clicked_point, interactive_renderer);
    text_grab_focus(basestation->text, &basestation->element.object);
    element_update_handles(&basestation->element);
}
Пример #16
0
static void
compfeat_select(Compfeat *compfeat, Point *clicked_point,
		DiaRenderer *interactive_renderer)
{
  text_set_cursor(compfeat->text, clicked_point, interactive_renderer);
  text_grab_focus(compfeat->text, &compfeat->orth.object);
  orthconn_update_data(&compfeat->orth);
}
Пример #17
0
static void
actor_select(Actor *actor, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(actor->text, clicked_point, interactive_renderer);
  text_grab_focus(actor->text, &actor->element.object);

  element_update_handles(&actor->element);
}
Пример #18
0
static void
annotation_select(Annotation *annotation, Point *clicked_point,
	    DiaRenderer *interactive_renderer)
{
  text_set_cursor(annotation->text, clicked_point, interactive_renderer);
  text_grab_focus(annotation->text, &annotation->connection.object);
  
  connection_update_handles(&annotation->connection);
}
Пример #19
0
static void
flow_select(Flow *flow, Point *clicked_point,
	    DiaRenderer *interactive_renderer)
{
  text_set_cursor(flow->text, clicked_point, interactive_renderer);
  text_grab_focus(flow->text, &flow->connection.object);

  connection_update_handles(&flow->connection);
}
Пример #20
0
static void
diamond_select(Diamond *diamond, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(diamond->text, clicked_point, interactive_renderer);
  text_grab_focus(diamond->text, &diamond->element.object);

  element_update_handles(&diamond->element);
}
Пример #21
0
static void
pgram_select(Pgram *pgram, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(pgram->text, clicked_point, interactive_renderer);
  text_grab_focus(pgram->text, &pgram->element.object);

  element_update_handles(&pgram->element);
}
Пример #22
0
static void
ellipse_select(Ellipse *ellipse, Point *clicked_point,
	   DiaRenderer *interactive_renderer)
{
  text_set_cursor(ellipse->text, clicked_point, interactive_renderer);
  text_grab_focus(ellipse->text, &ellipse->element.object);

  element_update_handles(&ellipse->element);
}
Пример #23
0
static void
objet_select(Objet *ob, Point *clicked_point,
	       DiaRenderer *interactive_renderer)
{
  text_set_cursor(ob->text, clicked_point, interactive_renderer);
  text_grab_focus(ob->text, &ob->element.object);
  if (ob->show_attributes) /* second focus: allows to <tab> between them */
    text_grab_focus(ob->attributes, &ob->element.object);
  element_update_handles(&ob->element);
}
Пример #24
0
static void
rendobj_select(RenderObject *rend_obj, Point *clicked_point,
	       Renderer *interactive_renderer)
{
  if (rend_obj->desc->use_text) {
    text_set_cursor(rend_obj->text, clicked_point, interactive_renderer);
    text_grab_focus(rend_obj->text, (Object *)rend_obj);
  }
  
  element_update_handles(&rend_obj->element);
}