~ubuntu-branches/debian/sid/acfax/sid

« back to all changes in this revision

Viewing changes to widgets.h

  • Committer: Bazaar Package Importer
  • Author(s): Hamish Moffatt
  • Date: 2001-12-27 12:07:46 UTC
  • Revision ID: james.westby@ubuntu.com-20011227120746-iz2p5k757bcla8ov
Tags: upstream-981011
ImportĀ upstreamĀ versionĀ 981011

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    ACfax - Fax reception with X11-interface for amateur radio
 
3
    Copyright (C) 1995-1998 Andreas Czechanowski, DL4SDC
 
4
 
 
5
    This program is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation; either version 2 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software Foundation,
 
17
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 
 
19
    andreas.czechanowski@ins.uni-stuttgart.de
 
20
*/
 
21
    
 
22
/*
 
23
 * widgets.h - structure definitions for widgets.c
 
24
 */
 
25
 
 
26
#include <X11/Intrinsic.h>
 
27
 
 
28
/*
 
29
 * these structures are for grouping widgets together and not having
 
30
 * too many global widget-variables. Most states are remembered by the
 
31
 * status of the appropriate widget. For numeric values, or multi-state
 
32
 * widgets, integer variables have been added.
 
33
 */
 
34
 
 
35
struct modem_ws {
 
36
  Widget
 
37
    form,       /* form widget containining... : */
 
38
    modemdesc,  /* label "modem settings" */
 
39
    modinfo,    /* label "modulation type" */
 
40
    mmode,      /* toggle (AM/FM) */
 
41
    filinfo,    /* label "filter select" */
 
42
    mfilter,    /* command (narrow/middle/wide filter) */
 
43
    mflpd,      /* simpleMenu containing... : */
 
44
    mflt1,      /* smeBSB: narrow filter */
 
45
    mflt2,      /* smeBSB: middle filter */
 
46
    mflt3,      /* smeBSB: wide filter */
 
47
    fmdevinfo,  /* label "deviation (+/- Hz)" */
 
48
    fmdevval,   /* asciiText (entry of deviation value) */
 
49
    siginfo,    /* label "Signal" */
 
50
    sigbar;     /* scrollbar showing current input signal level */
 
51
  int
 
52
    c_filter,   /* currently selected filter (see mod_demod.h) */
 
53
    c_devi;     /* currently selected deviation (for FM) */
 
54
};
 
55
 
 
56
struct runctl_ws {
 
57
  Widget
 
58
    form,       /* form widget containining... : */
 
59
    runinfo,    /* label "operation control" */
 
60
    rmstop,     /* toggle (stop) */
 
61
    rmsyn,      /* toggle (sync) */
 
62
    rmrun;      /* toggle (run) */
 
63
};
 
64
 
 
65
struct dirctl_ws {
 
66
  Widget
 
67
    form,       /* form widget containining... : */
 
68
    dirinfo,    /* label "direction control" */
 
69
    dirhv,      /* toggle (hor/vert) */
 
70
    dirlr,      /* toggle (right/left) */
 
71
    dirtb;      /* toggle (bottom/top) */
 
72
};
 
73
 
 
74
struct polctl_ws {
 
75
  Widget
 
76
    form,       /* form widget containining... : */
 
77
    polinfo,    /* label "image polarity" */
 
78
    norinv,     /* toggle (normal/invers) */
 
79
    phsinfo,    /* label "phase polarity" */
 
80
    posneg;     /* toggle (pos/neg phase) */
 
81
};
 
82
 
 
83
struct adjctl_ws {
 
84
  Widget
 
85
    form,       /* form widget containining... : */
 
86
    adjinfo,    /* label "image adjust" */
 
87
    lshift,     /* command (shift image) */
 
88
    azimut;     /* command (azimut correction) */
 
89
};
 
