[docs] Updated TODO.xml
[adg.git] / adg / adg-title-block.c
blobe1629173e83f511acc97bc8fa16787d3a0adbc67
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 /**
22 * SECTION:adg-title-block
23 * @short_description: A title block entity
25 * Title blocks are commonly used in technical drawings to include
26 * additional information not strictly related to physical dimensions,
27 * such as title, material of the represented part, special treatments,
28 * date and scale etc.
30 * Actually this entity is only a place-holder: it will be implemented
31 * properly in a 0.6.x release, after having AdgToyTable in place.
32 **/
34 /**
35 * AdgTitleBlock:
37 * All fields are privates and should not be used directly.
38 * Use its public methods instead.
39 **/
42 #include "adg-title-block.h"
43 #include "adg-title-block-private.h"
44 #include "adg-intl.h"
46 #define PARENT_OBJECT_CLASS ((GObjectClass *) adg_title_block_parent_class)
47 #define PARENT_ENTITY_CLASS ((AdgEntityClass *) adg_title_block_parent_class)
50 enum {
51 PROP_0,
52 PROP_TITLE,
53 PROP_DRAWING,
54 PROP_SIZE,
55 PROP_SCALE,
56 PROP_AUTHOR,
57 PROP_DATE,
58 PROP_LOGO,
59 PROP_PROJECTION
63 static void finalize (GObject *object);
64 static void get_property (GObject *object,
65 guint prop_id,
66 GValue *value,
67 GParamSpec *pspec);
68 static void set_property (GObject *object,
69 guint prop_id,
70 const GValue *value,
71 GParamSpec *pspec);
72 static AdgTable * get_table (AdgTitleBlock *title_block);
73 static gboolean set_title (AdgTitleBlock *title_block,
74 const gchar *title);
75 static gboolean set_drawing (AdgTitleBlock *title_block,
76 const gchar *drawing);
77 static gboolean set_size (AdgTitleBlock *title_block,
78 const gchar *size);
79 static gboolean set_scale (AdgTitleBlock *title_block,
80 const gchar *scale);
81 static gboolean set_author (AdgTitleBlock *title_block,
82 const gchar *author);
83 static gboolean set_date (AdgTitleBlock *title_block,
84 const gchar *date);
85 static gboolean set_logo (AdgTitleBlock *title_block,
86 AdgEntity *logo);
87 static gboolean set_projection (AdgTitleBlock *title_block,
88 AdgEntity *projection);
91 G_DEFINE_TYPE(AdgTitleBlock, adg_title_block, ADG_TYPE_TABLE);
94 static void
95 adg_title_block_class_init(AdgTitleBlockClass *klass)
97 GObjectClass *gobject_class;
98 GParamSpec *param;
100 gobject_class = (GObjectClass *) klass;
102 g_type_class_add_private(klass, sizeof(AdgTitleBlockPrivate));
104 gobject_class->finalize = finalize;
105 gobject_class->set_property = set_property;
106 gobject_class->get_property = get_property;
108 param = g_param_spec_string("title",
109 P_("Title"),
110 P_("A descriptive title of the drawing"),
111 NULL,
112 G_PARAM_READWRITE);
113 g_object_class_install_property(gobject_class, PROP_TITLE, param);
115 param = g_param_spec_string("drawing",
116 P_("Drawing Name"),
117 P_("The name of the drawing: the ADG canvas does not make any assumtpion on this text string"),
118 NULL,
119 G_PARAM_READWRITE);
120 g_object_class_install_property(gobject_class, PROP_DRAWING, param);
122 param = g_param_spec_string("size",
123 P_("Media Size"),
124 P_("The media size to be used to print the drawing, usually something like \"A3\" or \"Letter\""),
125 NULL,
126 G_PARAM_READWRITE);
127 g_object_class_install_property(gobject_class, PROP_SIZE, param);
129 param = g_param_spec_string("scale",
130 P_("Scale"),
131 P_("The scale of the drawing, if it makes sense"),
132 NULL,
133 G_PARAM_READWRITE);
134 g_object_class_install_property(gobject_class, PROP_SCALE, param);
136 param = g_param_spec_string("author",
137 P_("Author"),
138 P_("Name and last name of the author of the drawing"),
139 NULL,
140 G_PARAM_READWRITE);
141 g_object_class_install_property(gobject_class, PROP_AUTHOR, param);
143 param = g_param_spec_string("date",
144 P_("Date"),
145 P_("The date this drawing has been generated: setting it to an empty string will fallback to today in the preferred representation for the current locale"),
146 NULL,
147 G_PARAM_READWRITE);
148 g_object_class_install_property(gobject_class, PROP_DATE, param);
150 param = g_param_spec_object("logo",
151 P_("Logo"),
152 P_("An entity to be displayed in the title block as the logo of the owner: the containing cell has a 1:1 ratio"),
153 ADG_TYPE_ENTITY,
154 G_PARAM_READWRITE);
155 g_object_class_install_property(gobject_class, PROP_LOGO, param);
157 param = g_param_spec_object("projection",
158 P_("Projection Scheme"),
159 P_("The entity usually reserved to identify the projection scheme adopted by this drawing"),
160 ADG_TYPE_ENTITY,
161 G_PARAM_READWRITE);
162 g_object_class_install_property(gobject_class, PROP_PROJECTION, param);
165 static void
166 adg_title_block_init(AdgTitleBlock *title_block)
168 AdgTitleBlockPrivate *data = G_TYPE_INSTANCE_GET_PRIVATE(title_block,
169 ADG_TYPE_TITLE_BLOCK,
170 AdgTitleBlockPrivate);
171 data->author = NULL;
172 data->title = NULL;
173 data->drawing = NULL;
174 data->size = NULL;
175 data->scale = NULL;
176 data->author = NULL;
177 data->date = NULL;
178 data->projection = NULL;
180 title_block->data = data;
183 static void
184 finalize(GObject *object)
186 AdgTitleBlockPrivate *data = ((AdgTitleBlock *) object)->data;
188 g_free(data->title);
189 g_free(data->drawing);
190 g_free(data->size);
191 g_free(data->scale);
192 g_free(data->author);
193 g_free(data->date);
195 if (PARENT_OBJECT_CLASS->finalize)
196 PARENT_OBJECT_CLASS->finalize(object);
199 static void
200 get_property(GObject *object,
201 guint prop_id, GValue *value, GParamSpec *pspec)
203 AdgTitleBlockPrivate *data = ((AdgTitleBlock *) object)->data;
205 switch (prop_id) {
206 case PROP_TITLE:
207 g_value_set_string(value, data->title);
208 break;
209 case PROP_DRAWING:
210 g_value_set_string(value, data->drawing);
211 break;
212 case PROP_SIZE:
213 g_value_set_string(value, data->size);
214 break;
215 case PROP_SCALE:
216 g_value_set_string(value, data->scale);
217 break;
218 case PROP_AUTHOR:
219 g_value_set_string(value, data->author);
220 break;
221 case PROP_DATE:
222 g_value_set_string(value, data->date);
223 break;
224 case PROP_LOGO:
225 g_value_set_object(value, data->logo);
226 break;
227 case PROP_PROJECTION:
228 g_value_set_object(value, data->projection);
229 break;
230 default:
231 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
232 break;
236 static void
237 set_property(GObject *object,
238 guint prop_id, const GValue *value, GParamSpec *pspec)
240 AdgTitleBlock *title_block = (AdgTitleBlock *) object;
242 switch (prop_id) {
243 case PROP_TITLE:
244 set_title(title_block, g_value_get_string(value));
245 break;
246 case PROP_DRAWING:
247 set_drawing(title_block, g_value_get_string(value));
248 break;
249 case PROP_SIZE:
250 set_size(title_block, g_value_get_string(value));
251 break;
252 case PROP_SCALE:
253 set_scale(title_block, g_value_get_string(value));
254 break;
255 case PROP_AUTHOR:
256 set_author(title_block, g_value_get_string(value));
257 break;
258 case PROP_DATE:
259 set_date(title_block, g_value_get_string(value));
260 break;
261 case PROP_LOGO:
262 set_logo(title_block, g_value_get_object(value));
263 break;
264 case PROP_PROJECTION:
265 set_projection(title_block, g_value_get_object(value));
266 break;
267 default:
268 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
269 break;
275 * adg_title_block_new:
277 * Creates a new empty title block entity. The #AdgEntity:local-method
278 * property is set by default to #ADG_MIX_DISABLED, that is the
279 * title block is not subject to any local transformations.
281 * Returns: the newly created title block entity
283 AdgTitleBlock *
284 adg_title_block_new(void)
286 return g_object_new(ADG_TYPE_TITLE_BLOCK,
287 "local-method", ADG_MIX_DISABLED, NULL);
291 * adg_title_block_set_title:
292 * @title_block: an #AdgTitleBlock entity
293 * @title: the new title
295 * Sets a new title on the title block.
297 void
298 adg_title_block_set_title(AdgTitleBlock *title_block, const gchar *title)
300 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
302 if (set_title(title_block, title))
303 g_object_notify((GObject *) title_block, "title");
307 * adg_title_block_get_title:
308 * @title_block: an #AdgTitleBlock entity
310 * Gets the descriptive title associated to this title block.
311 * The returned string is owned by @title_block and should not
312 * be modifed or freed.
314 * Returns: the title or %NULL on no title or errors
316 const gchar *
317 adg_title_block_get_title(AdgTitleBlock *title_block)
319 AdgTitleBlockPrivate *data;
321 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
323 data = title_block->data;
325 return data->title;
329 * adg_title_block_set_drawing:
330 * @title_block: an #AdgTitleBlock entity
331 * @drawing: the new drawing name
333 * Sets a new drawing name on the title block.
335 void
336 adg_title_block_set_drawing(AdgTitleBlock *title_block, const gchar *drawing)
338 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
340 if (set_drawing(title_block, drawing))
341 g_object_notify((GObject *) title_block, "drawing");
345 * adg_title_block_get_drawing:
346 * @title_block: an #AdgTitleBlock entity
348 * Gets the drawing name, commonly used to specify the file name.
349 * The returned string is owned by @title_block and should not
350 * be modifed or freed.
352 * Returns: the drawing name or %NULL on no name or errors
354 const gchar *
355 adg_title_block_get_drawing(AdgTitleBlock *title_block)
357 AdgTitleBlockPrivate *data;
359 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
361 data = title_block->data;
363 return data->drawing;
367 * adg_title_block_set_size:
368 * @title_block: an #AdgTitleBlock entity
369 * @size: the new size
371 * Sets a new size on the title block.
373 void
374 adg_title_block_set_size(AdgTitleBlock *title_block, const gchar *size)
376 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
378 if (set_size(title_block, size))
379 g_object_notify((GObject *) title_block, "size");
383 * adg_title_block_get_size:
384 * @title_block: an #AdgTitleBlock entity
386 * Gets the media size (a descriptive name) where this drawing will
387 * be printed. Usually contains something like "A4" or "Letter".
388 * The returned string is owned by @title_block and should not
389 * be modifed or freed.
391 * Returns: the size or %NULL on no size or errors
393 const gchar *
394 adg_title_block_get_size(AdgTitleBlock *title_block)
396 AdgTitleBlockPrivate *data;
398 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
400 data = title_block->data;
402 return data->size;
406 * adg_title_block_set_scale:
407 * @title_block: an #AdgTitleBlock entity
408 * @scale: the new scale
410 * Sets a new scale on the title block.
412 void
413 adg_title_block_set_scale(AdgTitleBlock *title_block, const gchar *scale)
415 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
417 if (set_scale(title_block, scale))
418 g_object_notify((GObject *) title_block, "scale");
422 * adg_title_block_get_scale:
423 * @title_block: an #AdgTitleBlock entity
425 * Gets the scale descriptive name of the drawing.
427 * Returns: the scale text or %NULL on no scale or errors
429 const gchar *
430 adg_title_block_get_scale(AdgTitleBlock *title_block)
432 AdgTitleBlockPrivate *data;
434 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
436 data = title_block->data;
438 return data->scale;
442 * adg_title_block_set_author:
443 * @title_block: an #AdgTitleBlock entity
444 * @author: the new author
446 * Sets a new author on the title block.
448 void
449 adg_title_block_set_author(AdgTitleBlock *title_block, const gchar *author)
451 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
453 if (set_author(title_block, author))
454 g_object_notify((GObject *) title_block, "author");
458 * adg_title_block_get_author:
459 * @title_block: an #AdgTitleBlock entity
461 * Gets the author's name of the drawing.
463 * Returns: the author or %NULL on no author or errors
465 const gchar *
466 adg_title_block_get_author(AdgTitleBlock *title_block)
468 AdgTitleBlockPrivate *data;
470 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
472 data = title_block->data;
474 return data->author;
478 * adg_title_block_set_date:
479 * @title_block: an #AdgTitleBlock entity
480 * @date: the new date
482 * Sets a new date on the title block. By default the date is set
483 * to %NULL (so no date will be rendered) but setting it to an
484 * empty string (that is, %"") will implicitely set the date to
485 * today, by using the preferred representation for the current
486 * local. This will give a result roughly equivalent to:
488 * |[
489 * strftime(buffer, sizeof(buffer), "%x", now);
490 * ]|
492 void
493 adg_title_block_set_date(AdgTitleBlock *title_block, const gchar *date)
495 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
497 if (set_date(title_block, date))
498 g_object_notify((GObject *) title_block, "date");
502 * adg_title_block_get_date:
503 * @title_block: an #AdgTitleBlock entity
505 * Gets the date of the rendering set on @title_block.
507 * Returns: the date or %NULL on no date or errors
509 const gchar *
510 adg_title_block_get_date(AdgTitleBlock *title_block)
512 AdgTitleBlockPrivate *data;
514 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
516 data = title_block->data;
518 return data->date;
522 * adg_title_block_set_logo:
523 * @title_block: an #AdgTitleBlock entity
524 * @logo: the new logo
526 * Sets a new logo on the title block. This function will add
527 * a reference to @logo, removing the eventual reference held
528 * to the old logo, hence possibly destroying the old endity.
530 * The space reserved for the logo is 56x56, so try to keep the
531 * new logo near this size or scale it accordingly.
533 void
534 adg_title_block_set_logo(AdgTitleBlock *title_block, AdgEntity *logo)
536 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
538 if (set_logo(title_block, logo))
539 g_object_notify((GObject *) title_block, "logo");
543 * adg_title_block_logo:
544 * @title_block: an #AdgTitleBlock entity
546 * Gets the logo bound to this title block.
547 * The returned object is owned by @title_block and should not
548 * be unreferenced although can be freely modified.
550 * Returns: the logo or %NULL on no logo or errors
552 AdgEntity *
553 adg_title_block_logo(AdgTitleBlock *title_block)
555 AdgTitleBlockPrivate *data;
557 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
559 data = title_block->data;
561 return data->logo;
565 * adg_title_block_set_projection:
566 * @title_block: an #AdgTitleBlock entity
567 * @projection: the new projection
569 * Sets a new projection symbol on the title block. This function
570 * will add a reference to @projection, removing the eventual
571 * reference held to the old symbol, hence possibly destroying
572 * the old endity.
574 * The space reserved for the projection is 56x56, so try to keep the
575 * new projection near this size or scale it accordingly.
577 void
578 adg_title_block_set_projection(AdgTitleBlock *title_block,
579 AdgEntity *projection)
581 g_return_if_fail(ADG_IS_TITLE_BLOCK(title_block));
583 if (set_projection(title_block, projection))
584 g_object_notify((GObject *) title_block, "projection");
588 * adg_title_block_projection:
589 * @title_block: an #AdgTitleBlock entity
591 * Gets the projection bound to this title block.
592 * The returned object is owned by @title_block and should not
593 * be unreferenced although can be freely modified.
595 * Returns: the projection or %NULL on no projection or errors
597 AdgEntity *
598 adg_title_block_projection(AdgTitleBlock *title_block)
600 AdgTitleBlockPrivate *data;
602 g_return_val_if_fail(ADG_IS_TITLE_BLOCK(title_block), NULL);
604 data = title_block->data;
606 return data->projection;
610 static AdgTable *
611 get_table(AdgTitleBlock *title_block)
613 AdgTable *table = (AdgTable *) title_block;
615 if (adg_table_get_n_rows(table) == 0) {
616 AdgTableRow *row;
617 AdgTableCell *cell;
619 /* First row */
620 row = adg_table_row_new(table);
622 cell = adg_table_cell_new(row, 62);
624 cell = adg_table_cell_new(row, 200);
625 adg_table_cell_set_name(cell, "title");
626 adg_table_cell_set_text_title(cell, _("TITLE"));
627 adg_table_cell_switch_frame(cell, TRUE);
629 /* Second row */
630 row = adg_table_row_new(table);
632 cell = adg_table_cell_new(row, 62);
633 adg_table_cell_set_name(cell, "logo");
635 cell = adg_table_cell_new(row, 40);
636 adg_table_cell_set_name(cell, "size");
637 adg_table_cell_set_text_title(cell, _("SIZE"));
638 adg_table_cell_switch_frame(cell, TRUE);
640 cell = adg_table_cell_new(row, 60);
641 adg_table_cell_set_name(cell, "scale");
642 adg_table_cell_set_text_title(cell, _("SCALE"));
643 adg_table_cell_switch_frame(cell, TRUE);
645 cell = adg_table_cell_new(row, 100);
646 adg_table_cell_set_name(cell, "drawing");
647 adg_table_cell_set_text_title(cell, _("DRAWING"));
648 adg_table_cell_switch_frame(cell, TRUE);
650 /* Third row */
651 row = adg_table_row_new(table);
653 cell = adg_table_cell_new(row, 62);
654 adg_table_cell_set_name(cell, "projection");
655 adg_table_cell_switch_frame(cell, TRUE);
657 cell = adg_table_cell_new(row, 100);
658 adg_table_cell_set_name(cell, "author");
659 adg_table_cell_set_text_title(cell, _("AUTHOR"));
660 adg_table_cell_switch_frame(cell, TRUE);
662 cell = adg_table_cell_new(row, 100);
663 adg_table_cell_set_name(cell, "date");
664 adg_table_cell_set_text_title(cell, _("DATE"));
665 adg_table_cell_switch_frame(cell, TRUE);
668 return table;
671 static gboolean
672 set_title(AdgTitleBlock *title_block, const gchar *title)
674 AdgTitleBlockPrivate *data;
675 AdgTable *table;
676 AdgTableCell *cell;
678 data = title_block->data;
680 if (adg_strcmp(title, data->title) == 0)
681 return FALSE;
683 g_free(data->title);
684 data->title = g_strdup(title);
686 table = get_table(title_block);
687 cell = adg_table_cell(table, "title");
688 adg_table_cell_set_text_value(cell, data->title);
689 return TRUE;
692 static gboolean
693 set_drawing(AdgTitleBlock *title_block, const gchar *drawing)
695 AdgTitleBlockPrivate *data;
696 AdgTable *table;
697 AdgTableCell *cell;
699 data = title_block->data;
701 if (adg_strcmp(drawing, data->drawing) == 0)
702 return FALSE;
704 g_free(data->drawing);
705 data->drawing = g_strdup(drawing);
707 table = get_table(title_block);
708 cell = adg_table_cell(table, "drawing");
709 adg_table_cell_set_text_value(cell, data->drawing);
710 return TRUE;
713 static gboolean
714 set_size(AdgTitleBlock *title_block, const gchar *size)
716 AdgTitleBlockPrivate *data;
717 AdgTable *table;
718 AdgTableCell *cell;
720 data = title_block->data;
722 if (adg_strcmp(size, data->size) == 0)
723 return FALSE;
725 g_free(data->size);
726 data->size = g_strdup(size);
728 table = get_table(title_block);
729 cell = adg_table_cell(table, "size");
730 adg_table_cell_set_text_value(cell, data->size);
731 return TRUE;
734 static gboolean
735 set_scale(AdgTitleBlock *title_block, const gchar *scale)
737 AdgTitleBlockPrivate *data;
738 AdgTable *table;
739 AdgTableCell *cell;
741 data = title_block->data;
743 if (adg_strcmp(scale, data->scale) == 0)
744 return FALSE;
746 g_free(data->scale);
747 data->scale = g_strdup(scale);
749 table = get_table(title_block);
750 cell = adg_table_cell(table, "scale");
751 adg_table_cell_set_text_value(cell, data->scale);
752 return TRUE;
755 static gboolean
756 set_author(AdgTitleBlock *title_block, const gchar *author)
758 AdgTitleBlockPrivate *data;
759 AdgTable *table;
760 AdgTableCell *cell;
762 data = title_block->data;
764 if (adg_strcmp(author, data->author) == 0)
765 return FALSE;
767 g_free(data->author);
768 data->author = g_strdup(author);
770 table = get_table(title_block);
771 cell = adg_table_cell(table, "author");
772 adg_table_cell_set_text_value(cell, data->author);
773 return TRUE;
776 static gboolean
777 set_date(AdgTitleBlock *title_block, const gchar *date)
779 AdgTitleBlockPrivate *data;
780 AdgTable *table;
781 AdgTableCell *cell;
783 data = title_block->data;
785 if (adg_strcmp(date, data->date) == 0)
786 return FALSE;
788 g_free(data->date);
790 if (date != NULL && date[0] == '\0') {
791 /* The date must be automatically updated */
792 GDate *gdate;
793 char buffer[100] = { 0 };
795 gdate = g_date_new();
796 g_date_set_time_t(gdate, time (NULL));
797 g_date_strftime(buffer, sizeof(buffer), "%x", gdate);
798 g_date_free(gdate);
800 data->date = g_strdup(buffer);
801 } else {
802 data->date = g_strdup(date);
805 table = get_table(title_block);
806 cell = adg_table_cell(table, "date");
807 adg_table_cell_set_text_value(cell, data->date);
808 return TRUE;
811 static gboolean
812 set_logo(AdgTitleBlock *title_block, AdgEntity *logo)
814 AdgTitleBlockPrivate *data;
815 AdgTable *table;
816 AdgTableCell *cell;
817 AdgPair from, to;
819 data = title_block->data;
821 if (logo == data->logo)
822 return FALSE;
824 data->logo = logo;
825 from.x = 0.5;
826 from.y = 0.5;
827 to.x = 0.5;
828 to.y = 0;
830 table = get_table(title_block);
831 cell = adg_table_cell(table, "logo");
832 adg_table_cell_set_value(cell, data->logo);
833 adg_table_cell_set_value_pos(cell, &from, &to);
835 return TRUE;
838 static gboolean
839 set_projection(AdgTitleBlock *title_block, AdgEntity *projection)
841 AdgTitleBlockPrivate *data;
842 AdgTable *table;
843 AdgTableCell *cell;
844 AdgPair center;
846 data = title_block->data;
848 if (projection == data->projection)
849 return FALSE;
851 data->projection = projection;
852 center.x = 0.5;
853 center.y = 0.5;
855 table = get_table(title_block);
856 cell = adg_table_cell(table, "projection");
857 adg_table_cell_set_value(cell, data->projection);
858 adg_table_cell_set_value_pos(cell, &center, &center);
860 return TRUE;