[docs] Updated TODO.xml
[adg.git] / adg / adg-dim.h
blobc1fd8baab16a6e47fb58e8998a04e050fe3d608d
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007,2008,2009 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-alignment.h>
25 #include <adg/adg-model.h>
26 #include <adg/adg-enums.h>
29 G_BEGIN_DECLS
31 #define ADG_TYPE_DIM (adg_dim_get_type())
32 #define ADG_DIM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_DIM, AdgDim))
33 #define ADG_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_DIM, AdgDimClass))
34 #define ADG_IS_DIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_DIM))
35 #define ADG_IS_DIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_DIM))
36 #define ADG_DIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_DIM, AdgDimClass))
38 typedef struct _AdgDim AdgDim;
39 typedef struct _AdgDimClass AdgDimClass;
41 struct _AdgDim {
42 /*< private >*/
43 AdgEntity parent;
44 gpointer data;
47 struct _AdgDimClass {
48 /*< private >*/
49 AdgEntityClass parent_class;
50 /*< public >*/
51 /* Virtual Table */
52 gdouble (*quote_angle) (gdouble angle);
53 gchar * (*default_value) (AdgDim *dim);
57 GType adg_dim_get_type (void) G_GNUC_CONST;
58 AdgDress adg_dim_get_dim_dress (AdgDim *dim);
59 void adg_dim_set_dim_dress (AdgDim *dim,
60 AdgDress dress);
61 void adg_dim_set_ref (AdgDim *dim,
62 const AdgPair *ref1,
63 const AdgPair *ref2);
64 void adg_dim_set_ref_explicit (AdgDim *dim,
65 gdouble ref1_x,
66 gdouble ref1_y,
67 gdouble ref2_x,
68 gdouble ref2_y);
69 void adg_dim_set_ref_from_model (AdgDim *dim,
70 AdgModel *model,
71 const gchar *ref1,
72 const gchar *ref2);
73 const AdgPair * adg_dim_get_ref1 (AdgDim *dim);
74 const AdgPair * adg_dim_get_ref2 (AdgDim *dim);
75 void adg_dim_set_pos (AdgDim *dim,
76 const AdgPair *pos);
77 void adg_dim_set_pos_explicit (AdgDim *dim,
78 gdouble x,
79 gdouble y);
80 void adg_dim_set_pos_from_model (AdgDim *dim,
81 AdgModel *model,
82 const gchar *pos);
83 const AdgPair * adg_dim_get_pos (AdgDim *dim);
84 void adg_dim_set_level (AdgDim *dim,
85 gdouble level);
86 gdouble adg_dim_get_level (AdgDim *dim);
87 void adg_dim_set_outside (AdgDim *dim,
88 AdgThreeState outside);
89 AdgThreeState adg_dim_get_outside (AdgDim *dim);
90 void adg_dim_set_detached (AdgDim *dim,
91 AdgThreeState detached);
92 AdgThreeState adg_dim_get_detached (AdgDim *dim);
93 void adg_dim_set_value (AdgDim *dim,
94 const gchar *value);
95 const gchar * adg_dim_get_value (AdgDim *dim);
96 void adg_dim_set_limits (AdgDim *dim,
97 const gchar *min,
98 const gchar *max);
99 void adg_dim_set_min (AdgDim *dim,
100 const gchar *min);
101 const gchar * adg_dim_get_min (AdgDim *dim);
102 void adg_dim_set_max (AdgDim *dim,
103 const gchar *max);
104 const gchar * adg_dim_get_max (AdgDim *dim);
105 gdouble adg_dim_quote_angle (AdgDim *dim,
106 gdouble angle);
107 AdgAlignment * adg_dim_get_quote (AdgDim *dim);
109 G_END_DECLS
112 #endif /* __ADG_DIM_H__ */