doc: update copyright line for 2021
[adg.git] / src / adg / adg-dim.h
blob0ee5c4df04e05fb2d0d5532a57a9006c361c20da
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007-2021 Nicola Fontana <ntd at entidi.it>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #if !defined(__ADG_H__)
22 #error "Only <adg.h> can be included directly."
23 #endif
26 #ifndef __ADG_DIM_H__
27 #define __ADG_DIM_H__
30 G_BEGIN_DECLS
32 #define ADG_TYPE_DIM (adg_dim_get_type())
33 #define ADG_DIM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_DIM, AdgDim))
34 #define ADG_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_DIM, AdgDimClass))
35 #define ADG_IS_DIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_DIM))
36 #define ADG_IS_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_DIM))
37 #define ADG_DIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_DIM, AdgDimClass))
39 typedef struct _AdgDim AdgDim;
40 typedef struct _AdgDimClass AdgDimClass;
42 struct _AdgDim {
43 /*< private >*/
44 AdgEntity parent;
47 struct _AdgDimClass {
48 /*< private >*/
49 AdgEntityClass parent_class;
51 /*< public >*/
52 /* Virtual table */
53 gboolean (*compute_geometry) (AdgDim *dim);
54 gdouble (*quote_angle) (gdouble angle);
55 gchar * (*default_value) (AdgDim *dim);
59 GType adg_dim_get_type (void);
60 AdgDimStyle * adg_dim_get_dim_style (AdgDim *dim);
61 AdgDress adg_dim_get_dim_dress (AdgDim *dim);
62 void adg_dim_set_dim_dress (AdgDim *dim,
63 AdgDress dress);
64 void adg_dim_set_ref1 (AdgDim *dim,
65 const AdgPoint *ref1);
66 void adg_dim_set_ref1_explicit (AdgDim *dim,
67 gdouble x,
68 gdouble y);
69 void adg_dim_set_ref1_from_pair (AdgDim *dim,
70 const CpmlPair *ref1);
71 void adg_dim_set_ref1_from_model (AdgDim *dim,
72 AdgModel *model,
73 const gchar *ref1);
74 AdgPoint * adg_dim_get_ref1 (AdgDim *dim);
75 void adg_dim_set_ref2 (AdgDim *dim,
76 const AdgPoint *ref2);
77 void adg_dim_set_ref2_explicit (AdgDim *dim,
78 gdouble x,
79 gdouble y);
80 void adg_dim_set_ref2_from_pair (AdgDim *dim,
81 const CpmlPair *ref2);
82 void adg_dim_set_ref2_from_model (AdgDim *dim,
83 AdgModel *model,
84 const gchar *ref2);
85 AdgPoint * adg_dim_get_ref2 (AdgDim *dim);
86 void adg_dim_set_pos (AdgDim *dim,
87 const AdgPoint *pos);
88 void adg_dim_set_pos_explicit (AdgDim *dim,
89 gdouble x,
90 gdouble y);
91 void adg_dim_set_pos_from_pair (AdgDim *dim,
92 const CpmlPair *pos);
93 void adg_dim_set_pos_from_model (AdgDim *dim,
94 AdgModel *model,
95 const gchar *pos);
96 AdgPoint * adg_dim_get_pos (AdgDim *dim);
97 void adg_dim_set_level (AdgDim *dim,
98 gdouble level);
99 gdouble adg_dim_get_level (AdgDim *dim);
100 void adg_dim_set_outside (AdgDim *dim,
101 AdgThreeState outside);
102 AdgThreeState adg_dim_get_outside (AdgDim *dim);
103 void adg_dim_set_detached (AdgDim *dim,
104 AdgThreeState detached);
105 AdgThreeState adg_dim_get_detached (AdgDim *dim);
106 void adg_dim_set_value (AdgDim *dim,
107 const gchar *value);
108 const gchar * adg_dim_get_value (AdgDim *dim);
109 gchar * adg_dim_get_text (AdgDim *dim,
110 gdouble value);
111 void adg_dim_set_limits (AdgDim *dim,
112 const gchar *min,
113 const gchar *max);
114 void adg_dim_set_min (AdgDim *dim,
115 const gchar *min);
116 const gchar * adg_dim_get_min (AdgDim *dim);
117 void adg_dim_set_max (AdgDim *dim,
118 const gchar *max);
119 const gchar * adg_dim_get_max (AdgDim *dim);
120 gdouble adg_dim_quote_angle (AdgDim *dim,
121 gdouble angle);
122 AdgAlignment * adg_dim_get_quote (AdgDim *dim);
123 gboolean adg_dim_has_geometry (AdgDim *dim);
124 void adg_dim_switch_geometry (AdgDim *dim,
125 gboolean computed);
126 const gchar * adg_dim_get_geometry_notice (AdgDim *dim);
127 void adg_dim_set_geometry_notice (AdgDim *dim,
128 const gchar *notice);
129 void adg_dim_geometry_missing (AdgDim *dim,
130 const gchar *subject);
131 void adg_dim_geometry_coincident (AdgDim *dim,
132 const gchar *first,
133 const gchar *second,
134 const CpmlPair *pos);
135 gboolean adg_dim_compute_geometry (AdgDim *dim);
137 G_END_DECLS
140 #endif /* __ADG_DIM_H__ */