CreateActionAppShell.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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 libraries 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. /* $XConsortium: CreateActionAppShell.h /main/4 1995/11/01 16:06:24 rswiston $ */
  24. /******************************************************************************
  25. CreateActionAppShell.h
  26. This header file is included by CreateActionAppShell.c
  27. *******************************************************************************/
  28. #ifndef _CREATEACTIONAPPSHELL_H_INCLUDED
  29. #define _CREATEACTIONAPPSHELL_H_INCLUDED
  30. #include <stdio.h>
  31. #include <Xm/Xm.h>
  32. #include <Xm/MwmUtil.h>
  33. #include <Xm/MenuShell.h>
  34. #include "UxXt.h"
  35. #include "dtcreate.h"
  36. #include <Xm/Text.h>
  37. #include <Xm/ToggleBG.h>
  38. #include <Xm/List.h>
  39. #include <Xm/ScrolledW.h>
  40. #include <Xm/Text.h>
  41. #include <Xm/PushBG.h>
  42. #include <Xm/TextF.h>
  43. #include <Xm/Label.h>
  44. #include <Xm/Form.h>
  45. #include <Xm/CascadeB.h>
  46. #include <Xm/ToggleB.h>
  47. #include <Xm/Separator.h>
  48. #include <Xm/PushB.h>
  49. #include <Xm/RowColumn.h>
  50. #include <Xm/MainW.h>
  51. #include <X11/Shell.h>
  52. /*******************************************************************************
  53. The definition of the context structure:
  54. If you create multiple copies of your interface, the context
  55. structure ensures that your callbacks use the variables for the
  56. correct copy.
  57. For each swidget in the interface, each argument to the Interface
  58. function, and each variable in the Interface Specific section of the
  59. Declarations Editor, there is an entry in the context structure.
  60. and a #define. The #define makes the variable name refer to the
  61. corresponding entry in the context structure.
  62. *******************************************************************************/
  63. typedef struct
  64. {
  65. Widget UxCreateActionMainWindow;
  66. Widget UxCA_MenuBar;
  67. Widget UxCA_MB_FileOption;
  68. Widget UxCA_MB_FileNew;
  69. Widget UxCA_MB_FileOpen;
  70. Widget UxCA_MB_FileSave;
  71. Widget UxCA_MB_Sep;
  72. Widget UxCA_MB_FileExit;
  73. Widget UxCA_MB_FileTop;
  74. Widget UxCA_MB_HelpOption;
  75. Widget UxCA_MB_HelpOverview;
  76. Widget UxCA_MB_HelpTOC;
  77. Widget UxCA_MB_HelpTasks;
  78. Widget UxCA_MB_HelpReference;
  79. Widget UxCA_MB_HelpUsing;
  80. Widget UxCA_MB_HelpAbout;
  81. Widget UxCA_MB_HelpTop;
  82. Widget UxCA_MB_OptionsOption;
  83. Widget UxCA_MB_OptionTop;
  84. Widget UxCA_Form;
  85. Widget UxCA_ActionNameLabel;
  86. Widget UxCA_ActionIconLabel;
  87. Widget UxCA_ActionIconForm;
  88. Widget UxCA_EditIcon_button;
  89. Widget UxCA_FindSet_button;
  90. Widget Uxseparator1;
  91. Widget UxCA_DblClkLabel;
  92. Widget UxCA_HlpTxtLabel;
  93. Widget UxCA_XprtOptionLabel;
  94. Widget UxCA_XprtSep2;
  95. Widget UxCA_ActionOpenLabel;
  96. Widget UxCA_XprtSep1;
  97. Widget UxCA_FiletypesLabel;
  98. Widget Uxform1;
  99. Widget UxCA_DroppableFiletypesLabel;
  100. Widget UxCA_DroppableFiletypesRowColumn;
  101. Widget UxrowColumn1;
  102. Widget UxCA_FiletypesAdd;
  103. Widget UxCA_FiletypesDelete;
  104. Widget UxCA_FiletypesEdit;
  105. Widget UxCA_FiletypesWindow;
  106. Widget UxCA_WindowTypeLabel;
  107. swidget UxUxParent;
  108. } _UxCCreateActionAppShell;
  109. #ifdef CONTEXT_MACRO_ACCESS
  110. static _UxCCreateActionAppShell *UxCreateActionAppShellContext;
  111. #define CreateActionMainWindow UxCreateActionAppShellContext->UxCreateActionMainWindow
  112. #define CA_MenuBar UxCreateActionAppShellContext->UxCA_MenuBar
  113. #define CA_MB_FileOption UxCreateActionAppShellContext->UxCA_MB_FileOption
  114. #define CA_MB_FileNew UxCreateActionAppShellContext->UxCA_MB_FileNew
  115. #define CA_MB_FileOpen UxCreateActionAppShellContext->UxCA_MB_FileOpen
  116. #define CA_MB_FileSave UxCreateActionAppShellContext->UxCA_MB_FileSave
  117. #define CA_MB_Sep UxCreateActionAppShellContext->UxCA_MB_Sep
  118. #define CA_MB_FileExit UxCreateActionAppShellContext->UxCA_MB_FileExit
  119. #define CA_MB_FileTop UxCreateActionAppShellContext->UxCA_MB_FileTop
  120. #define CA_MB_HelpOption UxCreateActionAppShellContext->UxCA_MB_HelpOption
  121. #define CA_MB_HelpOverview UxCreateActionAppShellContext->UxCA_MB_HelpOverview
  122. #define CA_MB_HelpTOC UxCreateActionAppShellContext->UxCA_MB_HelpTOC
  123. #define CA_MB_HelpTasks UxCreateActionAppShellContext->UxCA_MB_HelpTasks
  124. #define CA_MB_HelpReference UxCreateActionAppShellContext->UxCA_MB_HelpReference
  125. #define CA_MB_HelpUsing UxCreateActionAppShellContext->UxCA_MB_HelpUsing
  126. #define CA_MB_HelpAbout UxCreateActionAppShellContext->UxCA_MB_HelpAbout
  127. #define CA_MB_HelpTop UxCreateActionAppShellContext->UxCA_MB_HelpTop
  128. #define CA_MB_OptionsOption UxCreateActionAppShellContext->UxCA_MB_OptionsOption
  129. #define CA_MB_OptionTop UxCreateActionAppShellContext->UxCA_MB_OptionTop
  130. #define CA_Form UxCreateActionAppShellContext->UxCA_Form
  131. #define CA_ActionNameLabel UxCreateActionAppShellContext->UxCA_ActionNameLabel
  132. #define CA_ActionIconLabel UxCreateActionAppShellContext->UxCA_ActionIconLabel
  133. #define CA_ActionIconForm UxCreateActionAppShellContext->UxCA_ActionIconForm
  134. #define CA_EditIcon_button UxCreateActionAppShellContext->UxCA_EditIcon_button
  135. #define CA_FindSet_button UxCreateActionAppShellContext->UxCA_FindSet_button
  136. #define separator1 UxCreateActionAppShellContext->Uxseparator1
  137. #define CA_DblClkLabel UxCreateActionAppShellContext->UxCA_DblClkLabel
  138. #define CA_HlpTxtLabel UxCreateActionAppShellContext->UxCA_HlpTxtLabel
  139. #define CA_XprtOptionLabel UxCreateActionAppShellContext->UxCA_XprtOptionLabel
  140. #define CA_XprtSep2 UxCreateActionAppShellContext->UxCA_XprtSep2
  141. #define CA_ActionOpenLabel UxCreateActionAppShellContext->UxCA_ActionOpenLabel
  142. #define CA_XprtSep1 UxCreateActionAppShellContext->UxCA_XprtSep1
  143. #define CA_FiletypesLabel UxCreateActionAppShellContext->UxCA_FiletypesLabel
  144. #define form1 UxCreateActionAppShellContext->Uxform1
  145. #define CA_DroppableFiletypesLabel UxCreateActionAppShellContext->UxCA_DroppableFiletypesLabel
  146. #define CA_DroppableFiletypesRowColumn UxCreateActionAppShellContext->UxCA_DroppableFiletypesRowColumn
  147. #define rowColumn1 UxCreateActionAppShellContext->UxrowColumn1
  148. #define CA_FiletypesAdd UxCreateActionAppShellContext->UxCA_FiletypesAdd
  149. #define CA_FiletypesDelete UxCreateActionAppShellContext->UxCA_FiletypesDelete
  150. #define CA_FiletypesEdit UxCreateActionAppShellContext->UxCA_FiletypesEdit
  151. #define CA_FiletypesWindow UxCreateActionAppShellContext->UxCA_FiletypesWindow
  152. #define CA_WindowTypeLabel UxCreateActionAppShellContext->UxCA_WindowTypeLabel
  153. #define UxParent UxCreateActionAppShellContext->UxUxParent
  154. #endif /* CONTEXT_MACRO_ACCESS */
  155. /***************************************************************************/
  156. /* */
  157. /* Swidget Macro Definitions */
  158. /* */
  159. /***************************************************************************/
  160. #define CREATE_ACTION_SWID (CreateActionAppShell)
  161. #define ACTION_NAME_SWID (CA_ActionNameTextField)
  162. #define DBL_CLK_CMND_SWID (CA_DblClkText)
  163. #define ACTION_HELP_TXT_SWID (CA_HelpText)
  164. #define HELP_TXT_WINDOW_SWID (CA_HelpTextWindow)
  165. #define FILETYPES_FOR_ACTION_SWID (CA_FiletypesList)
  166. #define ACTION_OPENS_TEXT_SWID (CA_XprtActionOpenText)
  167. #define XWIN_TOGGLE_SWID (CA_WinTypeX)
  168. #define AUTOCLOSE_TOGGLE_SWID (CA_WinTypeAutoClose)
  169. #define MANUALCLOSE_TOGGLE_SWID (CA_WinTypeManualClose)
  170. #define LRG_ICON_BUTTON_SWID (CA_LRG_IconButton)
  171. #define MED_ICON_BUTTON_SWID (CA_MED_IconButton)
  172. #define SML_ICON_BUTTON_SWID (CA_SML_IconButton)
  173. #define TINY_ICON_BUTTON_SWID (CA_TINY_IconButton)
  174. #define LRG_ICON_GADGET_SWID (CA_LRG_IconGadget)
  175. #define MED_ICON_GADGET_SWID (CA_MED_IconGadget)
  176. #define SML_ICON_GADGET_SWID (CA_SML_IconGadget)
  177. #define TINY_ICON_GADGET_SWID (CA_TINY_IconGadget)
  178. #define XPRT_OPTION_FORM_SWID (XprtOptionFrom)
  179. #define EXPERT_OPTIONS_TOGGLE_BUTTON_SWID (ExpertOption)
  180. #define OPEN_FILE_SWID (OpenFile)
  181. #define FILE_CHARACTERISTICS_SWID (FileCharacteristics)
  182. #define WINDOW_TYPE_SWID (CA_WindowType)
  183. #define COLOR_MONO_OPTION_SWID (ColorMonoOption)
  184. /***************************************************************************/
  185. /* */
  186. /* Widget Macro Definitions */
  187. /* */
  188. /***************************************************************************/
  189. #define CREATE_ACTION (UxGetWidget(CREATE_ACTION_SWID))
  190. #define ACTION_NAME (UxGetWidget(ACTION_NAME_SWID))
  191. #define DBL_CLK_CMND (UxGetWidget(DBL_CLK_CMND_SWID))
  192. #define ACTION_HELP_TXT (UxGetWidget(ACTION_HELP_TXT_SWID))
  193. #define HELP_TXT_WINDOW (UxGetWidget(HELP_TXT_WINDOW_SWID))
  194. #define FILETYPES_FOR_ACTION (UxGetWidget(FILETYPES_FOR_ACTION_SWID))
  195. #define ACTION_OPENS_TEXT (UxGetWidget(ACTION_OPENS_TEXT_SWID))
  196. #define XWIN_TOGGLE (UxGetWidget(XWIN_TOGGLE_SWID))
  197. #define AUTOCLOSE_TOGGLE (UxGetWidget(AUTOCLOSE_TOGGLE_SWID))
  198. #define MANUALCLOSE_TOGGLE (UxGetWidget(MANUALCLOSE_TOGGLE_SWID))
  199. #define CA_LRG_ICON_BUTTON (UxGetWidget(LRG_ICON_BUTTON_SWID))
  200. #define CA_MED_ICON_BUTTON (UxGetWidget(MED_ICON_BUTTON_SWID))
  201. #define CA_SML_ICON_BUTTON (UxGetWidget(SML_ICON_BUTTON_SWID))
  202. #define CA_TINY_ICON_BUTTON (UxGetWidget(TINY_ICON_BUTTON_SWID ))
  203. #define CA_LRG_ICON_GADGET (UxGetWidget(LRG_ICON_GADGET_SWID))
  204. #define CA_MED_ICON_GADGET (UxGetWidget(MED_ICON_GADGET_SWID))
  205. #define CA_SML_ICON_GADGET (UxGetWidget(SML_ICON_GADGET_SWID))
  206. #define CA_TINY_ICON_GADGET (UxGetWidget(TINY_ICON_GADGET_SWID ))
  207. #define EXPERT_OPTIONS_TOGGLE_BUTTON (UxGetWidget(EXPERT_OPTIONS_TOGGLE_BUTTON_SWID))
  208. #define XPRT_OPTION_FORM (UxGetWidget(XPRT_OPTION_FORM_SWID))
  209. #define CA_OPEN_FILE (UxGetWidget(OPEN_FILE_SWID))
  210. #define FILE_CHARACTERISTICS (UxGetWidget(FILE_CHARACTERISTICS_SWID))
  211. #define WINDOW_TYPE (UxGetWidget(WINDOW_TYPE_SWID))
  212. #define COLOR_MONO_OPTION (UxGetWidget(COLOR_MONO_OPTION_SWID))
  213. /***************************************************************************/
  214. /* */
  215. /* Structure Access Macros */
  216. /* */
  217. /***************************************************************************/
  218. #define CA_ActionName(ad_struct) (((ActionData *)(ad_struct))->pszName)
  219. #define CA_DblClkAction(ad_struct) (((ActionData *)(ad_struct))->pszCmd)
  220. #define CA_ActionHelpText(ad_struct) (((ActionData *)(ad_struct))->pszHelp)
  221. #define CA_Filetypes(ad_struct) (((ActionData *)(ad_struct))->papFiletypes)
  222. #define CA_FiletypesCount(ad_struct) (((ActionData *)(ad_struct))->cFiletypes)
  223. #define CA_FiletypesForActionList(ad_struct,l) (((ActionData *)(ad_struct))[l]->pszName)
  224. #define CA_ActionOpensText(ad_struct) (((ActionData *)(ad_struct))->pszPrompt)
  225. #define CA_WindowTypeSetting(ad_struct) (((ActionData *)(ad_struct))->fsFlags)
  226. #define CA_Icon(ad_struct) (((ActionData *)(ad_struct))->pszIcon)
  227. #define CA_XprtMode(ad_struct) (((ActionData *)(ad_struct))->)
  228. /*****************************************************************************/
  229. /* Function Declarations */
  230. /*****************************************************************************/
  231. Widget create_applicationShell1(swidget);
  232. void activateCB_CA_MB_FileSave(Widget, XtPointer, XtPointer);
  233. #endif /* _CREATEACTIONAPPSHELL_H_INCLUDED */