dtcm: Resolve CID 87562
[oweals/cde.git] / cde / programs / dtcm / dtcm / props_pu.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $TOG: props_pu.h /main/8 1999/05/07 14:12:09 jff $ */
24 /*
25  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
26  *  (c) Copyright 1993, 1994 International Business Machines Corp.
27  *  (c) Copyright 1993, 1994 Novell, Inc.
28  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
29  */
30
31 #ifndef _PROPS_PU_H
32 #define _PROPS_PU_H
33
34 #include "ansi_c.h"
35 #include "dssw.h"
36 #include "props.h"
37 #include "reminders.h"
38
39 /* Array indices for group access toggle items. */
40 #define GAP_VIEW        0
41 #define GAP_INSERT      1
42 #define GAP_CHANGE      2
43
44 /*******************************************************************************
45 **
46 **  Bit Masks for determining redisplay behavior.
47 **
48 *******************************************************************************/
49
50 #define PROPS_REDO_DISPLAY      0x1 /* This is all displays.  The main 
51                                        canvas, the appointment and todo 
52                                        lists, and the multi-browse window. */
53 #define PROPS_REDO_EDITORS      0x2 /* This is the todo and appointment 
54                                        editor. */
55 #define PROPS_REDO_PRINT_DIALOG 0x4 /* The print dialog. */
56
57 /*******************************************************************************
58 **
59 **  Supporting typedefs
60 **
61 *******************************************************************************/
62 typedef enum {
63         EDITOR_PANE,
64         DISPLAY_PANE,
65         GROUP_ACCESS_PANE,
66         PRINTER_OPS_PANE,
67         DATE_FORMAT_PANE
68 } PaneType;
69
70 /*******************************************************************************
71 **
72 **  The Props Pop Up Structure
73 **
74 *******************************************************************************/
75 typedef struct {
76         Widget          ok_button;
77         Widget          apply_button;
78         Widget          base_form_mgr;
79         Calendar        *cal;
80         Widget          category_menu;
81         Boolean         changed_flag;
82         Widget          close_button;
83         Pixmap          contract_pixmap;        /* 16x16-contract buttons */
84         Widget          defaults_button;
85         Pixmap          expand_pixmap;          /* 16x16-expand buttons */
86         Widget          frame;
87         Widget          help_button;
88         PaneType        last_props_pane;
89         Widget          *pane_list;
90         Pixmap          postup_pixmap;          /* 64x128-reminder image */
91         Widget          separator1;
92         Widget          separator2;
93         Pixmap          xm_error_pixmap;        /* 20x20-motif error */
94         Pixmap          xm_info_pixmap;         /* 11x24-motif information */
95         Pixmap          xm_question_pixmap;     /* 22x22-motif question */
96         Pixmap          xm_warning_pixmap;      /* 9x22-motif warning */
97
98         /*
99          * These are temporary - until problem with resource file is worked out
100          */
101         Pixmap          appt_button_xbm;
102         Pixmap          todo_button_xbm;
103         Pixmap          year_button_xbm;
104         Pixmap          month_button_xbm;
105         Pixmap          week_button_xbm;
106         Pixmap          day_button_xbm;
107         Pixmap          drag_icon_xbm;
108
109         /***********************************************************************
110         **
111         **  Editor pane widgets
112         **
113         ***********************************************************************/
114         Widget          ep_appt_label;
115         DSSW            ep_dssw;
116         Widget          ep_dur_cb;
117         Widget          ep_dur_label;
118         Widget          ep_dur_message;
119         Reminders       ep_reminders;
120         Widget          privacy_label;
121         Widget          privacy_menu;
122
123         /***********************************************************************
124         **
125         **  Display pane widgets
126         **
127         ***********************************************************************/
128         Widget          dp_beg_label;
129         Widget          dp_beg_scale;
130         Widget          dp_beg_value;
131         Widget          dp_day_label;
132         Widget          dp_end_label;
133         Widget          dp_end_scale;
134         Widget          dp_end_value;
135         Widget          dp_hour12_toggle;
136         Widget          dp_hour24_toggle;
137         Widget          dp_hour_label;
138         Widget          dp_hour_rc_mgr;
139         Widget          dp_init_view_label;
140         Widget          dp_init_view_text;
141         Widget          dp_loc_label;
142         Widget          dp_loc_text;
143         Widget          dp_view_label;
144         Widget          dp_view_rc_mgr;
145         Widget          dp_view_day_toggle;
146         Widget          dp_view_month_toggle;
147         Widget          dp_view_week_toggle;
148         Widget          dp_view_year_toggle;
149
150         /***********************************************************************
151         **
152         **  Group Access pane widgets
153         **
154         ***********************************************************************/
155         Widget          gap_access_header;
156         Widget          gap_access_list;
157         Widget          gap_access_list_sw;
158         Widget          gap_access_msg;
159         Widget          gap_add_button;
160         Widget          gap_browse_toggle;
161         Widget          gap_delete_toggle;
162         Widget          gap_insert_toggle;
163         CSA_access_list gap_list;
164         Widget          gap_perm_label;
165         Widget          gap_perm_rc_mgr;
166         Widget          gap_remove_button;
167         Widget          gap_user_label;
168         Widget          gap_user_text;
169         Boolean         v4_gap_pending_message_up;
170
171         Widget          gap2_user_label;
172         Widget          gap2_access_label;
173         Widget          gap2_permissions_label;
174         Widget          gap2_user_text;
175         Widget          gap2_button_form;
176         Widget          gap2_add_button;
177         Widget          gap2_delete_button;
178         Widget          gap2_change_button;
179         Widget          gap2_access_list;
180         Widget          gap2_perm_form;
181         Widget          gap2_public_label;
182         Widget          gap2_semi_label;
183         Widget          gap2_private_label;
184         Widget          gap2_view_label;
185         Widget          gap2_insert_label;
186         Widget          gap2_change_label;
187         Widget          gap2_public_tog[3];
188         Widget          gap2_semi_tog[3];
189         Widget          gap2_private_tog[3];
190         Boolean         v5_gap_pending_message_up;
191
192         /***********************************************************************
193         **
194         **  Printer Ops pane widgets
195         **
196         ***********************************************************************/
197         Widget          pop_margin_frame;
198         Widget          pop_left_text;
199         Widget          pop_top_text;
200         Widget          pop_right_text;
201         Widget          pop_bottom_text;
202         Widget          pop_header_frame;
203         Widget          pop_tl_option;
204         Widget          pop_tr_option;
205         Widget          pop_bl_option;
206         Widget          pop_br_option;
207         Widget          pop_privacy_label;
208         Widget          pop_privacy_private_toggle;
209         Widget          pop_privacy_public_toggle;
210         Widget          pop_privacy_rc_mgr;
211         Widget          pop_privacy_semi_toggle;
212
213         /***********************************************************************
214         **
215         **  Date Format pane widgets
216         **
217         ***********************************************************************/
218         Widget          dfp_order_ddmmyy_toggle;
219         Widget          dfp_order_label;
220         Widget          dfp_order_mmddyy_toggle;
221         Widget          dfp_order_rc_mgr;
222         Widget          dfp_order_yymmdd_toggle;
223         Widget          dfp_sep_blank_toggle;
224         Widget          dfp_sep_dash_toggle;
225         Widget          dfp_sep_label;
226         Widget          dfp_sep_period_toggle;
227         Widget          dfp_sep_rc_mgr;
228         Widget          dfp_sep_slash_toggle;
229 } Props_pu;
230
231 /* Enum for Print Option header/footer specifications. */
232 enum
233 {
234   POP_HDR_DATE,
235   POP_HDR_USER_ID,
236   POP_HDR_PAGE_NUMBER,
237   POP_HDR_REPORT_TYPE,
238   POP_HDR_NONE,
239   POP_HDR_NUM_CHOICES    /* MUST BE LAST */
240 };
241
242 /*******************************************************************************
243 **
244 **  External function declarations
245 **
246 *******************************************************************************/
247 extern void     create_all_pixmaps      P((Props_pu*, Widget));
248 extern Boolean  get_date_vals_from_ui   P((Props_pu*, Props*));
249 extern Boolean  get_display_vals_from_ui P((Props_pu*, Props*));
250 extern Boolean  get_editor_vals_from_ui P((Props_pu*, Props*));
251 extern Boolean  get_gap_vals_from_ui    P((Props_pu*, Props*));
252 extern Boolean  get_printer_vals_from_ui P((Props_pu*, Props*));
253 extern Boolean  get_props_from_ui       P((Props_pu*, Props*, int*));
254 extern void     set_date_vals_on_ui     P((Props_pu*, Props*));
255 extern void     set_display_vals_on_ui  P((Props_pu*, Props*));
256 extern void     set_editor_vals_on_ui   P((Props_pu*, Props*));
257 extern void     set_gap_vals_on_ui      P((Props_pu*, Props*));
258 extern void     set_printer_vals_on_ui  P((Props_pu*, Props*));
259 extern void     set_props_on_ui         P((Props_pu*, Props*));
260 extern void     set_props_pu_defaults   P((Props_pu*, Props*));
261 extern void     show_props_pu           P((Calendar*));
262 extern void     props_pu_clean_up       P((Props_pu*));
263 extern Boolean  props_pu_showing        P((Props_pu*));
264 extern Boolean  p_flush_changes         P((Calendar*));
265 extern void     show_print_props_pu     P((Calendar*));
266
267 extern void p_defaults_proc_helper(XtPointer client_data);
268
269 #endif