Updated "GNU Library General License" to "GNU Lesser General License
[adg.git] / adg / adg-dim.h
blobe64544da89303b3ef094f1088a983a3bd5a10f43
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007-2008, 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 #ifndef __ADG_DIM_H__
22 #define __ADG_DIM_H__
24 #include <adg/adg-entity.h>
25 #include <adg/adg-pair.h>
28 G_BEGIN_DECLS
30 #define ADG_TYPE_DIM (adg_dim_get_type ())
31 #define ADG_DIM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ADG_TYPE_DIM, AdgDim))
32 #define ADG_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ADG_TYPE_DIM, AdgDimClass))
33 #define ADG_IS_DIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ADG_TYPE_DIM))
34 #define ADG_IS_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ADG_TYPE_DIM))
35 #define ADG_DIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ADG_TYPE_DIM, AdgDimClass))
37 typedef struct _AdgDim AdgDim;
38 typedef struct _AdgDimClass AdgDimClass;
39 typedef struct _AdgDimPrivate AdgDimPrivate;
41 struct _AdgDim {
42 AdgEntity entity;
43 /*< private >*/
44 AdgDimPrivate *priv;
47 struct _AdgDimClass {
48 AdgEntityClass parent_class;
49 /* Virtual Table */
50 gchar * (*default_quote) (AdgDim *dim);
51 void (*quote_layout) (AdgDim *dim,
52 cairo_t *cr);
56 GType adg_dim_get_type (void) G_GNUC_CONST;
57 const AdgPair * adg_dim_get_org (AdgDim *dim);
58 void adg_dim_set_org (AdgDim *dim,
59 const AdgPair *org);
60 void adg_dim_set_org_explicit (AdgDim *dim,
61 gdouble org_x,
62 gdouble org_y);
63 gdouble adg_dim_get_angle (AdgDim *dim);
64 void adg_dim_set_angle (AdgDim *dim,
65 gdouble angle);
66 const AdgPair * adg_dim_get_ref1 (AdgDim *dim);
67 const AdgPair * adg_dim_get_ref2 (AdgDim *dim);
68 void adg_dim_set_ref (AdgDim *dim,
69 const AdgPair *ref1,
70 const AdgPair *ref2);
71 void adg_dim_set_ref_explicit (AdgDim *dim,
72 gdouble ref1_x,
73 gdouble ref1_y,
74 gdouble ref2_x,
75 gdouble ref2_y);
76 const AdgPair * adg_dim_get_pos1 (AdgDim *dim);
77 const AdgPair * adg_dim_get_pos2 (AdgDim *dim);
78 void adg_dim_set_pos (AdgDim *dim,
79 AdgPair *pos1,
80 AdgPair *pos2);
81 void adg_dim_set_pos_explicit (AdgDim *dim,
82 gdouble pos1_x,
83 gdouble pos1_y,
84 gdouble pos2_x,
85 gdouble pos2_y);
86 gdouble adg_dim_get_level (AdgDim *dim);
87 void adg_dim_set_level (AdgDim *dim,
88 gdouble level);
89 const gchar * adg_dim_get_quote (AdgDim *dim);
90 void adg_dim_set_quote (AdgDim *dim,
91 const gchar *quote);
92 const gchar * adg_dim_get_tolerance_up (AdgDim *dim);
93 void adg_dim_set_tolerance_up (AdgDim *dim,
94 const gchar *tolerance_up);
95 const gchar * adg_dim_get_tolerance_down (AdgDim *dim);
96 void adg_dim_set_tolerance_down (AdgDim *dim,
97 const gchar *tolerance_down);
98 void adg_dim_set_tolerances (AdgDim *dim,
99 const gchar *tolerance_up,
100 const gchar *tolerance_down);
101 const gchar * adg_dim_get_note (AdgDim *dim);
102 void adg_dim_set_note (AdgDim *dim,
103 const gchar *note);
104 void adg_dim_render_quote (AdgDim *dim,
105 cairo_t *cr);
107 G_END_DECLS
110 #endif /* __ADG_DIM_H__ */