annotate src/mb_types.h @ 82:4bb6451ef036

-
author Thinker K.F. Li <thinker@branda.to>
date Thu, 21 Aug 2008 14:13:50 +0800
parents 13fdf205047b
children ea758bb3bbe2
rev   line source
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 #ifndef __MB_TYPES_H_
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 #define __MB_TYPES_H_
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
4 #include <cairo.h>
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
5 #include "tools.h"
73
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
6 #include "observer.h"
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
7
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8 typedef float co_aix;
11
128af06c876c Fix the bug that data of a path end with white spaces would make system down
Thinker K.F. Li <thinker@branda.to>
parents: 10
diff changeset
9 typedef struct _shape shape_t;
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
10 typedef struct _geo geo_t;
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
11 typedef struct _area area_t;
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
12 typedef struct _shnode shnode_t;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
13 typedef struct _paint paint_t;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
14
58
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
15 /*! \brief Base of paint types.
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
16 *
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
17 * Paints should be freed by users by calling paint_t::free() of
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
18 * the paint.
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
19 *
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
20 * \todo move member functions to a seperate structure and setup a
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
21 * singleton fro each paint type.
Thinker K.F. Li <thinker@branda.to>
parents: 57
diff changeset
22 */
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
23 struct _paint {
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
24 void (*prepare)(paint_t *paint, cairo_t *cr);
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
25 void (*free)(paint_t *paint);
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
26 STAILQ(shnode_t) members;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
27 };
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
28
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
29 struct _shnode {
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
30 shape_t *shape;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
31 shnode_t *next;
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
32 };
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
33
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
34 struct _area {
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
35 co_aix x, y;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
36 co_aix w, h;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
37 };
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
38
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
39 /*! \brief Geometry data of a shape or a group of shape.
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
40 */
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
41 struct _geo {
16
e17e12b112c4 A simple animation using rdman_redraw_changed().
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
42 #ifdef GEO_ORDER
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
43 unsigned int order;
16
e17e12b112c4 A simple animation using rdman_redraw_changed().
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
44 #endif
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
45 unsigned int flags;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
46 shape_t *shape;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
47 geo_t *next; /*!< \brief Link all geo objects. */
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
48
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
49 area_t *cur_area, *last_area;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
50 area_t areas[2];
73
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
51
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
52 subject_t *mouse_event;
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
53 };
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
54 #define GEF_DIRTY 0x1
57
ab028c9f0930 Ability to hidden shapes and action of visibility.
Thinker K.F. Li <thinker@branda.to>
parents: 35
diff changeset
55 #define GEF_HIDDEN 0x2
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
56
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
57 extern int is_overlay(area_t *r1, area_t *r2);
15
c2ce186a5c37 X_main uses rdman_redraw_all()
Thinker K.F. Li <thinker@branda.to>
parents: 14
diff changeset
58 extern void area_init(area_t *area, int n_pos, co_aix pos[][2]);
17
41f0907b27ac Unittest for rdman_redraw_changed().
Thinker K.F. Li <thinker@branda.to>
parents: 16
diff changeset
59 extern void geo_init(geo_t *g);
41f0907b27ac Unittest for rdman_redraw_changed().
Thinker K.F. Li <thinker@branda.to>
parents: 16
diff changeset
60 extern void geo_from_positions(geo_t *g, int n_pos, co_aix pos[][2]);
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
61 extern void geo_mark_overlay(geo_t *g, int n_others, geo_t **others,
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
62 int *n_overlays, geo_t **overlays);
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
63 #define geo_get_shape(g) ((g)->shape)
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
64 #define geo_set_shape(g, sh) do {(g)->shape = sh;} while(0)
28
604bc90d509d Refactory
Thinker K.F. Li <thinker@branda.to>
parents: 26
diff changeset
65 #define _geo_is_in(a, s, w) ((a) >= (s) && (a) < ((s) + (w)))
604bc90d509d Refactory
Thinker K.F. Li <thinker@branda.to>
parents: 26
diff changeset
66 #define geo_pos_is_in(g, _x, _y) \
30
e06a4a667ce2 Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents: 28
diff changeset
67 (_geo_is_in(_x, (g)->cur_area->x, (g)->cur_area->w) && \
e06a4a667ce2 Accept mouse/pointer event and hint the shape that the pointer is over.
Thinker K.F. Li <thinker@branda.to>
parents: 28
diff changeset
68 _geo_is_in(_y, (g)->cur_area->y, (g)->cur_area->h))
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
69
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
70
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
71 /*! \brief A coordination system.
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
72 *
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
73 * It have a transform function defined by matrix to transform
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
74 * coordination from source space to target space.
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
75 * Source space is where the contained is drawed, and target space
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
76 * is where the coordination of parent container of the element
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
77 * represented by this coord object.
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
78 *
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
79 * \dot
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
80 * digraph G {
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
81 * graph [rankdir=LR];
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
82 * root -> child00 -> child10 -> child20 [label="children" color="blue"];
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
83 * child00 -> child01 -> child02 [label="sibling"];
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
84 * child10 -> child11 [label="sibling"];
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
85 * }
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
86 * \enddot
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
87 */
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
88 typedef struct _coord {
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
89 unsigned int order;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
90 unsigned int flags;
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
91 area_t *cur_area, *last_area;
15
c2ce186a5c37 X_main uses rdman_redraw_all()
Thinker K.F. Li <thinker@branda.to>
parents: 14
diff changeset
92 area_t areas[2];
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
93
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
94 co_aix matrix[6];
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
95 co_aix aggr_matrix[6];
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
96
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
97 struct _coord *parent;
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
98 STAILQ(struct _coord) children;
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
99 struct _coord *sibling;
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
100
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
101 STAILQ(shape_t) members; /*!< All shape_t objects in this coord. */
73
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
102 subject_t *mouse_event;
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
103 } coord_t;
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
104 #define COF_DIRTY 0x1
57
ab028c9f0930 Ability to hidden shapes and action of visibility.
Thinker K.F. Li <thinker@branda.to>
parents: 35
diff changeset
105 #define COF_HIDDEN 0x2
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
106
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
107 extern void coord_init(coord_t *co, coord_t *parent);
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
108 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y);
31
da770188a44d resize font size for changige of coord.
Thinker K.F. Li <thinker@branda.to>
parents: 30
diff changeset
109 extern co_aix coord_trans_size(coord_t *co, co_aix size);
16
e17e12b112c4 A simple animation using rdman_redraw_changed().
Thinker K.F. Li <thinker@branda.to>
parents: 15
diff changeset
110 extern void compute_aggr_of_coord(coord_t *coord);
10
7cfecdce94cc Remove warning messages
Thinker K.F. Li <thinker@branda.to>
parents: 5
diff changeset
111 extern void update_aggr_matrix(coord_t *start);
13
ed55009d96d3 refactory for redrawing
Thinker K.F. Li <thinker@branda.to>
parents: 12
diff changeset
112 extern coord_t *preorder_coord_subtree(coord_t *root, coord_t *last);
57
ab028c9f0930 Ability to hidden shapes and action of visibility.
Thinker K.F. Li <thinker@branda.to>
parents: 35
diff changeset
113 #define coord_hide(co) do { co->flags |= COF_HIDDEN; } while(0)
ab028c9f0930 Ability to hidden shapes and action of visibility.
Thinker K.F. Li <thinker@branda.to>
parents: 35
diff changeset
114 #define coord_show(co) do { co->flags &= ~COF_HIDDEN; } while(0)
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
115
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
116
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
117 /*! \brief A grahpic shape.
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
118 *
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
119 * \dot
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
120 * digraph G {
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
121 * "shape" -> "coord";
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
122 * "shape" -> "geo";
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
123 * "geo" -> "shape";
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
124 * "coord" -> "shape" [label="members"]
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
125 * "shape" -> "shape" [label="sibling"];
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
126 * }
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
127 * \enddot
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
128 */
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
129 struct _shape {
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
130 int sh_type;
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
131 geo_t *geo;
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
132 coord_t *coord;
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
133 shape_t *coord_mem_next;
18
0f3baa488a62 Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents: 17
diff changeset
134 paint_t *fill, *stroke;
26
d50f33040de6 Set line width for path.
Thinker K.F. Li <thinker@branda.to>
parents: 18
diff changeset
135 co_aix stroke_width;
73
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
136 int stroke_linecap:2;
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
137 int stroke_linejoin:2;
9ab15ebc9061 Observer for mouse events
Thinker K.F. Li <thinker@branda.to>
parents: 58
diff changeset
138 void (*free)(shape_t *shape);
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
139 };
35
581a03196093 Support rectangle tag of SVG.
Thinker K.F. Li <thinker@branda.to>
parents: 31
diff changeset
140 enum { SHT_UNKNOW, SHT_PATH, SHT_TEXT, SHT_RECT };
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
141
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
142 #define sh_attach_geo(sh, g) \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
143 do { \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
144 (sh)->geo = g; \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
145 (g)->shape = (shape_t *)(sh); \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
146 } while(0)
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
147 #define sh_detach_geo(sh) \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
148 do { \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
149 (sh)->geo->shape = NULL; \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
150 (sh)->geo = NULL; \
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
151 } while(0)
77
Thinker K.F. Li <thinker@branda.to>
parents: 73
diff changeset
152 #define sh_get_geo(sh) ((sh)->geo)
Thinker K.F. Li <thinker@branda.to>
parents: 73
diff changeset
153 #define sh_get_mouse_event_subject(sh) ((sh)->geo->mouse_event)
81
13fdf205047b Hide shapes and groups
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
154 #define sh_hide(sh) do { (sh)->geo->flags |= GEF_HIDDEN; } while(0)
13fdf205047b Hide shapes and groups
Thinker K.F. Li <thinker@branda.to>
parents: 77
diff changeset
155 #define sh_show(sh) do { (sh)->geo->flags &= ~GEF_HIDDEN; } while(0)
12
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
156 extern void sh_attach_coord(shape_t *sh, coord_t *coord);
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
157 extern void sh_detach_coord(shape_t *sh);
79e9edf4c00a Add redraw manager
Thinker K.F. Li <thinker@branda.to>
parents: 11
diff changeset
158
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
159 #endif /* __MB_TYPES_H_ */