Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcreate / FileCharacteristics.h
1 /* $XConsortium: FileCharacteristics.h /main/5 1995/11/01 16:07:48 rswiston $ */
2
3 /*******************************************************************************
4        FileCharacteristics.h
5        This header file is included by FileCharacteristics.c
6
7 *******************************************************************************/
8
9 #ifndef _FILECHARACTERISTICS_H_INCLUDED
10 #define _FILECHARACTERISTICS_H_INCLUDED
11
12
13 #include <stdio.h>
14 #include <Xm/Xm.h>
15 #include <Xm/MwmUtil.h>
16 #include <Xm/DialogS.h>
17 #include <Xm/MenuShell.h>
18 #include "UxXt.h"
19
20 #include <Xm/RowColumn.h>
21 #include <Xm/Form.h>
22 #include <Xm/ToggleBG.h>
23 #include <Xm/TextF.h>
24 #include <Xm/Label.h>
25 #include <Xm/PushBG.h>
26 #include <Xm/Form.h>
27
28 /*******************************************************************************
29        The definition of the context structure:
30        If you create multiple copies of your interface, the context
31        structure ensures that your callbacks use the variables for the
32        correct copy.
33
34        For each swidget in the interface, each argument to the Interface
35        function, and each variable in the Interface Specific section of the
36        Declarations Editor, there is an entry in the context structure.
37        and a #define.  The #define makes the variable name refer to the
38        corresponding entry in the context structure.
39 *******************************************************************************/
40 #if 0
41 typedef struct
42 {
43         Widget  UxFC_OkButton;
44         Widget  UxFC_ClearButton;
45         Widget  UxFC_CancelButton;
46         Widget  UxFC_HelpButton;
47         Widget  UxFC_MainLabel;
48         Widget  UxFC_NamePatternLabel;
49         Widget  UxFC_PermissionLabel;
50         Widget  UxFC_PermissionToggle;
51         Widget  UxFC_ContentsLabel;
52         Widget  UxFC_ContentsBox;
53         Widget  UxFC_TypeRowColumn;
54         Widget  UxFC_StartByteLabel;
55         Widget  UxFC_TypeLabel;
56         Widget  UxFC_ContentsPatternLabel;
57         Widget  UxFC_EndByteLabel;
58         Widget  UxFC_ContentsToggle;
59         Widget  UxFC_NameOrPathToggle;
60         swidget UxUxParent;
61 } _UxCFileCharacteristics;
62
63 #ifdef CONTEXT_MACRO_ACCESS
64 static _UxCFileCharacteristics *UxFileCharacteristicsContext;
65 #define FC_OkButton             UxFileCharacteristicsContext->UxFC_OkButton
66 #define FC_ClearButton          UxFileCharacteristicsContext->UxFC_ClearButton
67 #define FC_CancelButton         UxFileCharacteristicsContext->UxFC_CancelButton
68 #define FC_HelpButton           UxFileCharacteristicsContext->UxFC_HelpButton
69 #define FC_MainLabel            UxFileCharacteristicsContext->UxFC_MainLabel
70 #define FC_NamePatternLabel     UxFileCharacteristicsContext->UxFC_NamePatternLabel
71 #define FC_PermissionLabel      UxFileCharacteristicsContext->UxFC_PermissionLabel
72 #define FC_PermissionToggle     UxFileCharacteristicsContext->UxFC_PermissionToggle
73 #define FC_ContentsLabel        UxFileCharacteristicsContext->UxFC_ContentsLabel
74 #define FC_ContentsBox          UxFileCharacteristicsContext->UxFC_ContentsBox
75 #define FC_TypeRowColumn        UxFileCharacteristicsContext->UxFC_TypeRowColumn
76 #define FC_StartByteLabel       UxFileCharacteristicsContext->UxFC_StartByteLabel
77 #define FC_TypeLabel            UxFileCharacteristicsContext->UxFC_TypeLabel
78 #define FC_ContentsPatternLabel UxFileCharacteristicsContext->UxFC_ContentsPatternLabel
79 #define FC_EndByteLabel         UxFileCharacteristicsContext->UxFC_EndByteLabel
80 #define FC_ContentsToggle       UxFileCharacteristicsContext->UxFC_ContentsToggle
81 #define FC_NameOrPathToggle     UxFileCharacteristicsContext->UxFC_NameOrPathToggle
82 #define UxParent                UxFileCharacteristicsContext->UxUxParent
83
84 #endif /* CONTEXT_MACRO_ACCESS */
85
86 extern Widget   FileCharacteristics;
87 extern Widget   FC_PermissionText;
88 extern Widget   FC_AndLabel2;
89 extern Widget   FC_ContentsPatternText;
90 extern Widget   FC_StringToggle;
91 extern Widget   FC_ByteToggle;
92 extern Widget   FC_ShortToggle;
93 extern Widget   FC_LongToggle;
94 extern Widget   FC_StartByteTextField;
95 extern Widget   FC_EndByteTextField;
96 extern Widget   FC_NameOrPathText;
97 extern Widget   FC_AndLabel1;
98 #endif
99
100 /*******************************************************************************
101        Declarations of global functions.
102 *******************************************************************************/
103
104
105
106 Widget  create_FileCharacteristics(swidget _UxUxParent);
107 void    GetPermissionsPattern(char **ppszPermPattern);
108 void    init_FileCharacteristics_dialog_fields(FiletypeData *pFtD);
109 void    clear_FileCharacteristics_dialog_fields(void);
110 void    ParseAndUpdateID(FiletypeData *pFtD);
111 Boolean FileCharCheckFields(void);
112
113
114 #endif  /* _FILECHARACTERISTICS_H_INCLUDED */