DialogBoxP.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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: DialogBoxP.h /main/5 1996/03/27 20:16:24 drk $ */
  24. /**---------------------------------------------------------------------
  25. ***
  26. *** file: DialogBoxP.h
  27. ***
  28. *** project: Motif Widgets
  29. ***
  30. *** description: Private include file for DtDialogBox class.
  31. ***
  32. ***
  33. *** (c) Copyright 1990 by Hewlett-Packard Company.
  34. ***
  35. ***
  36. ***-------------------------------------------------------------------*/
  37. #ifndef _DtDialogBoxP_h
  38. #define _DtDialogBoxP_h
  39. #include <Xm/XmP.h>
  40. #include <Xm/BulletinBP.h>
  41. #include <Xm/FormP.h>
  42. #include <Dt/DialogBox.h>
  43. typedef void (*DlgGetSizeProc)(
  44. Widget,
  45. Dimension,
  46. Dimension,
  47. Dimension,
  48. Dimension,
  49. Dimension *,
  50. Dimension *
  51. );
  52. /*-------------------------------------------------------------
  53. ** Class Structure
  54. */
  55. /* Class Part
  56. */
  57. typedef struct _DtDialogBoxClassPart
  58. {
  59. XtWidgetProc create_children;
  60. XtWidgetProc configure_children;
  61. DlgGetSizeProc get_size;
  62. XtCallbackProc button_callback;
  63. caddr_t extension;
  64. } DtDialogBoxClassPart;
  65. /* Full Class Record
  66. */
  67. typedef struct _DtDialogBoxClassRec
  68. {
  69. CoreClassPart core_class;
  70. CompositeClassPart composite_class;
  71. ConstraintClassPart constraint_class;
  72. XmManagerClassPart manager_class;
  73. XmBulletinBoardClassPart bulletin_board_class;
  74. XmFormClassPart form_class;
  75. DtDialogBoxClassPart dialog_box_class;
  76. } DtDialogBoxClassRec;
  77. /* Actual Class
  78. */
  79. extern DtDialogBoxClassRec dtDialogBoxClassRec;
  80. /*-------------------------------------------------------------
  81. ** Instance Structure
  82. */
  83. /* Instance Part
  84. */
  85. typedef struct _DtDialogBoxPart
  86. {
  87. XtCallbackList callback;
  88. Widget work_area;
  89. Widget separator;
  90. WidgetList button;
  91. Cardinal button_count;
  92. Boolean minimize_buttons;
  93. XmStringTable button_label_strings;
  94. } DtDialogBoxPart;
  95. /* Full Instance Record
  96. */
  97. typedef struct _DtDialogBoxRec
  98. {
  99. CorePart core;
  100. CompositePart composite;
  101. ConstraintPart constraint;
  102. XmManagerPart manager;
  103. XmBulletinBoardPart bulletin_board;
  104. XmFormPart form;
  105. DtDialogBoxPart dialog_box;
  106. } DtDialogBoxRec;
  107. /*-------------------------------------------------------------
  108. ** Constraint Structure
  109. */
  110. /* Constraint Part
  111. */
  112. typedef struct _DtDialogBoxConstraintPart
  113. {
  114. unsigned char child_type;
  115. } DtDialogBoxConstraintPart, * DtDialogBoxConstraint;
  116. /* Full Constraint Record
  117. */
  118. typedef struct _DtDialogBoxConstraintRec
  119. {
  120. XmManagerConstraintPart manager_constraint;
  121. XmFormConstraintPart form_constraint;
  122. DtDialogBoxConstraintPart dialog_box_constraint;
  123. } DtDialogBoxConstraintRec, * DtDialogBoxConstraintPtr;
  124. /*-------------------------------------------------------------
  125. ** Class and Instance Macros
  126. */
  127. /* DtDialogBox Class Macros
  128. */
  129. /**** WARNING: These macros are not thread-safe! ****/
  130. #define C_CreateChildren(mc) ((mc) -> dialog_box_class.create_children)
  131. #define C_ConfigureChildren(mc) ((mc) -> dialog_box_class.configure_children)
  132. #define C_GetSize(mc) ((mc) -> dialog_box_class.get_size)
  133. #define C_ButtonCallback(mc) ((mc) -> dialog_box_class.button_callback)
  134. /* DtDialogBox Instance Macros
  135. */
  136. #define M_DialogBoxConstraint(w) \
  137. (&((DtDialogBoxConstraintPtr) (w)->core.constraints) \
  138. -> dialog_box_constraint)
  139. #define M_WorkArea(m) (m -> dialog_box.work_area)
  140. #define M_Separator(m) (m -> dialog_box.separator)
  141. #define M_MinimizeButtons(m) (m -> dialog_box.minimize_buttons)
  142. #define M_Button(m) (m -> dialog_box.button)
  143. #define M_ButtonCount(m) (m -> dialog_box.button_count)
  144. #define M_ButtonLabelStrings(m) (m -> dialog_box.button_label_strings)
  145. #define M_Callback(m) (m -> dialog_box.callback)
  146. #endif /* _DtDialogBoxP_h */
  147. /* DON'T ADD ANYTHING AFTER THIS #endif */