990bcc83af47fb5d3adf5cae49755da6bea71153
[oweals/cde.git] / cde / programs / dtappbuilder / src / ab / abobjP.h
1
2 /*
3  *      $XConsortium: abobjP.h /main/3 1995/11/06 17:14:46 rswiston $
4  *
5  * @(#)abobjP.h 1.17 15 Feb 1994      cde_app_builder/src/ab
6  *
7  *      RESTRICTED CONFIDENTIAL INFORMATION:
8  *
9  *      The information in this document is subject to special
10  *      restrictions in a confidential disclosure agreement between
11  *      HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
12  *      document outside HP, IBM, Sun, USL, SCO, or Univel without
13  *      Sun's specific written approval.  This document and all copies
14  *      and derivative works thereof must be returned or destroyed at
15  *      Sun's request.
16  *
17  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
18  *
19  */
20
21 /*
22  * abobjP.h -  
23  */
24 #ifndef _ABOBJ_P_H_
25 #define _ABOBJ_P_H_
26
27
28 #include <values.h>
29
30 #include <ab_private/abobj.h>
31 #include <ab_private/abobj_set.h>
32
33 #ifndef MAXINT
34 #define MAXINT          (0x7FFFFFFF)
35 #endif /* MAXINT */
36 #define XSORT           (1)
37 #define YSORT           (2)
38
39 /*
40  * Resize directions.
41  */
42 typedef enum {
43     NONE,
44     MOVE,
45     NORTH,
46     SOUTH,
47     EAST,
48     WEST,
49     NORTH_EAST,
50     NORTH_WEST,
51     SOUTH_EAST,
52     SOUTH_WEST,
53     RESIZE_DIR_NUM_VALUES
54     /* ANSI: no comma after last enum item! */
55 } RESIZE_DIR;
56
57 typedef enum {
58         LEFT_EDGES      = (1L << 0),
59         VCENTERS        = (1L << 1),
60         RIGHT_EDGES     = (1L << 2),
61         LABELS          = (1L << 3),
62         TOP_EDGES       = (1L << 4),
63         HCENTERS        = (1L << 5),
64         BOTTOM_EDGES    = (1L << 6),
65         TO_GRID         = (1L << 7),
66         VSPACING        = (1L << 8),
67         HSPACING        = (1L << 9),
68         FIXEDROWS       = (1L << 10),
69         FIXEDCOLS       = (1L << 12),
70         ROWFIRST        = (1L << 13),
71         COLFIRST        = (1L << 14),
72         HCENTERED       = (1L << 15),
73         VCENTERED       = (1L << 16)
74         /* ANSI: no comma after last enum item! */
75 } AB_ALIGN_TYPES;
76
77 /*
78  * Translation Table storage
79  */
80 typedef struct _AB_TRANS_TBL
81 {
82     WidgetClass    wclass;
83     XtTranslations translations;
84
85 } ABTransTbl;
86
87 /*
88  * Object Menu Cache structure
89  */
90 typedef struct _WIN_MENU_CACHE
91 {
92     ABObj       winobj;
93     Widget      menu;
94 } WinMenuCache;
95
96 /*
97  * Browser Menu Cache structure
98  */
99 typedef struct _BROWSER_MENU_CACHE
100 {
101     Widget      brws_widget;
102     Widget      menu;
103 } BrowserMenuCache;
104
105
106 /*
107  * EVENT-HANDLING for AB objects
108  */
109 extern void     abobjP_enable_build_actions(
110                     ABObj obj,
111                     Widget widget
112                 );
113
114 extern void     abobjP_disable_build_actions(
115                     ABObj obj,
116                     Widget widget
117                 );
118
119 /*
120  * SELECT AB object functions
121  */
122
123 /*
124  * MOVE AB object functions
125  */
126 extern int      abobjP_move_object_outline(
127                     ABObj        obj,
128                     XMotionEvent *mevent
129                 );
130
131 /*
132  * RESIZE AB object functions
133  */
134 extern Cursor   abobjP_get_resize_cursor(
135                      Widget      w,
136                      RESIZE_DIR  dir
137                 );   
138
139 extern RESIZE_DIR  abobjP_find_resize_direction(
140                      ABObj           obj,
141                      Widget          w,
142                      XEvent          *event
143                 );   
144  
145 extern int      abobjP_resize_object_outline(
146                      ABObj        obj,
147                      XEvent          *event,
148                      RESIZE_DIR   dir
149                 );   
150
151 extern void     abobjP_track_external_resizes(
152                      Widget      widget,
153                      XtPointer   client_data,
154                      XEvent *event,
155                      Boolean     cont_to_dispatch
156                 );
157
158
159 #endif /* _ABOBJ_P_H_ */
160