AddFiletype.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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: AddFiletype.h /main/5 1995/11/01 16:05:05 rswiston $ */
  24. /*******************************************************************************
  25. AddFiletype.h
  26. This header file is included by AddFiletype.c
  27. *******************************************************************************/
  28. #ifndef _ADDFILETYPE_H_INCLUDED
  29. #define _ADDFILETYPE_H_INCLUDED
  30. #include <stdio.h>
  31. #include <Xm/Xm.h>
  32. #include <Xm/MwmUtil.h>
  33. #include <Xm/DialogS.h>
  34. #include <Xm/MenuShell.h>
  35. #include <Xm/Separator.h>
  36. #include <Xm/Text.h>
  37. #include <Xm/ScrolledW.h>
  38. #include <Xm/PushB.h>
  39. #include <Xm/Form.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 "UxXt.h"
  46. /*******************************************************************************
  47. The definition of the context structure:
  48. If you create multiple copies of your interface, the context
  49. structure ensures that your callbacks use the variables for the
  50. correct copy.
  51. For each swidget in the interface, each argument to the Interface
  52. function, and each variable in the Interface Specific section of the
  53. Declarations Editor, there is an entry in the context structure.
  54. and a #define. The #define makes the variable name refer to the
  55. corresponding entry in the context structure.
  56. *******************************************************************************/
  57. typedef struct
  58. {
  59. Widget UxAddFiletype;
  60. Widget UxAF_FiletypeFamilyNameLabel;
  61. Widget UxAF_OkButton;
  62. Widget UxAF_ApplyButton;
  63. Widget UxAF_CancelButton;
  64. Widget UxAF_HelpButton;
  65. Widget UxAF_IdCharacteristicsText;
  66. Widget UxAF_FiletypeIconHelpLabel;
  67. Widget UxAF_IdCharacteristicsEdit;
  68. Widget UxAF_FiletypePrintCmdLabel;
  69. Widget UxAF_OpenFiletypeCmdLabel;
  70. Widget UxAF_CommandsLabel;
  71. Widget UxAF_FiletypeIconForm;
  72. Widget UxAF_MED_IconGadget;
  73. Widget UxAF_TINY_IconGadget;
  74. Widget UxAF_FiletypeIconsEditButton;
  75. Widget UxAF_FiletypeIconFindSetButton;
  76. Widget UxAF_FiletypeIconsBoxLabel;
  77. Widget UxAF_FiletypeHelpScrolledWindow;
  78. Widget UxAF_separator2;
  79. Widget UxAF_separator1;
  80. Widget UxAF_IdCharacteristicsLabel;
  81. swidget UxUxParent;
  82. } _UxCAddFiletype;
  83. #ifdef CONTEXT_MACRO_ACCESS
  84. static _UxCAddFiletype *UxAddFiletypeContext;
  85. #define AddFiletype UxAddFiletypeContext->UxAddFiletype
  86. #define AF_FiletypeFamilyNameLabel UxAddFiletypeContext->UxAF_FiletypeFamilyNameLabel
  87. #define AF_OkButton UxAddFiletypeContext->UxAF_OkButton
  88. #define AF_ApplyButton UxAddFiletypeContext->UxAF_ApplyButton
  89. #define AF_CancelButton UxAddFiletypeContext->UxAF_CancelButton
  90. #define AF_HelpButton UxAddFiletypeContext->UxAF_HelpButton
  91. /*#define AF_IdCharacteristicsText UxAddFiletypeContext->UxAF_IdCharacteristicsText*/
  92. #define AF_FiletypeIconHelpLabel UxAddFiletypeContext->UxAF_FiletypeIconHelpLabel
  93. /*#define AF_IdCharacteristicsEdit UxAddFiletypeContext->UxAF_IdCharacteristicsEdit*/
  94. #define AF_FiletypePrintCmdLabel UxAddFiletypeContext->UxAF_FiletypePrintCmdLabel
  95. #define AF_OpenFiletypeCmdLabel UxAddFiletypeContext->UxAF_OpenFiletypeCmdLabel
  96. #define AF_CommandsLabel UxAddFiletypeContext->UxAF_CommandsLabel
  97. #define AF_FiletypeIconForm UxAddFiletypeContext->UxAF_FiletypeIconForm
  98. /*
  99. #define AF_MED_IconGadget UxAddFiletypeContext->UxAF_MED_IconGadget
  100. #define AF_TINY_IconGadget UxAddFiletypeContext->UxAF_TINY_IconGadget
  101. */
  102. #define AF_FiletypeIconsEditButton UxAddFiletypeContext->UxAF_FiletypeIconsEditButton
  103. #define AF_FiletypeIconFindSetButton UxAddFiletypeContext->UxAF_FiletypeIconFindSetButton
  104. #define AF_FiletypeIconsBoxLabel UxAddFiletypeContext->UxAF_FiletypeIconsBoxLabel
  105. #define AF_FiletypeHelpScrolledWindow UxAddFiletypeContext->UxAF_FiletypeHelpScrolledWindow
  106. #define AF_separator2 UxAddFiletypeContext->UxAF_separator2
  107. #define AF_separator1 UxAddFiletypeContext->UxAF_separator1
  108. #define AF_IdCharacteristicsLabel UxAddFiletypeContext->UxAF_IdCharacteristicsLabel
  109. #define UxParent UxAddFiletypeContext->UxUxParent
  110. #endif /* CONTEXT_MACRO_ACCESS */
  111. extern Widget AF_FileTypeNameTextField;
  112. extern Widget AF_FiletypePrintCmdTextField;
  113. extern Widget AF_OpenCmdText;
  114. extern Widget AF_FiletypeHelpText;
  115. extern Widget AF_MED_IconGadget;
  116. extern Widget AF_TINY_IconGadget;
  117. /*******************************************************************************
  118. Declarations of global functions.
  119. *******************************************************************************/
  120. void activateCB_edit_id_characteristics (
  121. Widget filesel,
  122. XtPointer cdata,
  123. XmFileSelectionBoxCallbackStruct *cbstruct);
  124. Widget create_AddFiletype(swidget _UxUxParent);
  125. #endif /* _ADDFILETYPE_H_INCLUDED */