90
 
 
91
struct numval_ws {
 
92
  Widget
 
93
    form,       /* form widget containining... : */
 
94
    numinfo,    /* label "numeric parameters" */
 
95
    lpmtxt,     /* label "lpm" */
 
96
    lpmval,     /* asciiText (lpm entry) */
 
97
    ioctxt,     /* label "IOC" */
 
98
    iocval,     /* asciiText (IOC entry) */
 
99
    statxt,     /* label "APT start" */
 
100
    staval,     /* asciiText (APT start entry) */
 
101
    stotxt,     /* label "APT stop" */
 
102
    stoval;     /* asciiText (APT stop entry) */
 
103
  int
 
104
    c_lpm,
 
105
    c_ioc,
 
106
    c_aptsta,
 
107
    c_aptstp;
 
108
};
 
109
 
 
110
struct info_popup {
 
111
  Widget
 
112
    shell,      /* popup-shell for displaying auxiliary information */
 
113
    form,       /* form widget containing... : */
 
114
    text,       /* asciiText, displaying message */
 
115
    butn;       /* button for Ok/cancel/dismiss etc */
 
116
};
 
117
 
 
118
struct file_menu {
 
119
  Widget
 
120
    butn,       /* menuButton opening... : */
 
121
    menu,       /* simpleMenu containing... : */
 
122
    saveas,     /* smeBSB "save-as" */
 
123
    close,      /* smeBSB "close" */
 
124
    autosave,   /* smeBSB "save (auto-filename)" */
 
125
    quit;       /* smeBSB "quit ACfax" */
 
126
};
 
127
 
 
128
struct fileshell_args {
 
129
  char *title;          /* title of shell to be poped up */
 
130
  char *dir_io;         /* directory input/output */
 
131
  char *filename;       /* filename_return */
 
132
  void (*file_act)(char *);     /* function accepting name as argument */
 
133
};
 
134
 
 
135
struct file_browser {
 
136
  Widget
 
137
    shell,      /* popup-shell for the file-browser */
 
138
    form,       /* form widget containing... : */
 
139
    fchs,       /* XfwfFileChooserWidget */
 
140
    okbut,      /* command "Ok" */
 
141
    cancel,     /* command "cancel" */
 
142
    fname;      /* asciiText for file-/directory name entry */
 
143
  char
 
144
    name[256];  /* name of file being selected */
 
145
  struct fileshell_args
 
146
    *fsarg;     /* file-shell arguments passed from application */
 
147
};
 
148
 
 
149
extern Widget
 
150
        /* form, */
 
151
        fax_shell,
 
152
        fax_form,
 
153
        disp_form,
 
154
        vport,
 
155
        canvas;
 
156
 
 
157
extern Pixmap
 
158
        px_horiz,
 
159
        px_vert,
 
160
        px_right,
 
161
        px_left,
 
162
        px_top,
 
163
        px_bottom,
 
164
        px_normal,
 
165
        px_invers,
 
166
        px_nphs,
 
167
        px_iphs,
 
168
        px_azimut,
 
169
        px_shift,
 
170
        px_stop,
 
171
        px_syn,
 
172
        px_run,
 
173
        px_mam,
 
174
        px_mfm,
 
175
        px_narrow,
 
176
        px_middle,
 
177
        px_wide;
 
178
 
 
179
extern struct modem_ws          mod_s;
 
180
extern struct runctl_ws         run_s;
 
181
extern struct dirctl_ws         dir_s;
 
182
extern struct polctl_ws         pol_s;
 
183
extern struct adjctl_ws         adj_s;
 
184
extern struct numval_ws         num_s;
 
185
extern struct file_menu         file_m;
 
186
extern struct info_popup        info_s;
 
187
 
 
188
Widget  cr_modemform(Widget);   /* creates mod_s */
 
189
Widget  cr_faxctls(Widget);     /* creates run_s, dir_s, pol_s, adj_s */
 
190
Widget  cr_faxparams(Widget);   /* creates num_s */
 
191
Widget  cr_menubar(Widget);     /* creates menu with pulldown-menus */
 
192
Widget  cr_infopop(Widget);     /* creates info_s */
 
193
void    query_filename(struct fileshell_args *);
 
194
void    create_widgets(Widget);
 
195
void    simple_info(char *);
 
196
void    create_pixmaps(Widget);
 
197
void    set_sigdisplay(double);