ADG

Sign in or create your account | Project List | Help

ADG Commit Details

Date:2011-04-09 20:44:58 (1 year 1 month ago)
Author:Nicola Fontana
Commit:e7bb98db6826bad785675c7e061655fa990bf80f
Message:[build] Got rid of adg-canvas-gtk.h hack

Instead of using a conditional include, the file adg-canvas.h is
modified by configure. autoconf does not help here (multiline editing is
quit hackish) but it is better than having a spurious file around.
Files: configure.ac (2 diffs)
docs/adg/Makefile.am (1 diff)
po-properties/it.po (10 diffs)
src/adg.h.in (1 diff)
src/adg/Makefile.am (1 diff)
src/adg/adg-canvas-gtk.h (1 diff)
src/adg/adg-canvas.c (2 diffs)
src/adg/adg-canvas.h (2 diffs)
src/adg/adg-canvas.h.in (1 diff)
src/adg/adg-entity.c (1 diff)

Change Details

configure.ac
209209#include \"adg/adg-gtk-utils.h\"
210210#include \"adg/adg-gtk-area.h\"
211211#include \"adg/adg-gtk-layout.h\"
212#include \"adg/adg-canvas-gtk.h\"
213212"
214213            ADG_CANVAS_H_ADDITIONAL='
215214void adg_canvas_set_paper (AdgCanvas *canvas,
...... 
255254                 src/adg-1.pc
256255                 src/adg.h
257256                 src/adg/Makefile
257                 src/adg/adg-canvas.h
258258                 src/adg/tests/Makefile
259259                 demo/Makefile
260260                 demo/cpml-demo.ui
docs/adg/Makefile.am
2323            adg-alignment-private.h \
2424            adg-arrow-private.h \
2525            adg-canvas-private.h \
26            adg-canvas-gtk.h \
2726            adg-color-style-private.h \
2827            adg-container-private.h \
2928            adg-dim-private.h \
po-properties/it.po
99msgstr ""
1010"Project-Id-Version: adg 1.0.x\n"
1111"Report-Msgid-Bugs-To: \n"
12"POT-Creation-Date: 2011-04-09 19:31+0200\n"
12"POT-Creation-Date: 2011-04-09 20:41+0200\n"
1313"PO-Revision-Date: 2010-09-28 16:40+0200\n"
1414"Last-Translator: Nicola Fontana <ntd@entidi.it>\n"
1515"Language-Team: \n"
...... 
8080msgid "The opening angle of the arrow"
8181msgstr "L'angolo di apertura della freccia"
8282
83#: src/adg/adg-canvas.c:154
83#: src/adg/adg-canvas.c:152
8484msgid "Canvas Size"
8585msgstr "Dimensione Canvas"
8686
87#: src/adg/adg-canvas.c:155
87#: src/adg/adg-canvas.c:153
8888msgid ""
8989"The size set on this canvas: use 0 to have an automatic dimension based on "
9090"the canvas extents"
...... 
9292"La dimensione impostata per questo canvas: usare 0 per abilitare il "
9393"dimensionamento automatico basato sui limiti del canvas"
9494
95#: src/adg/adg-canvas.c:161
95#: src/adg/adg-canvas.c:159
9696msgid "Background Dress"
9797msgstr "Vestito Sfondo"
9898
99#: src/adg/adg-canvas.c:162
99#: src/adg/adg-canvas.c:160
100100msgid "The color dress to use for the canvas background"
101101msgstr "Il vestito colore da usare come sfondo per il canvas"
102102
103#: src/adg/adg-canvas.c:168 src/adg/adg-logo.c:109
103#: src/adg/adg-canvas.c:166 src/adg/adg-logo.c:109
104104#: src/adg/adg-table-style.c:110
105105msgid "Frame Dress"
106106msgstr "Vestito Riquadro"
107107
108#: src/adg/adg-canvas.c:169
108#: src/adg/adg-canvas.c:167
109109msgid "Line dress to use while drawing the frame around the canvas"
110110msgstr "Vesito linea da usare durante il rendering della cornice del canvas"
111111
112#: src/adg/adg-canvas.c:175
112#: src/adg/adg-canvas.c:173
113113msgid "Title Block"
114114msgstr "Blocco delle Iscrizioni"
115115
116#: src/adg/adg-canvas.c:176
116#: src/adg/adg-canvas.c:174
117117msgid "The title block to assign to this canvas"
118118msgstr "Il blocco delle iscrizioni da allegare a questo canvas"
119119
120#: src/adg/adg-canvas.c:182
120#: src/adg/adg-canvas.c:180
121121msgid "Top Margin"
122122msgstr "Margine Superiore"
123123
124#: src/adg/adg-canvas.c:183
124#: src/adg/adg-canvas.c:181
125125msgid "The margin (in global space) to leave above the frame"
126126msgstr "Lo spazio (in global space) da lasciare sopra la cornice"
127127
128#: src/adg/adg-canvas.c:189
128#: src/adg/adg-canvas.c:187
129129msgid "Right Margin"
130130msgstr "Margine Destro"
131131
132#: src/adg/adg-canvas.c:190
132#: src/adg/adg-canvas.c:188
133133msgid "The margin (in global space) to leave empty at the right of the frame"
134134msgstr "Lo spazio (in global space) da lasciare alla destra della cornice"
135135
136#: src/adg/adg-canvas.c:196
136#: src/adg/adg-canvas.c:194
137137msgid "Bottom Margin"
138138msgstr "Margine Inferiore"
139139
140#: src/adg/adg-canvas.c:197
140#: src/adg/adg-canvas.c:195
141141msgid "The margin (in global space) to leave empty below the frame"
142142msgstr "Lo spazio (in global space) da lasciare vuoto sotto la cornice"
143143
144#: src/adg/adg-canvas.c:203
144#: src/adg/adg-canvas.c:201
145145msgid "Left Margin"
146146msgstr "Margine Sinistro"
147147
148#: src/adg/adg-canvas.c:204
148#: src/adg/adg-canvas.c:202
149149msgid "The margin (in global space) to leave empty at the left of the frame"
150150msgstr ""
151151"Lo spazio (nello spazio globale) da lasciare vuoto alla sinistra della "
152152"cornice"
153153
154#: src/adg/adg-canvas.c:210 src/adg/adg-table.c:196
154#: src/adg/adg-canvas.c:208 src/adg/adg-table.c:196
155155msgid "Has Frame Flag"
156156msgstr "Flag di Riquadro Presente"
157157
158#: src/adg/adg-canvas.c:211
158#: src/adg/adg-canvas.c:209
159159msgid ""
160160"If enabled, a frame using the frame dress will be drawn around the canvas "
161161"extents, taking into account the margins"
...... 
163163"Se abilitato verrà disegnata una cornice, usando vestito cornice, attorno ai "
164164"limiti dal canvas tenendo in considerazione i margini"
165165
166#: src/adg/adg-canvas.c:217
166#: src/adg/adg-canvas.c:215
167167msgid "Top Padding"
168168msgstr "Spaziatura Superiore"
169169
170#: src/adg/adg-canvas.c:218
170#: src/adg/adg-canvas.c:216
171171msgid ""
172172"The padding (in global space) to leave empty above between the drawing and "
173173"the frame"
...... 
175175"La spaziatura (in global space) da lasciare vuota sopra tra il disegno e la "
176176"cornice"
177177
178#: src/adg/adg-canvas.c:224
178#: src/adg/adg-canvas.c:222
179179msgid "Right Padding"
180180msgstr "Spaziatura Destra"
181181
182#: src/adg/adg-canvas.c:225
182#: src/adg/adg-canvas.c:223
183183msgid ""
184184"The padding (in global space) to leave empty at the right between the "
185185"drawing and the frame"
...... 
187187"La spaziatura (in global space) da lasciare vuota a destra tra il disegno e "
188188"la cornice"
189189
190#: src/adg/adg-canvas.c:231
190#: src/adg/adg-canvas.c:229
191191msgid "Bottom Padding"
192192msgstr "Spaziatura Inferiore"
193193
194#: src/adg/adg-canvas.c:232
194#: src/adg/adg-canvas.c:230
195195msgid ""
196196"The padding (in global space) to leave empty below between the drawing and "
197197"the frame"
...... 
199199"La spaziatura (in global space) da lasciare vuota a sotto tra il disegno e "
200200"la cornice"
201201
202#: src/adg/adg-canvas.c:238
202#: src/adg/adg-canvas.c:236
203203msgid "Left Padding"
204204msgstr "Spaziatura Sinistra"
205205
206#: src/adg/adg-canvas.c:239
206#: src/adg/adg-canvas.c:237
207207msgid ""
208208"The padding (in global space) to leave empty at the left between the drawing "
209209"and the frame"
...... 
553553"L'angolo che definisce quando considerare uno spigolo (se l'angolo dello "
554554"spigolo è maggiore di questo valore) e quando ignorarlo"
555555
556#: src/adg/adg-entity.c:155
556#: src/adg/adg-entity.c:159
557557msgid "Parent Entity"
558558msgstr "Entità Genitore"
559559
560#: src/adg/adg-entity.c:156
560#: src/adg/adg-entity.c:160
561561msgid "The parent entity of this entity or NULL if this is a top-level entity"
562562msgstr ""
563563"L'entità che contiene questa entità o NULL se l'entità corrente è una top-"
564564"level"
565565
566#: src/adg/adg-entity.c:162
566#: src/adg/adg-entity.c:166
567567msgid "Global Map"
568568msgstr "Trasformazione Globale"
569569
570#: src/adg/adg-entity.c:163
570#: src/adg/adg-entity.c:167
571571msgid ""
572572"The transformation to be combined with the parent ones to get the global "
573573"matrix"
...... 
575575"La trasformazione da combinare insieme a quelle dei progenitori per ottenere "
576576"la matrice globale"
577577
578#: src/adg/adg-entity.c:169
578#: src/adg/adg-entity.c:173
579579msgid "Local Map"
580580msgstr "Trasformazione Locale"
581581
582#: src/adg/adg-entity.c:170
582#: src/adg/adg-entity.c:174
583583msgid ""
584584"The local transformation that could be used to compute the local matrix in "
585585"the way specified by the #AdgEntity:local-method property"
...... 
587587"La trasformazione locale che può venir usata per calcolare la matrice locale "
588588"nella modalità specificata dalla proprietà #AdgEntity:local-method"
589589
590#: src/adg/adg-entity.c:176
590#: src/adg/adg-entity.c:180
591591msgid "Local Mix Method"
592592msgstr "Metodo di Combinazione Locale"
593593
594#: src/adg/adg-entity.c:177
594#: src/adg/adg-entity.c:181
595595msgid ""
596596"Define how the local maps of the entity and its ancestors should be combined "
597597"to get the local matrix"
src/adg.h.in
5858#include "adg/adg-alignment.h"
5959#include "adg/adg-table.h"
6060#include "adg/adg-title-block.h"
61#include "adg/adg-canvas.h"
6261#include "adg/adg-arrow.h"
6362#include "adg/adg-dim.h"
6463#include "adg/adg-ldim.h"
6564#include "adg/adg-rdim.h"
6665#include "adg/adg-adim.h"
6766@ADG_H_ADDITIONAL@
67#include "adg/adg-canvas.h"
68
6869#endif /* __ADG_H__ */
src/adg/Makefile.am
160160## Optional GTK+2 related stuff
161161if HAVE_GTK2
162162
163h_sources+= adg-canvas-gtk.h \
164                adg-gtk-area.h \
163h_sources+= adg-gtk-area.h \
165164                adg-gtk-layout.h \
166165                adg-gtk-utils.h
167166private_h_sources+= adg-gtk-area-private.h \
src/adg/adg-canvas-gtk.h
1/* ADG - Automatic Drawing Generation
2 * Copyright (C) 2011 Nicola Fontana <ntd at entidi.it>
3 *
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.
8 *
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.
13 *
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.
18 */
19
20
21#if !defined(__ADG_H__)
22#error "Only <adg.h> can be included directly."
23#endif
24
25
26#ifndef __ADG_CANVAS_GTK_H__
27#define __ADG_CANVAS_GTK_H__
28
29
30G_BEGIN_DECLS
31
32void adg_canvas_set_paper (AdgCanvas *canvas,
33                                                 const gchar *paper_name,
34                                                 GtkPageOrientation orientation);
35void adg_canvas_set_page_setup (AdgCanvas *canvas,
36                                                 GtkPageSetup *page_setup);
37
38G_END_DECLS
39
40
41#endif /* __ADG_CANVAS_GTK_H__ */
src/adg/adg-canvas.c
6969
7070
7171#include "adg-internal.h"
72#if GTK2_ENABLED
73#include <gtk/gtk.h>
74#endif
7275
7376#include "adg-container.h"
7477#include "adg-table.h"
...... 
8184#include "adg-canvas.h"
8285#include "adg-canvas-private.h"
8386
84#if GTK2_ENABLED
85#include <gtk/gtk.h>
86#include "adg-canvas-gtk.h"
87#endif
88
8987
9088#define _ADG_OLD_OBJECT_CLASS ((GObjectClass *) adg_canvas_parent_class)
9189#define _ADG_OLD_ENTITY_CLASS ((AdgEntityClass *) adg_canvas_parent_class)
src/adg/adg-canvas.h
1010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1212 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
13 * * You should have received a copy of the GNU Lesser General Public
1514 * License along with this library; if not, write to the
1615 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
1716 * Boston, MA 02110-1301, USA.
...... 
112111                                                 gdouble right,
113112                                                 gdouble bottom,
114113                                                 gdouble left);
115/* Declared by adg-canvas-gtk.h */
116#if 0
114
117115void adg_canvas_set_paper (AdgCanvas *canvas,
118116                                                 const gchar *paper_name,
119117                                                 GtkPageOrientation orientation);
120118void adg_canvas_set_page_setup (AdgCanvas *canvas,
121119                                                 GtkPageSetup *page_setup);
122#endif
120
123121
124122G_END_DECLS
125123
src/adg/adg-canvas.h.in
1/* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007,2008,2009,2010,2011 Nicola Fontana <ntd at entidi.it>
3 *
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.
8 *
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.
13 * * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19
20#if !defined(__ADG_H__)
21#error "Only <adg.h> can be included directly."
22#endif
23
24
25#ifndef __ADG_CANVAS_H__
26#define __ADG_CANVAS_H__
27
28
29G_BEGIN_DECLS
30
31#define ADG_TYPE_CANVAS (adg_canvas_get_type())
32#define ADG_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_CANVAS, AdgCanvas))
33#define ADG_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_CANVAS, AdgCanvasClass))
34#define ADG_IS_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_CANVAS))
35#define ADG_IS_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_CANVAS))
36#define ADG_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_CANVAS, AdgCanvasClass))
37
38#if 0
39/* AdgCanvas declared in adg-entity.h */
40typedef struct _AdgCanvas AdgCanvas;
41#endif
42typedef struct _AdgCanvasClass AdgCanvasClass;
43
44
45struct _AdgCanvas {
46    /*< private >*/
47    AdgContainer parent;
48    gpointer data;
49};
50
51struct _AdgCanvasClass {
52    /*< private >*/
53    AdgContainerClass parent_class;
54};
55
56
57GType adg_canvas_get_type (void) G_GNUC_CONST;
58
59AdgCanvas * adg_canvas_new (void);
60void adg_canvas_set_size (AdgCanvas *canvas,
61                                                 const AdgPair *pair);
62void adg_canvas_set_size_explicit (AdgCanvas *canvas,
63                                                 gdouble x,
64                                                 gdouble y);
65const AdgPair * adg_canvas_get_size (AdgCanvas *canvas);
66void adg_canvas_set_background_dress (AdgCanvas *canvas,
67                                                 AdgDress dress);
68AdgDress adg_canvas_get_background_dress (AdgCanvas *canvas);
69void adg_canvas_set_frame_dress (AdgCanvas *canvas,
70                                                 AdgDress dress);
71AdgDress adg_canvas_get_frame_dress (AdgCanvas *canvas);
72void adg_canvas_set_title_block (AdgCanvas *canvas,
73                                                 AdgTitleBlock *title_block);
74AdgTitleBlock * adg_canvas_get_title_block (AdgCanvas *canvas);
75void adg_canvas_set_top_margin (AdgCanvas *canvas,
76                                                 gdouble value);
77gdouble adg_canvas_get_top_margin (AdgCanvas *canvas);
78void adg_canvas_set_right_margin (AdgCanvas *canvas,
79                                                 gdouble value);
80gdouble adg_canvas_get_right_margin (AdgCanvas *canvas);
81void adg_canvas_set_bottom_margin (AdgCanvas *canvas,
82                                                 gdouble value);
83gdouble adg_canvas_get_bottom_margin (AdgCanvas *canvas);
84void adg_canvas_set_left_margin (AdgCanvas *canvas,
85                                                 gdouble value);
86gdouble adg_canvas_get_left_margin (AdgCanvas *canvas);
87void adg_canvas_set_margins (AdgCanvas *canvas,
88                                                 gdouble top,
89                                                 gdouble right,
90                                                 gdouble bottom,
91                                                 gdouble left);
92void adg_canvas_apply_margins (AdgCanvas *canvas,
93                                                 CpmlExtents *extents);
94void adg_canvas_switch_frame (AdgCanvas *canvas,
95                                                 gboolean new_state);
96gboolean adg_canvas_has_frame (AdgCanvas *canvas);
97void adg_canvas_set_top_padding (AdgCanvas *canvas,
98                                                 gdouble value);
99gdouble adg_canvas_get_top_padding (AdgCanvas *canvas);
100void adg_canvas_set_right_padding (AdgCanvas *canvas,
101                                                 gdouble value);
102gdouble adg_canvas_get_right_padding (AdgCanvas *canvas);
103void adg_canvas_set_bottom_padding (AdgCanvas *canvas,
104                                                 gdouble value);
105gdouble adg_canvas_get_bottom_padding (AdgCanvas *canvas);
106void adg_canvas_set_left_padding (AdgCanvas *canvas,
107                                                 gdouble value);
108gdouble adg_canvas_get_left_padding (AdgCanvas *canvas);
109void adg_canvas_set_paddings (AdgCanvas *canvas,
110                                                 gdouble top,
111                                                 gdouble right,
112                                                 gdouble bottom,
113                                                 gdouble left);
114@ADG_CANVAS_H_ADDITIONAL@
115
116G_END_DECLS
117
118
119#endif /* __ADG_CANVAS_H__ */
src/adg/adg-entity.c
7171
7272
7373#include "adg-internal.h"
74#if GTK2_ENABLED
75#include <gtk/gtk.h>
76#endif
77
7478#include "adg-container.h"
7579#include "adg-table.h"
7680#include "adg-title-block.h"

Archive Download the corresponding diff file