paralellized with OMP and MPI
[gpiv.git] / src / imgh_interface.c
blobc9e16c50a11940d01618305c9fad6f442844033c
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*----------------------------------------------------------------------
5 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
6 libraries.
8 Copyright (C) 2002, 2003, 2004 Gerber van der Graaf
10 This file is part of gpiv.
12 Gpiv is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
15 any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 ----------------------------------------------------------------------*/
29 * Image header interface
30 * $Log: imgh_interface.c,v $
31 * Revision 1.13 2007-11-23 16:24:07 gerber
32 * release 0.5.0: Kafka
34 * Revision 1.12 2007-06-06 17:00:48 gerber
35 * Retreives images/data from URI using Gnome Virtual File System.
37 * Revision 1.11 2007-03-22 16:00:32 gerber
38 * Added image processing tabulator
40 * Revision 1.10 2007-01-29 11:27:43 gerber
41 * added image formats png, gif, tif png, bmp, improved buffer display
43 * Revision 1.9 2006-09-18 07:27:06 gerber
44 * *** empty log message ***
46 * Revision 1.8 2006/01/31 14:28:12 gerber
47 * version 0.3.0
49 * Revision 1.6 2005/02/26 09:17:13 gerber
50 * structured of interrogate function by using gpiv_piv_isiadapt
52 * Revision 1.5 2005/01/19 15:53:42 gerber
53 * Initiation of Data Acquisition (DAC); trigerring of lasers and camera
54 * by using RTAI and Realtime Linux, recording images from IEEE1394
55 * (Firewire) IIDC compliant camera's
57 * Revision 1.4 2004/06/14 21:19:23 gerber
58 * Image depth up to 16 bits.
59 * Improvement "single int" and "drag int" in Eval tab.
60 * Viewer's pop-up menu.
61 * Adaption for gpiv_matrix_* and gpiv_vector_*.
62 * Resizing console.
63 * See Changelog for further info.
65 * Revision 1.3 2003/08/22 15:24:52 gerber
66 * interactive spatial scaling
68 * Revision 1.2 2003/07/25 15:40:23 gerber
69 * removed/disabled setting of correlation in Eval tab, Correlation type in Image info tab
71 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
72 * Imported gpiv
75 #ifdef HAVE_CONFIG_H
76 # include <config.h>
77 #endif
79 #include "gpiv_gui.h"
80 #include "imgh_interface.h"
81 #include "utils.h"
82 #include "console.h"
83 #include "imgh.h"
84 #include "pivpost.h"
88 Imgheader *
89 create_imgh (GnomeApp *main_window,
90 GtkWidget *container
92 /*-----------------------------------------------------------------------------
93 * Image Info window with data from header
96 GpivConsole *gpiv = gtk_object_get_data (GTK_OBJECT (main_window), "gpiv");
97 Imgheader *imgh = g_new0 (Imgheader, 1);
100 imgh->vbox_label = gtk_vbox_new (FALSE,
102 gtk_widget_ref (imgh->vbox_label);
103 gtk_object_set_data_full (GTK_OBJECT (main_window),
104 "imgh_vbox_label",
105 imgh->vbox_label,
106 (GtkDestroyNotify) gtk_widget_unref);
107 gtk_widget_show (imgh->vbox_label);
108 gtk_container_add (GTK_CONTAINER (container),
109 imgh->vbox_label);
113 imgh->label_title = gtk_label_new(_("Image information and settings"));
114 gtk_widget_ref(imgh->label_title);
115 gtk_object_set_data_full(GTK_OBJECT(main_window),
116 "imgh->label_title",
117 imgh->label_title,
118 (GtkDestroyNotify) gtk_widget_unref);
119 gtk_widget_show (imgh->label_title);
120 gtk_box_pack_start (GTK_BOX (imgh->vbox_label),
121 imgh->label_title,
122 FALSE,
123 FALSE,
129 * Scrolled window
131 imgh->vbox_scroll = gtk_vbox_new (FALSE,
133 gtk_widget_ref (imgh->vbox_scroll);
134 gtk_object_set_data_full (GTK_OBJECT (main_window),
135 "imgh_vbox_scroll",
136 imgh->vbox_scroll,
137 (GtkDestroyNotify) gtk_widget_unref);
138 gtk_widget_show (imgh->vbox_scroll);
139 gtk_box_pack_start (GTK_BOX (imgh->vbox_label),
140 imgh->vbox_scroll,
141 TRUE,
142 TRUE,
147 imgh->scrolledwindow = gtk_scrolled_window_new (NULL,
148 NULL);
149 gtk_widget_ref (imgh->scrolledwindow);
150 gtk_object_set_data_full (GTK_OBJECT (main_window),
151 "imgh_scrolledwindow",
152 imgh->scrolledwindow,
153 (GtkDestroyNotify) gtk_widget_unref);
154 gtk_widget_show (imgh->scrolledwindow);
155 gtk_box_pack_start (GTK_BOX (imgh->vbox_scroll),
156 imgh->scrolledwindow,
157 TRUE,
158 TRUE,
160 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW
161 (imgh->scrolledwindow),
162 GTK_POLICY_NEVER,
163 GTK_POLICY_AUTOMATIC);
167 imgh->viewport = gtk_viewport_new (NULL,
168 NULL);
169 gtk_widget_ref (imgh->viewport);
170 gtk_object_set_data_full (GTK_OBJECT (main_window),
171 "imgh_viewport",
172 imgh->viewport,
173 (GtkDestroyNotify) gtk_widget_unref);
174 gtk_widget_show (imgh->viewport);
175 gtk_container_add (GTK_CONTAINER (imgh->scrolledwindow),
176 imgh->viewport);
179 * main table for image header table/window
181 imgh->vbox1 = gtk_vbox_new (FALSE,
183 gtk_widget_ref (imgh->vbox1);
184 gtk_object_set_data_full (GTK_OBJECT (main_window),
185 "imgh->vbox1",
186 imgh->vbox1,
187 (GtkDestroyNotify) gtk_widget_unref);
188 gtk_widget_show (imgh->vbox1);
189 gtk_container_add (GTK_CONTAINER (imgh->viewport),
190 imgh->vbox1);
194 * buffer number
196 imgh->hbox_bufno = gtk_hbox_new (FALSE,
198 gtk_widget_ref (imgh->hbox_bufno);
199 gtk_object_set_data_full (GTK_OBJECT (main_window),
200 "imgh_hbox_bufno",
201 imgh->hbox_bufno,
202 (GtkDestroyNotify) gtk_widget_unref);
203 gtk_widget_show (imgh->hbox_bufno);
204 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
205 imgh->hbox_bufno,
206 TRUE,
207 TRUE,
212 imgh->label_label_bufno = gtk_label_new ( _("buffer #: "));
213 gtk_widget_ref (imgh->label_label_bufno);
214 gtk_object_set_data_full (GTK_OBJECT (main_window),
215 "imgh_label_label_bufno",
216 imgh->label_label_bufno,
217 (GtkDestroyNotify) gtk_widget_unref);
218 gtk_widget_show (imgh->label_label_bufno);
219 gtk_box_pack_start (GTK_BOX (imgh->hbox_bufno),
220 imgh->label_label_bufno,
221 FALSE,
222 FALSE,
227 imgh->label_bufno = gtk_label_new ("");
228 gtk_widget_ref (imgh->label_bufno);
229 gtk_object_set_data_full (GTK_OBJECT (main_window),
230 "imh_label_bufno",
231 imgh->label_bufno,
232 (GtkDestroyNotify) gtk_widget_unref);
233 gtk_widget_show (imgh->label_bufno);
234 gtk_box_pack_start (GTK_BOX (imgh->hbox_bufno),
235 imgh->label_bufno,
236 FALSE,
237 FALSE,
243 * buffer name
245 imgh->hbox_name = gtk_hbox_new (FALSE,
247 gtk_widget_ref (imgh->hbox_name);
248 gtk_object_set_data_full (GTK_OBJECT (main_window),
249 "imgh->hbox_name",
250 imgh->hbox_name,
251 (GtkDestroyNotify) gtk_widget_unref);
252 gtk_widget_show (imgh->hbox_name);
253 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
254 imgh->hbox_name,
255 TRUE,
256 TRUE,
261 imgh->label_label_name = gtk_label_new ( _("file: "));
262 gtk_widget_ref (imgh->label_label_name);
263 gtk_object_set_data_full (GTK_OBJECT (main_window),
264 "imgh_label_label_name",
265 imgh->label_label_name,
266 (GtkDestroyNotify) gtk_widget_unref);
267 gtk_widget_show (imgh->label_label_name);
268 gtk_box_pack_start (GTK_BOX (imgh->hbox_name),
269 imgh->label_label_name,
270 FALSE,
271 FALSE,
276 imgh->label_name = gtk_label_new ("");
277 gtk_widget_ref (imgh->label_name);
278 gtk_object_set_data_full (GTK_OBJECT (main_window),
279 "imgh_label_name",
280 imgh->label_name,
281 (GtkDestroyNotify) gtk_widget_unref);
282 gtk_widget_show (imgh->label_name);
283 gtk_box_pack_start (GTK_BOX (imgh->hbox_name),
284 imgh->label_name,
285 FALSE,
286 FALSE,
291 imgh->table5 = gtk_table_new (9,
293 FALSE);
294 gtk_widget_ref (imgh->table5);
295 gtk_object_set_data_full (GTK_OBJECT (main_window),
296 "imgh->table5",
297 imgh->table5,
298 (GtkDestroyNotify) gtk_widget_unref);
299 gtk_widget_show (imgh->table5);
300 gtk_box_pack_start (GTK_BOX (imgh->vbox1),
301 imgh->table5,
302 TRUE,
303 FALSE,
305 /* viewport_imgh */
308 * label for correlation
310 imgh->label_label_correlation = gtk_label_new ( _("correlation type: "));
311 gtk_widget_ref (imgh->label_label_correlation);
312 gtk_object_set_data_full (GTK_OBJECT (main_window),
313 "imgh_label_label_correlation",
314 imgh->label_label_correlation,
315 (GtkDestroyNotify) gtk_widget_unref);
316 gtk_widget_show (imgh->label_label_correlation);
317 gtk_table_attach (GTK_TABLE (imgh->table5),
318 imgh->label_label_correlation,
323 (GtkAttachOptions) (GTK_EXPAND),
324 (GtkAttachOptions) (0),
330 imgh->label_correlation = gtk_label_new (IMAGE_CORRELATION_LABEL);
331 gtk_widget_ref (imgh->label_correlation);
332 gtk_object_set_data_full (GTK_OBJECT (main_window),
333 "imgh_label_correlation",
334 imgh->label_correlation,
335 (GtkDestroyNotify) gtk_widget_unref);
336 gtk_widget_show (imgh->label_correlation);
337 gtk_table_attach (GTK_TABLE (imgh->table5),
338 imgh->label_correlation,
343 (GtkAttachOptions) (GTK_FILL),
344 (GtkAttachOptions) (0),
350 * label for ncols
352 imgh->label_label_ncols = gtk_label_new ( _("number of columns (pixels): "));
353 gtk_widget_ref (imgh->label_label_ncols);
354 gtk_object_set_data_full (GTK_OBJECT (main_window),
355 "imgh_label_label_ncols",
356 imgh->label_label_ncols,
357 (GtkDestroyNotify) gtk_widget_unref);
358 gtk_widget_show (imgh->label_label_ncols);
359 gtk_table_attach (GTK_TABLE (imgh->table5),
360 imgh->label_label_ncols,
365 (GtkAttachOptions) (GTK_EXPAND),
366 (GtkAttachOptions) (0),
372 imgh->label_ncols = gtk_label_new (IMAGE_WIDTH_LABEL);
373 gtk_widget_ref (imgh->label_ncols);
374 gtk_object_set_data_full (GTK_OBJECT (main_window),
375 "imgh_label_ncols",
376 imgh->label_ncols,
377 (GtkDestroyNotify) gtk_widget_unref);
378 gtk_widget_show (imgh->label_ncols);
379 gtk_table_attach (GTK_TABLE (imgh->table5),
380 imgh->label_ncols,
385 (GtkAttachOptions) (GTK_FILL),
386 (GtkAttachOptions) (0),
392 * label for nrows
394 imgh->label_label_nrows = gtk_label_new ( _("number of rows (pixels): "));
395 gtk_widget_ref (imgh->label_label_nrows);
396 gtk_object_set_data_full (GTK_OBJECT (main_window),
397 "imgh_label_label_nrows",
398 imgh->label_label_nrows,
399 (GtkDestroyNotify) gtk_widget_unref);
400 gtk_widget_show (imgh->label_label_nrows);
401 gtk_table_attach (GTK_TABLE (imgh->table5),
402 imgh->label_label_nrows,
407 (GtkAttachOptions) (GTK_FILL),
408 (GtkAttachOptions) (0),
414 imgh->label_nrows = gtk_label_new (IMAGE_HEIGHT_LABEL);
415 gtk_widget_ref (imgh->label_nrows);
416 gtk_object_set_data_full (GTK_OBJECT (main_window),
417 "imgh_label_nrows",
418 imgh->label_nrows,
419 (GtkDestroyNotify) gtk_widget_unref);
420 gtk_widget_show (imgh->label_nrows);
421 gtk_table_attach (GTK_TABLE (imgh->table5),
422 imgh->label_nrows,
427 (GtkAttachOptions) (GTK_FILL),
428 (GtkAttachOptions) (0),
436 * label for depth
438 imgh->label_label_depth = gtk_label_new ( _("image depth (bits): "));
439 gtk_widget_ref (imgh->label_label_depth);
440 gtk_object_set_data_full (GTK_OBJECT (main_window),
441 "imh_label_label_depth",
442 imgh->label_label_depth,
443 (GtkDestroyNotify) gtk_widget_unref);
444 gtk_widget_show (imgh->label_label_depth);
445 gtk_table_attach (GTK_TABLE (imgh->table5),
446 imgh->label_label_depth,
451 (GtkAttachOptions) (GTK_FILL),
452 (GtkAttachOptions) (0),
458 imgh->label_depth = gtk_label_new (IMAGE_DEPTH_LABEL);
459 gtk_widget_ref (imgh->label_depth);
460 gtk_object_set_data_full (GTK_OBJECT (main_window),
461 "imgh_label_depth",
462 imgh->label_depth,
463 (GtkDestroyNotify) gtk_widget_unref);
464 gtk_widget_show (imgh->label_depth);
465 gtk_table_attach (GTK_TABLE (imgh->table5),
466 imgh->label_depth,
471 (GtkAttachOptions) (GTK_FILL),
472 (GtkAttachOptions) (0),
480 * frame, table and spinners for spatial scale "sscale"
482 * radio buttons and spinners defining spatial scale interactively
483 * with pointer in image
485 imgh->frame_sscale = gtk_frame_new ( _("Define spatial scale"));
486 gtk_widget_ref (imgh->frame_sscale);
487 gtk_object_set_data_full (GTK_OBJECT (main_window),
488 "imgh_frame_sscale",
489 imgh->frame_sscale,
490 (GtkDestroyNotify) gtk_widget_unref);
491 gtk_widget_show (imgh->frame_sscale);
492 gtk_table_attach (GTK_TABLE (imgh->table5),
493 imgh->frame_sscale,
498 (GtkAttachOptions) (GTK_FILL),
499 (GtkAttachOptions) (0),
505 imgh->table_sscale = gtk_table_new (4,
507 FALSE);
508 gtk_widget_ref (imgh->table_sscale);
509 gtk_object_set_data_full (GTK_OBJECT (main_window),
510 "imgh_table_sscale",
511 imgh->table_sscale,
512 (GtkDestroyNotify) gtk_widget_unref);
513 gtk_widget_show (imgh->table_sscale);
514 gtk_container_add (GTK_CONTAINER (imgh->frame_sscale),
515 imgh->table_sscale);
520 imgh->vbox_sscale = gtk_vbox_new (FALSE,
522 gtk_widget_ref (imgh->vbox_sscale);
523 gtk_object_set_data_full (GTK_OBJECT (main_window),
524 "vbox_sscale",
525 imgh->vbox_sscale,
526 (GtkDestroyNotify) gtk_widget_unref);
527 gtk_widget_show (imgh->vbox_sscale);
528 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
529 imgh->vbox_sscale,
534 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
535 (GtkAttachOptions) 0,
540 imgh->radiobutton_mouse_1 =
541 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
542 _("None"));
543 gpiv->mouse_sel_group =
544 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_1));
545 gtk_widget_ref (imgh->radiobutton_mouse_1);
546 gtk_object_set_data_full (GTK_OBJECT (main_window),
547 "radiobutton_mouse_1",
548 imgh->radiobutton_mouse_1,
549 (GtkDestroyNotify) gtk_widget_unref);
550 gtk_widget_show (imgh->radiobutton_mouse_1);
551 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
552 imgh->radiobutton_mouse_1,
553 FALSE,
554 FALSE,
557 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_1),
558 "gpiv",
559 gpiv);
560 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_1),
561 "mouse_select",
562 "0" /* NO_MS */);
563 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
564 "enter",
565 G_CALLBACK (on_radiobutton_imgh_mouse_1_enter),
566 NULL);
567 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
568 "leave",
569 G_CALLBACK (on_widget_leave),
570 NULL);
571 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_1),
572 "toggled",
573 G_CALLBACK (on_radiobutton_imgh_mouse),
574 NULL);
578 imgh->radiobutton_mouse_2 =
579 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
580 _("Spanned length"));
581 gpiv->mouse_sel_group =
582 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_2));
583 gtk_widget_ref (imgh->radiobutton_mouse_2);
584 gtk_object_set_data_full (GTK_OBJECT (main_window),
585 "radiobutton_mouse_2",
586 imgh->radiobutton_mouse_2,
587 (GtkDestroyNotify) gtk_widget_unref);
588 gtk_widget_show (imgh->radiobutton_mouse_2);
589 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
590 imgh->radiobutton_mouse_2,
591 FALSE,
592 FALSE,
595 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_2),
596 "gpiv",
597 gpiv);
598 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_2),
599 "mouse_select",
600 "11" /* SPANLENGTH */);
601 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
602 "enter",
603 G_CALLBACK (on_radiobutton_imgh_mouse_2_enter),
604 NULL);
605 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
606 "leave",
607 G_CALLBACK (on_widget_leave),
608 NULL);
609 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_2),
610 "toggled",
611 G_CALLBACK (on_radiobutton_imgh_mouse),
612 NULL);
615 imgh->radiobutton_mouse_3 =
616 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
617 _("Vertical spanned length"));
618 gpiv->mouse_sel_group =
619 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_3));
620 gtk_widget_ref (imgh->radiobutton_mouse_3);
621 gtk_object_set_data_full (GTK_OBJECT (main_window),
622 "radiobutton_mouse_3",
623 imgh->radiobutton_mouse_3,
624 (GtkDestroyNotify) gtk_widget_unref);
625 gtk_widget_show (imgh->radiobutton_mouse_3);
626 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
627 imgh->radiobutton_mouse_3,
628 FALSE,
629 FALSE,
632 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_3),
633 "gpiv",
634 gpiv);
635 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_3),
636 "mouse_select",
637 "12" /* V_SPANLENGTH */);
638 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
639 "enter",
640 G_CALLBACK (on_radiobutton_imgh_mouse_3_enter),
641 NULL);
642 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
643 "leave",
644 G_CALLBACK (on_widget_leave),
645 NULL);
646 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_3),
647 "toggled",
648 G_CALLBACK (on_radiobutton_imgh_mouse),
649 NULL);
653 imgh->radiobutton_mouse_4 =
654 gtk_radio_button_new_with_label (gpiv->mouse_sel_group,
655 _("Horizontal spanned length"));
656 gpiv->mouse_sel_group =
657 gtk_radio_button_group (GTK_RADIO_BUTTON (imgh->radiobutton_mouse_4));
658 gtk_widget_ref (imgh->radiobutton_mouse_4);
659 gtk_object_set_data_full (GTK_OBJECT (main_window),
660 "radiobutton_mouse_4",
661 imgh->radiobutton_mouse_4,
662 (GtkDestroyNotify) gtk_widget_unref);
663 gtk_widget_show (imgh->radiobutton_mouse_4);
664 gtk_box_pack_start (GTK_BOX (imgh->vbox_sscale),
665 imgh->radiobutton_mouse_4,
666 FALSE,
667 FALSE,
670 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_4),
671 "gpiv",
672 gpiv);
673 gtk_object_set_data (GTK_OBJECT (imgh->radiobutton_mouse_4),
674 "mouse_select",
675 "13" /* H_SPANLENGTH */);
676 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
677 "enter",
678 G_CALLBACK (on_radiobutton_imgh_mouse_4_enter),
679 NULL);
680 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
681 "leave",
682 G_CALLBACK (on_widget_leave),
683 NULL);
684 g_signal_connect (GTK_OBJECT (imgh->radiobutton_mouse_4),
685 "toggled",
686 G_CALLBACK (on_radiobutton_imgh_mouse),
687 NULL);
692 imgh->label_sscale_px = gtk_label_new ( _("span (pixels): "));
693 gtk_widget_ref (imgh->label_sscale_px);
694 gtk_object_set_data_full (GTK_OBJECT (main_window),
695 "imgh_label_sscale_px",
696 imgh->label_sscale_px,
697 (GtkDestroyNotify) gtk_widget_unref);
698 gtk_widget_show (imgh->label_sscale_px);
699 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
700 imgh->label_sscale_px,
705 (GtkAttachOptions) (GTK_FILL),
706 (GtkAttachOptions) (0),
713 imgh->spinbutton_adj_sscale_px =
714 gtk_adjustment_new (gpiv_var->img_span_px,
716 IMAGE_WIDTH_MAX,
718 100,
719 IMAGE_WIDTH_MAX);
721 imgh->spinbutton_sscale_px =
722 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale_px),
725 gtk_widget_ref (imgh->spinbutton_sscale_px);
726 gtk_widget_show (imgh->spinbutton_sscale_px);
727 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
728 imgh->spinbutton_sscale_px,
733 (GtkAttachOptions) (GTK_FILL),
734 (GtkAttachOptions) (0),
737 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale_px),
738 TRUE);
739 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale_px),
740 TRUE);
742 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale_px),
743 "gpiv",
744 gpiv);
745 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale_px),
746 "changed",
747 G_CALLBACK (on_spinbutton_post_scale_px),
748 imgh->spinbutton_sscale_px);
752 imgh->label_sscale_mm = gtk_label_new ( _("length (mm): "));
753 gtk_widget_ref (imgh->label_sscale_mm);
754 gtk_object_set_data_full (GTK_OBJECT (main_window),
755 "imgh_label_sscale_mm",
756 imgh->label_sscale_mm,
757 (GtkDestroyNotify) gtk_widget_unref);
758 gtk_widget_show (imgh->label_sscale_mm);
759 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
760 imgh->label_sscale_mm,
765 (GtkAttachOptions) (GTK_FILL),
766 (GtkAttachOptions) (0),
773 imgh->spinbutton_adj_sscale_mm =
774 gtk_adjustment_new (gpiv_var->img_length_mm,
775 0.0001,
776 500.0,
777 ADJ_STEP,
778 10.0,
779 500.0);
781 imgh->spinbutton_sscale_mm =
782 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale_mm),
785 gtk_widget_ref (imgh->spinbutton_sscale_mm);
786 gtk_widget_show (imgh->spinbutton_sscale_mm);
787 gtk_table_attach (GTK_TABLE (imgh->table_sscale),
788 imgh->spinbutton_sscale_mm,
793 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
794 (GtkAttachOptions) (0),
797 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale_mm),
798 TRUE);
799 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale_mm),
800 TRUE);
802 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale_mm),
803 "gpiv",
804 gpiv);
805 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale_mm),
806 "changed",
807 G_CALLBACK (on_spinbutton_post_scale_mm),
808 imgh->spinbutton_sscale_mm);
813 * spinner for spatial scale "sscale"
815 imgh->label_sscale = gtk_label_new ( _("spatial scale (mm/pixels): "));
816 gtk_widget_ref (imgh->label_sscale);
817 gtk_object_set_data_full (GTK_OBJECT (main_window),
818 "imgh_label_sscale",
819 imgh->label_sscale,
820 (GtkDestroyNotify) gtk_widget_unref);
821 gtk_widget_show (imgh->label_sscale);
822 gtk_table_attach (GTK_TABLE (imgh->table5),
823 imgh->label_sscale,
828 (GtkAttachOptions) (GTK_FILL),
829 (GtkAttachOptions) (0),
836 imgh->spinbutton_adj_sscale =
837 gtk_adjustment_new (gl_image_par->s_scale,
839 ADJ_MAX,
840 ADJ_STEP,
841 ADJ_PAGE,
842 ADJ_MAX);
844 imgh->spinbutton_sscale =
845 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_sscale),
848 gtk_widget_ref (imgh->spinbutton_sscale);
849 gtk_widget_show (imgh->spinbutton_sscale);
850 gtk_table_attach (GTK_TABLE (imgh->table5),
851 imgh->spinbutton_sscale,
856 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
857 (GtkAttachOptions) (0),
860 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_sscale),
861 TRUE);
862 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_sscale),
863 TRUE);
865 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_sscale),
866 "var_type",
867 "3");
868 g_signal_connect (GTK_OBJECT (imgh->spinbutton_sscale),
869 "changed",
870 G_CALLBACK (on_spinbutton_post_scale),
871 imgh->spinbutton_sscale);
876 * spinner for time scale "tscale"
878 imgh->label_tscale = gtk_label_new ( _("time scale (ms): "));
879 gtk_widget_ref (imgh->label_tscale);
880 gtk_object_set_data_full (GTK_OBJECT (main_window),
881 "imgh_label_tscale",
882 imgh->label_tscale,
883 (GtkDestroyNotify) gtk_widget_unref);
884 gtk_widget_show (imgh->label_tscale);
885 gtk_table_attach (GTK_TABLE (imgh->table5),
886 imgh->label_tscale,
891 (GtkAttachOptions) (GTK_FILL),
892 (GtkAttachOptions) (0),
898 imgh->spinbutton_adj_tscale =
899 gtk_adjustment_new (gl_image_par->t_scale,
901 ADJ_MAX,
902 ADJ_STEP,
903 ADJ_PAGE,
904 ADJ_MAX);
908 imgh->spinbutton_tscale =
909 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_tscale),
912 gtk_widget_ref (imgh->spinbutton_tscale);
913 gtk_widget_show (imgh->spinbutton_tscale);
914 gtk_table_attach (GTK_TABLE (imgh->table5),
915 imgh->spinbutton_tscale,
920 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
921 (GtkAttachOptions) (0),
924 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_tscale),
925 TRUE);
926 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_tscale),
927 TRUE);
929 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_tscale),
930 "var_type",
931 "4");
932 g_signal_connect (GTK_OBJECT (imgh->spinbutton_tscale),
933 "changed",
934 G_CALLBACK (on_spinbutton_post_scale),
935 imgh->spinbutton_tscale);
939 imgh->table2 = gtk_table_new (16,
941 FALSE);
942 gtk_widget_ref (imgh->table2);
943 gtk_object_set_data_full (GTK_OBJECT (main_window),
944 "imgh->table2",
945 imgh->table2,
946 (GtkDestroyNotify) gtk_widget_unref);
947 gtk_widget_show (imgh->table2);
948 gtk_box_pack_end (GTK_BOX (imgh->vbox1),
949 imgh->table2,
950 TRUE,
951 FALSE,
955 * spinner for column position
957 imgh->label_colpos = gtk_label_new ( _("position of column #0 (m): "));
958 gtk_widget_ref (imgh->label_colpos);
959 gtk_object_set_data_full (GTK_OBJECT (main_window),
960 "imgh_label_colpos",
961 imgh->label_colpos,
962 (GtkDestroyNotify) gtk_widget_unref);
963 gtk_widget_show (imgh->label_colpos);
964 gtk_table_attach (GTK_TABLE (imgh->table5),
965 imgh->label_colpos,
970 (GtkAttachOptions) (GTK_FILL),
971 (GtkAttachOptions) (0),
978 imgh->spinbutton_adj_colpos =
979 gtk_adjustment_new (gl_image_par->z_off_x,
980 ADJ_MIN,
981 ADJ_MAX,
982 ADJ_STEP,
983 ADJ_PAGE,
984 ADJ_MAX);
988 imgh->spinbutton_colpos =
989 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_colpos),
992 gtk_widget_ref (imgh->spinbutton_colpos);
993 gtk_widget_show (imgh->spinbutton_colpos);
994 gtk_table_attach (GTK_TABLE (imgh->table5),
995 imgh->spinbutton_colpos,
1000 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1001 (GtkAttachOptions) (0),
1004 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_colpos),
1005 TRUE);
1006 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_colpos),
1007 TRUE);
1009 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_colpos),
1010 "var_type",
1011 "1");
1012 g_signal_connect (GTK_OBJECT (imgh->spinbutton_colpos),
1013 "changed",
1014 G_CALLBACK (on_spinbutton_post_scale),
1015 imgh->spinbutton_colpos);
1020 * spinner for row position
1022 imgh->label_rowpos = gtk_label_new ( _("position of row #0 (m): "));
1023 gtk_widget_ref (imgh->label_rowpos);
1024 gtk_object_set_data_full (GTK_OBJECT (main_window),
1025 "imgh_label_rowpos",
1026 imgh->label_rowpos,
1027 (GtkDestroyNotify) gtk_widget_unref);
1028 gtk_widget_show (imgh->label_rowpos);
1029 gtk_table_attach (GTK_TABLE (imgh->table5),
1030 imgh->label_rowpos,
1035 (GtkAttachOptions) (GTK_FILL),
1036 (GtkAttachOptions) (0),
1042 imgh->spinbutton_adj_rowpos =
1043 gtk_adjustment_new (gl_image_par->z_off_y,
1044 ADJ_MIN,
1045 ADJ_MAX,
1046 ADJ_STEP,
1047 ADJ_PAGE,
1048 ADJ_MAX);
1052 imgh->spinbutton_rowpos =
1053 gtk_spin_button_new (GTK_ADJUSTMENT (imgh->spinbutton_adj_rowpos),
1056 gtk_widget_ref (imgh->spinbutton_rowpos);
1057 gtk_widget_show (imgh->spinbutton_rowpos);
1058 gtk_table_attach (GTK_TABLE (imgh->table5),
1059 imgh->spinbutton_rowpos,
1064 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1065 (GtkAttachOptions) (0),
1068 gtk_entry_set_editable (GTK_ENTRY (imgh->spinbutton_rowpos),
1069 TRUE);
1070 gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (imgh->spinbutton_rowpos),
1071 TRUE);
1073 gtk_object_set_data (GTK_OBJECT (imgh->spinbutton_rowpos),
1074 "var_type",
1075 "2");
1076 g_signal_connect (GTK_OBJECT (imgh->spinbutton_rowpos),
1077 "changed",
1078 G_CALLBACK (on_spinbutton_post_scale),
1079 imgh->spinbutton_rowpos);
1084 * entry for project
1086 imgh->label_imgtitle = gtk_label_new ( _("Title: "));
1087 gtk_widget_ref (imgh->label_imgtitle);
1088 gtk_object_set_data_full (GTK_OBJECT (main_window),
1089 "imgh_label_imgtitle",
1090 imgh->label_imgtitle,
1091 (GtkDestroyNotify) gtk_widget_unref);
1092 gtk_widget_show (imgh->label_imgtitle);
1093 gtk_table_attach (GTK_TABLE (imgh->table2),
1094 imgh->label_imgtitle,
1099 (GtkAttachOptions) (GTK_FILL),
1100 (GtkAttachOptions) (0),
1103 gtk_misc_set_padding (GTK_MISC (imgh->label_imgtitle),
1109 imgh->entry_imgtitle = gtk_entry_new ();
1110 gtk_widget_ref (imgh->entry_imgtitle);
1111 gtk_object_set_data_full (GTK_OBJECT (main_window),
1112 "imgh_entry_imgtitle",
1113 imgh->entry_imgtitle,
1114 (GtkDestroyNotify) gtk_widget_unref);
1115 gtk_widget_show (imgh->entry_imgtitle);
1116 gtk_table_attach (GTK_TABLE (imgh->table2),
1117 imgh->entry_imgtitle,
1122 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1123 (GtkAttachOptions) (0),
1127 gtk_object_set_data (GTK_OBJECT (imgh->entry_imgtitle),
1128 "imgh",
1129 imgh);
1130 g_signal_connect (GTK_OBJECT (imgh->entry_imgtitle),
1131 "changed",
1132 G_CALLBACK (on_entry_imgh_title),
1133 imgh->entry_imgtitle);
1134 if (gl_image_par->title__set) {
1135 gtk_entry_set_text(GTK_ENTRY(imgh->entry_imgtitle),
1136 gl_image_par->title);
1140 * entry for creation date
1142 imgh->label_crdate = gtk_label_new ( _("Creation date: "));
1143 gtk_widget_ref (imgh->label_crdate);
1144 gtk_object_set_data_full (GTK_OBJECT (main_window),
1145 "imgh_label_crdate",
1146 imgh->label_crdate,
1147 (GtkDestroyNotify) gtk_widget_unref);
1148 gtk_widget_show (imgh->label_crdate);
1149 gtk_table_attach (GTK_TABLE (imgh->table2),
1150 imgh->label_crdate,
1155 (GtkAttachOptions) (GTK_FILL),
1156 (GtkAttachOptions) (0),
1159 gtk_misc_set_alignment (GTK_MISC (imgh->label_crdate),
1160 2.98023e-07,
1161 0.5);
1162 gtk_misc_set_padding (GTK_MISC (imgh->label_crdate),
1168 imgh->entry_crdate = gtk_entry_new ();
1169 gtk_widget_ref (imgh->entry_crdate);
1170 gtk_object_set_data_full (GTK_OBJECT (main_window),
1171 "imgh_entry_crdate",
1172 imgh->entry_crdate,
1173 (GtkDestroyNotify) gtk_widget_unref);
1174 gtk_widget_show (imgh->entry_crdate);
1175 gtk_table_attach (GTK_TABLE (imgh->table2),
1176 imgh->entry_crdate,
1181 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1182 (GtkAttachOptions) (0),
1186 gtk_object_set_data (GTK_OBJECT (imgh->entry_crdate),
1187 "imgh",
1188 imgh);
1189 g_signal_connect (GTK_OBJECT (imgh->entry_crdate),
1190 "changed",
1191 G_CALLBACK (on_entry_imgh_crdate),
1192 imgh->entry_crdate);
1193 if (gl_image_par->creation_date__set) {
1194 gtk_entry_set_text(GTK_ENTRY(imgh->entry_crdate),
1195 gl_image_par->creation_date);
1199 * entry for location
1201 imgh->label_location = gtk_label_new ( _("Place: "));
1202 gtk_widget_ref (imgh->label_location);
1203 gtk_object_set_data_full (GTK_OBJECT (main_window),
1204 "imgh_label_location",
1205 imgh->label_location,
1206 (GtkDestroyNotify) gtk_widget_unref);
1207 gtk_widget_show (imgh->label_location);
1208 gtk_table_attach (GTK_TABLE (imgh->table2),
1209 imgh->label_location,
1214 (GtkAttachOptions) (GTK_FILL),
1215 (GtkAttachOptions) (0),
1221 imgh->entry_location = gtk_entry_new ();
1222 gtk_widget_ref (imgh->entry_location);
1223 gtk_object_set_data_full (GTK_OBJECT (main_window),
1224 "imgh_entry_location",
1225 imgh->entry_location,
1226 (GtkDestroyNotify) gtk_widget_unref);
1227 gtk_widget_show (imgh->entry_location);
1228 gtk_table_attach (GTK_TABLE (imgh->table2),
1229 imgh->entry_location,
1234 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1235 (GtkAttachOptions) (0),
1239 gtk_object_set_data (GTK_OBJECT (imgh->entry_location),
1240 "imgh",
1241 imgh);
1242 g_signal_connect (GTK_OBJECT (imgh->entry_location),
1243 "changed",
1244 G_CALLBACK (on_entry_imgh_location),
1245 imgh->entry_location);
1246 if (gl_image_par->location__set) {
1247 gtk_entry_set_text(GTK_ENTRY(imgh->entry_location),
1248 gl_image_par->location);
1252 * entry for author
1254 imgh->label_author = gtk_label_new ( _("Author: "));
1255 gtk_widget_ref (imgh->label_author);
1256 gtk_object_set_data_full (GTK_OBJECT (main_window),
1257 "imgh_label_author",
1258 imgh->label_author,
1259 (GtkDestroyNotify) gtk_widget_unref);
1260 gtk_widget_show (imgh->label_author);
1261 gtk_table_attach (GTK_TABLE (imgh->table2),
1262 imgh->label_author,
1267 (GtkAttachOptions) (GTK_FILL),
1268 (GtkAttachOptions) (0),
1274 imgh->entry_author = gtk_entry_new ();
1275 gtk_widget_ref (imgh->entry_author);
1276 gtk_object_set_data_full (GTK_OBJECT (main_window),
1277 "imgh_entry_author",
1278 imgh->entry_author,
1279 (GtkDestroyNotify) gtk_widget_unref);
1280 gtk_widget_show (imgh->entry_author);
1281 gtk_table_attach (GTK_TABLE (imgh->table2),
1282 imgh->entry_author,
1287 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1288 (GtkAttachOptions) (0),
1292 gtk_object_set_data (GTK_OBJECT (imgh->entry_author),
1293 "imgh",
1294 imgh);
1295 g_signal_connect (GTK_OBJECT (imgh->entry_author),
1296 "changed",
1297 G_CALLBACK (on_entry_imgh_author),
1298 imgh->entry_author);
1299 if (gl_image_par->author__set) {
1300 gtk_entry_set_text(GTK_ENTRY(imgh->entry_author),
1301 gl_image_par->author);
1305 * entry for software
1307 imgh->label_software = gtk_label_new ( _("Software: "));
1308 gtk_widget_ref (imgh->label_software);
1309 gtk_object_set_data_full (GTK_OBJECT (main_window),
1310 "imgh_label_software",
1311 imgh->label_software,
1312 (GtkDestroyNotify) gtk_widget_unref);
1313 gtk_widget_show (imgh->label_software);
1314 gtk_table_attach (GTK_TABLE (imgh->table2),
1315 imgh->label_software,
1320 (GtkAttachOptions) (GTK_FILL),
1321 (GtkAttachOptions) (0),
1327 imgh->entry_software = gtk_entry_new ();
1328 gtk_widget_ref (imgh->entry_software);
1329 gtk_object_set_data_full (GTK_OBJECT (main_window),
1330 "imgh_entry_software",
1331 imgh->entry_software,
1332 (GtkDestroyNotify) gtk_widget_unref);
1333 gtk_widget_show (imgh->entry_software);
1334 gtk_table_attach (GTK_TABLE (imgh->table2),
1335 imgh->entry_software,
1340 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1341 (GtkAttachOptions) (0),
1345 gtk_object_set_data (GTK_OBJECT (imgh->entry_software),
1346 "imgh",
1347 imgh);
1348 g_signal_connect (GTK_OBJECT (imgh->entry_software),
1349 "changed",
1350 G_CALLBACK (on_entry_imgh_software),
1351 imgh->entry_software);
1352 if (gl_image_par->software__set) {
1353 gtk_entry_set_text(GTK_ENTRY(imgh->entry_software),
1354 gl_image_par->software);
1358 * entry for source
1360 imgh->label_source = gtk_label_new ( _("Source: "));
1361 gtk_widget_ref (imgh->label_source);
1362 gtk_object_set_data_full (GTK_OBJECT (main_window),
1363 "imgh_label_source",
1364 imgh->label_source,
1365 (GtkDestroyNotify) gtk_widget_unref);
1366 gtk_widget_show (imgh->label_source);
1367 gtk_table_attach (GTK_TABLE (imgh->table2),
1368 imgh->label_source,
1373 (GtkAttachOptions) (GTK_FILL),
1374 (GtkAttachOptions) (0),
1380 imgh->entry_source = gtk_entry_new ();
1381 gtk_widget_ref (imgh->entry_source);
1382 gtk_object_set_data_full (GTK_OBJECT (main_window),
1383 "imgh_entry_source",
1384 imgh->entry_source,
1385 (GtkDestroyNotify) gtk_widget_unref);
1386 gtk_widget_show (imgh->entry_source);
1387 gtk_table_attach (GTK_TABLE (imgh->table2),
1388 imgh->entry_source,
1393 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1394 (GtkAttachOptions) (0),
1398 gtk_object_set_data (GTK_OBJECT (imgh->entry_source),
1399 "imgh",
1400 imgh);
1401 g_signal_connect (GTK_OBJECT (imgh->entry_source),
1402 "changed",
1403 G_CALLBACK (on_entry_imgh_source),
1404 imgh->entry_source);
1405 if (gl_image_par->source__set) {
1406 gtk_entry_set_text(GTK_ENTRY(imgh->entry_source),
1407 gl_image_par->source);
1411 * entry for usertext
1413 imgh->label_usertext = gtk_label_new ( _("Usertext: "));
1414 gtk_widget_ref (imgh->label_usertext);
1415 gtk_object_set_data_full (GTK_OBJECT (main_window),
1416 "imgh_label_usertext",
1417 imgh->label_usertext,
1418 (GtkDestroyNotify) gtk_widget_unref);
1419 gtk_widget_show (imgh->label_usertext);
1420 gtk_table_attach (GTK_TABLE (imgh->table2),
1421 imgh->label_usertext,
1426 (GtkAttachOptions) (GTK_FILL),
1427 (GtkAttachOptions) (0),
1433 imgh->entry_usertext = gtk_entry_new ();
1434 gtk_widget_ref (imgh->entry_usertext);
1435 gtk_object_set_data_full (GTK_OBJECT (main_window),
1436 "imgh_entry_usertext",
1437 imgh->entry_usertext,
1438 (GtkDestroyNotify) gtk_widget_unref);
1439 gtk_widget_show (imgh->entry_usertext);
1440 gtk_table_attach (GTK_TABLE (imgh->table2),
1441 imgh->entry_usertext,
1446 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1447 (GtkAttachOptions) (0),
1451 gtk_object_set_data (GTK_OBJECT (imgh->entry_usertext),
1452 "imgh",
1453 imgh);
1454 g_signal_connect (GTK_OBJECT (imgh->entry_usertext),
1455 "changed",
1456 G_CALLBACK (on_entry_imgh_usertext),
1457 imgh->entry_usertext);
1458 if (gl_image_par->usertext__set) {
1459 gtk_entry_set_text(GTK_ENTRY(imgh->entry_usertext),
1460 gl_image_par->usertext);
1464 * entry for warning
1466 imgh->label_warning = gtk_label_new ( _("Warning: "));
1467 gtk_widget_ref (imgh->label_warning);
1468 gtk_object_set_data_full (GTK_OBJECT (main_window),
1469 "imgh_label_warning",
1470 imgh->label_warning,
1471 (GtkDestroyNotify) gtk_widget_unref);
1472 gtk_widget_show (imgh->label_warning);
1473 gtk_table_attach (GTK_TABLE (imgh->table2),
1474 imgh->label_warning,
1479 (GtkAttachOptions) (GTK_FILL),
1480 (GtkAttachOptions) (0),
1486 imgh->entry_warning = gtk_entry_new ();
1487 gtk_widget_ref (imgh->entry_warning);
1488 gtk_object_set_data_full (GTK_OBJECT (main_window),
1489 "imgh_entry_warning",
1490 imgh->entry_warning,
1491 (GtkDestroyNotify) gtk_widget_unref);
1492 gtk_widget_show (imgh->entry_warning);
1493 gtk_table_attach (GTK_TABLE (imgh->table2),
1494 imgh->entry_warning,
1499 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1500 (GtkAttachOptions) (0),
1504 gtk_object_set_data (GTK_OBJECT (imgh->entry_warning),
1505 "imgh",
1506 imgh);
1507 g_signal_connect (GTK_OBJECT (imgh->entry_warning),
1508 "changed",
1509 G_CALLBACK (on_entry_imgh_warning),
1510 imgh->entry_warning);
1511 if (gl_image_par->warning__set) {
1512 gtk_entry_set_text(GTK_ENTRY(imgh->entry_warning),
1513 gl_image_par->warning);
1517 * entry for disclaimer
1519 imgh->label_disclaimer = gtk_label_new ( _("Disclaimer: "));
1520 gtk_widget_ref (imgh->label_disclaimer);
1521 gtk_object_set_data_full (GTK_OBJECT (main_window),
1522 "imgh_label_disclaimer",
1523 imgh->label_disclaimer,
1524 (GtkDestroyNotify) gtk_widget_unref);
1525 gtk_widget_show (imgh->label_disclaimer);
1526 gtk_table_attach (GTK_TABLE (imgh->table2),
1527 imgh->label_disclaimer,
1532 (GtkAttachOptions) (GTK_FILL),
1533 (GtkAttachOptions) (0),
1539 imgh->entry_disclaimer = gtk_entry_new ();
1540 gtk_widget_ref (imgh->entry_disclaimer);
1541 gtk_object_set_data_full (GTK_OBJECT (main_window),
1542 "imgh_entry_disclaimer",
1543 imgh->entry_disclaimer,
1544 (GtkDestroyNotify) gtk_widget_unref);
1545 gtk_widget_show (imgh->entry_disclaimer);
1546 gtk_table_attach (GTK_TABLE (imgh->table2),
1547 imgh->entry_disclaimer,
1552 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1553 (GtkAttachOptions) (0),
1557 gtk_object_set_data (GTK_OBJECT (imgh->entry_disclaimer),
1558 "imgh",
1559 imgh);
1560 g_signal_connect (GTK_OBJECT (imgh->entry_disclaimer),
1561 "changed",
1562 G_CALLBACK (on_entry_imgh_disclaimer),
1563 imgh->entry_disclaimer);
1564 if (gl_image_par->disclaimer__set) {
1565 gtk_entry_set_text(GTK_ENTRY(imgh->entry_disclaimer),
1566 gl_image_par->disclaimer);
1570 * entry for comment
1572 imgh->label_comment = gtk_label_new ( _("Comment: "));
1573 gtk_widget_ref (imgh->label_comment);
1574 gtk_object_set_data_full (GTK_OBJECT (main_window),
1575 "imgh_label_comment",
1576 imgh->label_comment,
1577 (GtkDestroyNotify) gtk_widget_unref);
1578 gtk_widget_show (imgh->label_comment);
1579 gtk_table_attach (GTK_TABLE (imgh->table2),
1580 imgh->label_comment,
1585 (GtkAttachOptions) (GTK_FILL),
1586 (GtkAttachOptions) (0),
1592 imgh->entry_comment = gtk_entry_new ();
1593 gtk_widget_ref (imgh->entry_comment);
1594 gtk_object_set_data_full (GTK_OBJECT (main_window),
1595 "imgh_entry_comment",
1596 imgh->entry_comment,
1597 (GtkDestroyNotify) gtk_widget_unref);
1598 gtk_widget_show (imgh->entry_comment);
1599 gtk_table_attach (GTK_TABLE (imgh->table2),
1600 imgh->entry_comment,
1605 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1606 (GtkAttachOptions) (0),
1610 gtk_object_set_data (GTK_OBJECT (imgh->entry_comment),
1611 "imgh",
1612 imgh);
1613 g_signal_connect (GTK_OBJECT (imgh->entry_comment),
1614 "changed",
1615 G_CALLBACK (on_entry_imgh_comment),
1616 imgh->entry_comment);
1617 if (gl_image_par->comment__set) {
1618 gtk_entry_set_text(GTK_ENTRY(imgh->entry_comment),
1619 gl_image_par->comment);
1623 * entry for copyright
1625 imgh->label_copyright = gtk_label_new ( _("Copyright: "));
1626 gtk_widget_ref (imgh->label_copyright);
1627 gtk_object_set_data_full (GTK_OBJECT (main_window),
1628 "imgh_label_copyright",
1629 imgh->label_copyright,
1630 (GtkDestroyNotify) gtk_widget_unref);
1631 gtk_widget_show (imgh->label_copyright);
1632 gtk_table_attach (GTK_TABLE (imgh->table2),
1633 imgh->label_copyright,
1636 11,
1638 (GtkAttachOptions) (GTK_FILL),
1639 (GtkAttachOptions) (0),
1645 imgh->entry_copyright = gtk_entry_new ();
1646 gtk_widget_ref (imgh->entry_copyright);
1647 gtk_object_set_data_full (GTK_OBJECT (main_window),
1648 "imgh_entry_copyright",
1649 imgh->entry_copyright,
1650 (GtkDestroyNotify) gtk_widget_unref);
1651 gtk_widget_show (imgh->entry_copyright);
1652 gtk_table_attach (GTK_TABLE (imgh->table2),
1653 imgh->entry_copyright,
1656 11,
1658 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1659 (GtkAttachOptions) (0),
1663 gtk_object_set_data (GTK_OBJECT (imgh->entry_copyright),
1664 "imgh",
1665 imgh);
1666 g_signal_connect (GTK_OBJECT (imgh->entry_copyright),
1667 "changed",
1668 G_CALLBACK (on_entry_imgh_copyright),
1669 imgh->entry_copyright);
1670 if (gl_image_par->copyright__set) {
1671 gtk_entry_set_text(GTK_ENTRY(imgh->entry_copyright),
1672 gl_image_par->copyright);
1676 * entry for email
1678 imgh->label_email = gtk_label_new ( _("Email: "));
1679 gtk_widget_ref (imgh->label_email);
1680 gtk_object_set_data_full (GTK_OBJECT (main_window),
1681 "imgh_label_email",
1682 imgh->label_email,
1683 (GtkDestroyNotify) gtk_widget_unref);
1684 gtk_widget_show (imgh->label_email);
1685 gtk_table_attach (GTK_TABLE (imgh->table2),
1686 imgh->label_email,
1689 13,
1691 (GtkAttachOptions) (GTK_FILL),
1692 (GtkAttachOptions) (0),
1698 imgh->entry_email = gtk_entry_new ();
1699 gtk_widget_ref (imgh->entry_email);
1700 gtk_object_set_data_full (GTK_OBJECT (main_window),
1701 "imgh_entry_email",
1702 imgh->entry_email,
1703 (GtkDestroyNotify) gtk_widget_unref);
1704 gtk_widget_show (imgh->entry_email);
1705 gtk_table_attach (GTK_TABLE (imgh->table2),
1706 imgh->entry_email,
1709 13,
1711 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1712 (GtkAttachOptions) (0),
1716 gtk_object_set_data (GTK_OBJECT (imgh->entry_email),
1717 "imgh",
1718 imgh);
1719 g_signal_connect (GTK_OBJECT (imgh->entry_email),
1720 "changed",
1721 G_CALLBACK (on_entry_imgh_email),
1722 imgh->entry_email);
1723 if (gl_image_par->email__set) {
1724 gtk_entry_set_text(GTK_ENTRY(imgh->entry_email),
1725 gl_image_par->email);
1729 * entry for url
1731 imgh->label_url = gtk_label_new ( _("Url: "));
1732 gtk_widget_ref (imgh->label_url);
1733 gtk_object_set_data_full (GTK_OBJECT (main_window),
1734 "imgh_label_url",
1735 imgh->label_url,
1736 (GtkDestroyNotify) gtk_widget_unref);
1737 gtk_widget_show (imgh->label_url);
1738 gtk_table_attach (GTK_TABLE (imgh->table2),
1739 imgh->label_url,
1742 15,
1744 (GtkAttachOptions) (GTK_FILL),
1745 (GtkAttachOptions) (0),
1751 imgh->entry_url = gtk_entry_new ();
1752 gtk_widget_ref (imgh->entry_url);
1753 gtk_object_set_data_full (GTK_OBJECT (main_window),
1754 "imgh_entry_url",
1755 imgh->entry_url,
1756 (GtkDestroyNotify) gtk_widget_unref);
1757 gtk_widget_show (imgh->entry_url);
1758 gtk_table_attach (GTK_TABLE (imgh->table2),
1759 imgh->entry_url,
1762 15,
1764 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
1765 (GtkAttachOptions) (0),
1769 gtk_object_set_data (GTK_OBJECT (imgh->entry_url),
1770 "imgh",
1771 imgh);
1772 g_signal_connect (GTK_OBJECT (imgh->entry_url),
1773 "changed",
1774 G_CALLBACK (on_entry_imgh_url),
1775 imgh->entry_url);
1776 if (gl_image_par->url__set) {
1777 gtk_entry_set_text(GTK_ENTRY(imgh->entry_url),
1778 gl_image_par->url);
1781 return imgh;