Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtWidget / DialogBoxP.h
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 librararies 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
38
39 #ifndef _DtDialogBoxP_h
40 #define _DtDialogBoxP_h
41
42 #include <Xm/XmP.h>
43 #include <Xm/BulletinBP.h>
44 #include <Xm/FormP.h>
45 #include <Dt/DialogBox.h>
46
47 typedef void (*DlgGetSizeProc)(
48         Widget,
49         Dimension,
50         Dimension,
51         Dimension,
52         Dimension,
53         Dimension *,
54         Dimension *
55 );
56 /*-------------------------------------------------------------
57 **      Class Structure
58 */
59
60 /*      Class Part
61 */
62 typedef struct _DtDialogBoxClassPart
63 {
64         XtWidgetProc            create_children;
65         XtWidgetProc            configure_children;
66         DlgGetSizeProc          get_size;
67         XtCallbackProc          button_callback;
68         caddr_t                 extension;
69 } DtDialogBoxClassPart;
70
71 /*      Full Class Record
72 */
73 typedef struct _DtDialogBoxClassRec
74 {
75         CoreClassPart           core_class;
76         CompositeClassPart      composite_class;
77         ConstraintClassPart     constraint_class;
78         XmManagerClassPart      manager_class;
79         XmBulletinBoardClassPart        bulletin_board_class;
80         XmFormClassPart         form_class;
81         DtDialogBoxClassPart    dialog_box_class;
82 } DtDialogBoxClassRec;
83
84 /*      Actual Class
85 */
86 extern DtDialogBoxClassRec dtDialogBoxClassRec;
87
88
89 /*-------------------------------------------------------------
90 **      Instance Structure
91 */
92
93 /*      Instance Part
94 */
95 typedef struct _DtDialogBoxPart
96 {
97         XtCallbackList  callback;
98         Widget          work_area;
99         Widget          separator;
100         WidgetList      button;
101         Cardinal        button_count;   
102         Boolean         minimize_buttons;
103         XmStringTable   button_label_strings;
104 } DtDialogBoxPart;
105
106 /*      Full Instance Record
107 */
108 typedef struct _DtDialogBoxRec
109 {
110         CorePart                core;
111         CompositePart           composite;
112         ConstraintPart          constraint;
113         XmManagerPart           manager;
114         XmBulletinBoardPart     bulletin_board;
115         XmFormPart              form;
116         DtDialogBoxPart         dialog_box;
117 } DtDialogBoxRec;
118
119
120 /*-------------------------------------------------------------
121 **      Constraint Structure
122 */
123
124 /*      Constraint Part
125 */
126 typedef struct _DtDialogBoxConstraintPart
127 {
128         unsigned char           child_type;
129 } DtDialogBoxConstraintPart, * DtDialogBoxConstraint;
130
131 /*      Full Constraint Record
132 */
133 typedef struct _DtDialogBoxConstraintRec
134 {
135         XmManagerConstraintPart         manager_constraint;
136         XmFormConstraintPart            form_constraint;
137         DtDialogBoxConstraintPart       dialog_box_constraint;
138 } DtDialogBoxConstraintRec, * DtDialogBoxConstraintPtr;
139
140
141 \f
142 /*-------------------------------------------------------------
143 **      Class and Instance Macros
144 */
145
146 /*      DtDialogBox Class Macros
147 */      
148 /**** WARNING: These macros are not thread-safe! ****/
149 #define C_CreateChildren(mc)    ((mc) -> dialog_box_class.create_children)
150 #define C_ConfigureChildren(mc) ((mc) -> dialog_box_class.configure_children)
151 #define C_GetSize(mc)           ((mc) -> dialog_box_class.get_size)
152 #define C_ButtonCallback(mc)    ((mc) -> dialog_box_class.button_callback)
153
154 /*      DtDialogBox Instance Macros
155 */
156 #define M_DialogBoxConstraint(w) \
157         (&((DtDialogBoxConstraintPtr) (w)->core.constraints) \
158                 -> dialog_box_constraint)
159 #define M_WorkArea(m)           (m -> dialog_box.work_area)
160 #define M_Separator(m)          (m -> dialog_box.separator)
161 #define M_MinimizeButtons(m)    (m -> dialog_box.minimize_buttons)
162 #define M_Button(m)             (m -> dialog_box.button)
163 #define M_ButtonCount(m)        (m -> dialog_box.button_count)
164 #define M_ButtonLabelStrings(m) (m -> dialog_box.button_label_strings)
165 #define M_Callback(m)           (m -> dialog_box.callback)
166
167 #endif /* _DtDialogBoxP_h */
168
169 /* DON'T ADD ANYTHING AFTER THIS #endif */