aboutsummaryrefslogtreecommitdiffstats
path: root/egraph/doc/internals.txt
blob: 7a8b34df056ef543b3327a253663d22677d4a4d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Internals
=========

=== algo to handle threaded graph layouting correctly ===

###### GENERAL ALGO
_layouting_start(graph-2, coords-2);

_add/del(structs-3);
_repositionning(graph, structs, coords);

_layouting_end(coords-2);

_v2_updtate(structs-2, graph-2, coords-2);
  _v2_structs/graph_update(structs-2, graph);
    -> structs, graph // real add/del
  _coords_copy(coords-2);
    -> coords

_repositionning(graph, structs, coords);

_v3_update(structs-3);
  _v3_structs/graph_update(structs-3, graph-2);
    -> structs-2, graph-2

###### TIMELINE VERTICE ADD
egraph_vertice_add();
  id = freeids[vertices_count];
  v = vertices[id];
  v->id = id;
  vertices_count++;
  v->v3-new = 1;

_v3_update();
  v->v2-new = v->v3-new;
  v->v3-new = 0;
  _v2_add()
    v->graph2_vid = graph2_vcount;
    graph2_vcount++;
    igraph_add_vertices(graph2);

_layouting_start();
  // end up in coords2

_layouting_end();
_coords_copy();
  // end up in coords

_v2_update();
  _add()
    v->v2-new = 0;
    v->graph_vid = graph_vcount;
    graph_vcount++;
    igraph_add_vertices(graph);
    evas_object

// in structs, graph, coords

###### TIMELINE VERTICE DEL
egraph_vertice_del();
  v->v3-del = 1;

_v3_update();
  v->v2-del = v->v3-del;
  v->v3-del = 0;
  _v2_del()
    igraph_delete_vertices(v->graph2_vid);
    graph2_vcount--;

_layouting_start();
  // not in coords2

_layouting_end();
_coords_copy();
  // not in coords

_v2_update();
  _del();
    igraph_delete_vertices(v->graph_vid);
    graph_vcount--;
    freeids[vertices_count] = v->id;
    vertices_count--;
    free(v);

// removed from structs, graph, coords

###### TIMELINE VERTICE DEL