2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
25 * $XConsortium: pal.h /main/3 1995/11/06 17:35:34 rswiston $
27 * @(#)pal.h 1.32 01 Feb 1995 cde_app_builder/src/ab
29 * RESTRICTED CONFIDENTIAL INFORMATION:
31 * The information in this document is subject to special
32 * restrictions in a confidential disclosure agreement between
33 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
34 * document outside HP, IBM, Sun, USL, SCO, or Univel without
35 * Sun's specific written approval. This document and all copies
36 * and derivative works thereof must be returned or destroyed at
39 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
44 * pal.h - implements the palette object mechanism
49 #include <X11/Intrinsic.h>
50 #include <ab_private/obj.h>
51 #include <ab_private/proj.h>
54 * AppBuilder Property sheet types: Revolving & fixed
61 AB_PROP_TYPE_NUM_VALUES /* number of valid values - MUST BE LAST */
62 /* ANSI: no comma after last enum item! */
65 typedef struct _PAL_ITEM_INFO PalItemInfo;
66 typedef struct _PAL_EDITABLE_OBJ_INFO PalEditableObjInfo;
69 * define types for palette item "methods"
71 typedef int (*PalItemInitProc) (
75 typedef Widget (*PalItemPropInitProc) (
80 typedef int (*PalItemPropClearProc) (
84 typedef int (*PalItemPropActiveProc) (
89 typedef int (*PalItemPropLoadProc) (
95 typedef int (*PalItemPropApplyProc) (
99 typedef BOOL (*PalItemPropPendingFunc)(
103 typedef BOOL (*PalItemIsaFunc) (
107 typedef struct _PAL_SUBTYPE_INFO {
111 unsigned int pmwidth;
112 unsigned int pmheight;
116 * Palette Item Info Structure - one for each type of object supported
118 typedef struct _PAL_ITEM_INFO {
121 AB_OBJECT_TYPE type; /* AB type */
122 char *name; /* virtual name */
123 PalSubtypeInfo *subinfo; /* specific subtype info */
124 int num_subinfo; /* number of subtypes */
125 Widget rev_prop_frame; /* revolving prop sheet */
126 Widget fix_prop_dialog; /* fixed prop sheet */
129 PalItemInitProc initialize; /* initializes instance */
130 PalItemIsaFunc is_a_test; /* "is a" test */
131 PalItemPropInitProc prop_initialize; /* creates prop sheet */
132 PalItemPropActiveProc prop_activate; /* sets prop sheet active/inactive */
133 PalItemPropClearProc prop_clear; /* clears prop sheet */
134 PalItemPropLoadProc prop_load; /* loads prop sheet */
135 PalItemPropApplyProc prop_apply; /* applys properties to obj */
136 PalItemPropPendingFunc prop_pending; /* checks for pending changes */
140 typedef struct _PAL_EDITABLE_OBJ_INFO {
144 PalItemInfo *palitem;
145 PalEditableObjInfo *next;
146 } PAL_EDITABLE_OBJ_INFO;
148 typedef BOOL (*PalEditableObjTestFunc) (
149 PalEditableObjInfo *edobj_info
152 extern PalItemInfo *ab_button_palitem;
153 extern PalItemInfo *ab_choice_palitem;
154 extern PalItemInfo *ab_combo_box_palitem;
155 extern PalItemInfo *ab_cpanel_palitem;
156 extern PalItemInfo *ab_custdlg_palitem;
157 extern PalItemInfo *ab_drawp_palitem;
158 extern PalItemInfo *ab_label_palitem;
159 extern PalItemInfo *ab_group_palitem;
160 extern PalItemInfo *ab_list_palitem;
161 extern PalItemInfo *ab_mainwin_palitem;
162 extern PalItemInfo *ab_menu_palitem;
163 extern PalItemInfo *ab_menubar_palitem;
164 extern PalItemInfo *ab_scale_palitem;
165 extern PalItemInfo *ab_separator_palitem;
166 extern PalItemInfo *ab_spinbox_palitem;
167 extern PalItemInfo *ab_termp_palitem;
168 extern PalItemInfo *ab_textf_palitem;
169 extern PalItemInfo *ab_textp_palitem;
170 extern PalItemInfo *ab_fchooser_palitem;
171 extern PalItemInfo *ab_panedwin_palitem;
175 extern void pal_register_item_info(
177 PalItemInfo *palitem,
183 extern void pal_enable_item_drag(
188 extern PalItemInfo *pal_get_item_info(
192 extern PalItemInfo* pal_get_type_item_info(
197 extern Pixmap pal_get_item_pixmap(
204 extern STRING pal_get_item_subname(
209 extern void pal_register_editable_obj(
216 extern PalEditableObjInfo *
217 pal_get_editable_obj_info(
221 extern void pal_add_editable_obj_menu_items(
223 XtCallbackProc item_cb,
224 PalEditableObjTestFunc test_func
227 extern int pal_initialize_obj(
231 extern int pal_create_menu(
238 extern void pal_set_File_menu(
239 AB_CHOOSER_TYPE chooser_type,