1 #ifndef _UI_H_
2 #define _UI_H_
3 
4 #include "gstamp.h"
5 
6 #define GSTMP_BROWSE_SAVEAS 1
7 #define GSTMP_BROWSE_INFILE 2
8 #define GSTMP_BROWSE_OUTFILE 3
9 #define GSTMP_BROWSE_UPPERFONT 4
10 #define GSTMP_BROWSE_LOWERFONT 5
11 #define GSTMP_BROWSE_PREVIEW 6
12 #define GSTMP_BROWSE_LOAD 7
13 
14 
15 typedef struct {
16   GtkWidget *window;
17   GtkWidget *label;
18 } Yes_No_Dialog;
19 
20 typedef struct {
21   GtkWidget *window;
22   GtkWidget *label;
23   GtkWidget *button;
24 } Message_Dialog;
25 
26 
27 typedef struct {
28   GtkWidget *window;
29   GtkWidget *gtk_image;
30   GdkImage *gdk_image;
31   GtkStyle *style;
32   GdkColorContext *gcc;
33   GtkWidget *vbox;
34 
35 } Gstmp_Preview ;
36 
37 
38 
39 /* The UI Structure.  This is a big structure which represents key
40    elements in the UI.  Something is in here if and only if I need it
41    somewhere in the program.
42 */
43 typedef struct {
44 
45   gchar *RCFile;  /* filename for the rcfile */
46   char *Titlebase; /* the base for the window title */
47 
48   GtkWidget *Vbox;
49   GtkWidget *tooltips;
50   GtkWidget *notebook;
51   GtkWidget *Status; /* label for statusbar */
52 
53   GtkWidget *Previewfile ; /* Entry */
54   GtkWidget *Infile ; /* Entry */
55   GtkWidget *Outfile ; /* Entry */
56   GtkWidget *UpperString ; /* Entry */
57   GtkWidget *LowerString ; /* Entry */
58   GtkWidget *UpperFont; /* Entry */
59   GtkWidget *LowerFont; /* Entry */
60   GtkWidget *UStringExec ; /* checkbutton */
61   GtkWidget *LStringExec ;  /* checkbutton */
62   GtkWidget *Use3D ; /* checkbutton */
63   GtkWidget *Rotate ; /* checkbutton */
64 
65   /* FTP Related */
66   GtkWidget *Host ; /* entry */
67   GtkWidget *Path ; /* entry */
68   GtkWidget *Upload ; /* entry */
69   GtkWidget *Login ; /* entry */
70   GtkWidget *Passwd ; /* entry */
71 
72   /* colour stuff */
73   GtkWidget *ColorButton1; /* button */
74   GtkWidget *ColorButton2; /* button */
75   GtkWidget *UseColors ; /* checkbutton */
76   GtkWidget *ShadeRate ; /* h_scale */
77   GtkWidget *Quality ; /* h_scale */
78 
79   /* helper dialogs */
80   GtkWidget *ColorSel;     /* color selection dialog */
81   GtkWidget *filew;        /* file selection dialog */
82   Yes_No_Dialog *yesno;    /* my yes/no dialog  */
83   Gstmp_Preview *preview;
84   Message_Dialog *message;
85   GtkWidget *window;       /* the main application window (is this ever used? ) */
86 
87   /* main window icon info */
88   GdkPixmap *no_stamp;
89   GdkBitmap *no_stamp_mask;
90   GdkPixmap *yes_stamp;
91   GdkBitmap *yes_stamp_mask;
92   GdkPixmap *no_transfer;
93   GdkBitmap *no_transfer_mask;
94   GdkPixmap *yes_transfer;
95   GdkBitmap *yes_transfer_mask;
96 
97   GtkWidget *stamp_pix;
98   GtkWidget *transfer_pix;
99 
100   struct ArgStruct *args; /* stamp Argument structure */
101 
102   int GSTMP_FILE_VISIBLE;  /* Whether or not the File dialog is visible */
103   int GSTMP_FILE_BUTTON;   /* Which button the file dialog is working on */
104 
105   int GSTMP_COLOR_VISIBLE; /* Whether or not the Color dialog is visible */
106   int GSTMP_CURRENT_COLOR_BUTTON; /* Which button the Color dialog is working on */
107   int GSTMP_STAMPING;
108 
109 
110 } UI_Struct;
111 
112 UI_Struct *make_ui (struct ArgStruct *arg);
113 
114 #endif
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142 
143 
144 
145 
146