2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: FileCharacteristics.h /main/5 1995/11/01 16:07:48 rswiston $ */
25 /*******************************************************************************
27 This header file is included by FileCharacteristics.c
29 *******************************************************************************/
31 #ifndef _FILECHARACTERISTICS_H_INCLUDED
32 #define _FILECHARACTERISTICS_H_INCLUDED
37 #include <Xm/MwmUtil.h>
38 #include <Xm/DialogS.h>
39 #include <Xm/MenuShell.h>
42 #include <Xm/RowColumn.h>
44 #include <Xm/ToggleBG.h>
47 #include <Xm/PushBG.h>
50 /*******************************************************************************
51 The definition of the context structure:
52 If you create multiple copies of your interface, the context
53 structure ensures that your callbacks use the variables for the
56 For each swidget in the interface, each argument to the Interface
57 function, and each variable in the Interface Specific section of the
58 Declarations Editor, there is an entry in the context structure.
59 and a #define. The #define makes the variable name refer to the
60 corresponding entry in the context structure.
61 *******************************************************************************/
66 Widget UxFC_ClearButton;
67 Widget UxFC_CancelButton;
68 Widget UxFC_HelpButton;
69 Widget UxFC_MainLabel;
70 Widget UxFC_NamePatternLabel;
71 Widget UxFC_PermissionLabel;
72 Widget UxFC_PermissionToggle;
73 Widget UxFC_ContentsLabel;
74 Widget UxFC_ContentsBox;
75 Widget UxFC_TypeRowColumn;
76 Widget UxFC_StartByteLabel;
77 Widget UxFC_TypeLabel;
78 Widget UxFC_ContentsPatternLabel;
79 Widget UxFC_EndByteLabel;
80 Widget UxFC_ContentsToggle;
81 Widget UxFC_NameOrPathToggle;
83 } _UxCFileCharacteristics;
85 #ifdef CONTEXT_MACRO_ACCESS
86 static _UxCFileCharacteristics *UxFileCharacteristicsContext;
87 #define FC_OkButton UxFileCharacteristicsContext->UxFC_OkButton
88 #define FC_ClearButton UxFileCharacteristicsContext->UxFC_ClearButton
89 #define FC_CancelButton UxFileCharacteristicsContext->UxFC_CancelButton
90 #define FC_HelpButton UxFileCharacteristicsContext->UxFC_HelpButton
91 #define FC_MainLabel UxFileCharacteristicsContext->UxFC_MainLabel
92 #define FC_NamePatternLabel UxFileCharacteristicsContext->UxFC_NamePatternLabel
93 #define FC_PermissionLabel UxFileCharacteristicsContext->UxFC_PermissionLabel
94 #define FC_PermissionToggle UxFileCharacteristicsContext->UxFC_PermissionToggle
95 #define FC_ContentsLabel UxFileCharacteristicsContext->UxFC_ContentsLabel
96 #define FC_ContentsBox UxFileCharacteristicsContext->UxFC_ContentsBox
97 #define FC_TypeRowColumn UxFileCharacteristicsContext->UxFC_TypeRowColumn
98 #define FC_StartByteLabel UxFileCharacteristicsContext->UxFC_StartByteLabel
99 #define FC_TypeLabel UxFileCharacteristicsContext->UxFC_TypeLabel
100 #define FC_ContentsPatternLabel UxFileCharacteristicsContext->UxFC_ContentsPatternLabel
101 #define FC_EndByteLabel UxFileCharacteristicsContext->UxFC_EndByteLabel
102 #define FC_ContentsToggle UxFileCharacteristicsContext->UxFC_ContentsToggle
103 #define FC_NameOrPathToggle UxFileCharacteristicsContext->UxFC_NameOrPathToggle
104 #define UxParent UxFileCharacteristicsContext->UxUxParent
106 #endif /* CONTEXT_MACRO_ACCESS */
108 extern Widget FileCharacteristics;
109 extern Widget FC_PermissionText;
110 extern Widget FC_AndLabel2;
111 extern Widget FC_ContentsPatternText;
112 extern Widget FC_StringToggle;
113 extern Widget FC_ByteToggle;
114 extern Widget FC_ShortToggle;
115 extern Widget FC_LongToggle;
116 extern Widget FC_StartByteTextField;
117 extern Widget FC_EndByteTextField;
118 extern Widget FC_NameOrPathText;
119 extern Widget FC_AndLabel1;
122 /*******************************************************************************
123 Declarations of global functions.
124 *******************************************************************************/
128 Widget create_FileCharacteristics(swidget _UxUxParent);
129 void GetPermissionsPattern(char **ppszPermPattern);
130 void init_FileCharacteristics_dialog_fields(FiletypeData *pFtD);
131 void clear_FileCharacteristics_dialog_fields(void);
132 void ParseAndUpdateID(FiletypeData *pFtD);
133 Boolean FileCharCheckFields(void);
136 #endif /* _FILECHARACTERISTICS_H_INCLUDED */