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_combobox.c /main/5 1996/08/08 17:52:08 mustafa $
27 * @(#)pal_combobox.c 1.1 23 Feb 1994
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.
45 * pal_combobox.c - Implements Palette ComboBox object functionality
49 #include <ab_private/obj_notify.h>
50 #include <ab_private/ab.h>
51 #include <ab_private/pal.h>
52 #include <ab_private/prop.h>
53 #include <ab_private/abobj.h>
54 #include <ab_private/abobj_set.h>
55 #include <ab_private/ui_util.h>
56 #include "combobox_ui.h"
58 const int combo_box_init_width = 100;
60 static const int input_rows = 3;
62 typedef struct PROP_COMBOBOX_SETTINGS
65 PropFieldSettingRec name;
66 PropRadioSettingRec combobox_type;
67 PropGeometrySettingRec pos;
68 PropRadioSettingRec wth_policy;
69 PropGeometrySettingRec wth;
70 PropOptionsSettingRec label_type;
71 PropFieldSettingRec label;
72 PropOptionsSettingRec label_pos;
73 PropCheckboxSettingRec init_state;
74 PropColorSettingRec bg_color;
75 PropColorSettingRec fg_color;
76 PropFieldSettingRec item_label;
77 PropCheckboxSettingRec item_state;
78 PropItemsSettingRec items;
80 } PropComboboxSettingsRec, *PropComboboxSettings;
82 /*************************************************************************
84 ** Private Function Declarations **
86 **************************************************************************/
90 static int combo_box_initialize(
93 static Widget combo_box_prop_init(
97 static int combo_box_prop_activate(
101 static int combo_box_prop_clear(
104 static int combo_box_prop_load(
107 unsigned long loadkey
109 static int combo_box_prop_apply(
112 static BOOL combo_box_prop_pending(
116 static BOOL verify_props(
119 static void turnoff_changebars(
126 static int combobox_install_obj_destroy_CB(void);
128 static int combobox_obj_destroy_CB(
129 ObjEvDestroyInfo destroyInfo
135 static void wth_policyCB(
137 XtPointer clientdata,
138 XmToggleButtonCallbackStruct *state
141 /*************************************************************************
145 **************************************************************************/
146 PalItemInfo combo_box_palitem_rec = {
148 /* type */ AB_TYPE_COMBO_BOX,
149 /* name */ "Combo Box",
150 /* animation pixmaps*/ NULL,
151 /* number of pixmaps*/ 0,
152 /* rev_prop_frame */ NULL,
153 /* fix_prop_dialog */ NULL,
154 /* initialize */ combo_box_initialize,
155 /* is_a_test */ obj_is_combo_box,
156 /* prop_initialize */ combo_box_prop_init,
157 /* prop_activate */ combo_box_prop_activate,
158 /* prop_clear */ combo_box_prop_clear,
159 /* prop_load */ combo_box_prop_load,
160 /* prop_apply */ combo_box_prop_apply,
161 /* prop_pending */ combo_box_prop_pending
165 PalItemInfo *ab_combo_box_palitem = &combo_box_palitem_rec;
166 PropComboboxSettingsRec prop_combobox_settings_rec[AB_PROP_TYPE_NUM_VALUES];
169 /*************************************************************************
171 ** Function Definitions **
173 **************************************************************************/
175 combo_box_initialize(
183 obj_set_unique_name(obj, "combobox");
185 obj_set_label(obj, catgets(Dtb_project_catd, 100, 255, "ComboBox:"));
186 obj_set_label_position(obj, AB_CP_WEST);
187 obj_set_height(obj, -1);
189 /* Add initial items to list */
190 items[0] = catgets(Dtb_project_catd, 6, 70, "itemA");
191 items[1] = catgets(Dtb_project_catd, 6, 71, "itemB");
192 for (i=0; i < XtNumber(items); i++)
194 iobj = obj_create(AB_TYPE_ITEM, NULL);
195 obj_set_subtype(iobj, AB_ITEM_FOR_COMBO_BOX);
196 obj_append_child(obj, iobj);
197 abobj_set_item_name(iobj, obj_get_module(obj), obj_get_name(obj), items[i]);
198 obj_set_label(iobj, items[i]);
199 obj_set_is_initially_selected(iobj, i==0? True : False);
201 obj_set_attachment(obj, AB_CP_NORTH, AB_ATTACH_POINT, NULL, obj->y);
202 obj_set_attachment(obj, AB_CP_WEST, AB_ATTACH_POINT, NULL, obj->x);
213 DtbComboboxPropDialogInfoRec rev_combobox_prop_dialog; /* Revolving Props */
214 DtbComboboxPropDialogInfo cgen = &dtb_combobox_prop_dialog; /* Codegen structure */
215 DtbRevolvPropDialogInfo rpd = &(dtb_revolv_prop_dialog);
216 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
223 if (type == AB_PROP_REVOLVING)
226 * Only the Attributes ControlPanel needs to be created within
227 * the existing Revolving Prop dialog, so fill out all other
228 * fields with the Revolving Prop dialog equivelents, so the
229 * dtb initialize proc will skip those non-NULL fields...
231 dtbComboboxPropDialogInfo_clear(&rev_combobox_prop_dialog);
233 cgen = &(rev_combobox_prop_dialog);
234 cgen->prop_dialog = rpd->prop_dialog;
235 cgen->prop_dialog_shellform = rpd->prop_dialog_shellform;
236 cgen->prop_dialog_panedwin = rpd->prop_dialog_panedwin;
237 cgen->prop_dialog_form = rpd->prop_dialog_form;
238 cgen->objlist_panel = rpd->objlist_panel;
239 cgen->objlist_label = rpd->objlist_label2;
240 cgen->objlist_scrolledwin = rpd->objlist_scrolledwin;
241 cgen->objlist = rpd->objlist;
242 cgen->attrs_ctrlpanel_frame = rpd->attrs_ctrlpanel_frame;
243 cgen->activate_panel = rpd->activate_panel;
244 cgen->ok_button = rpd->ok_button;
245 cgen->cancel_button = rpd->cancel_button;
246 cgen->apply_button = rpd->apply_button;
247 cgen->reset_button = rpd->reset_button;
248 cgen->help_button = rpd->help_button;
251 * Get notification of object destruction!
253 combobox_install_obj_destroy_CB();
256 else /* AB_PROP_FIXED */
257 cgen = &dtb_combobox_prop_dialog;
259 if (dtb_combobox_prop_dialog_initialize(cgen, parent) == 0)
261 pcs->prop_sheet = cgen->attrs_ctrlpanel;
262 pcs->current_obj = NULL;
264 if (type == AB_PROP_REVOLVING)
265 XtVaSetValues(parent,
266 XmNuserData, pcs->current_obj,
269 /* Dialog/Object List */
270 if (type == AB_PROP_FIXED)
272 prop_fixed_dialog_init(ab_combo_box_palitem,
273 cgen->prop_dialog_shellform, cgen->objlist);
274 prop_activate_panel_init(type, ab_combo_box_palitem,
275 cgen->ok_button, cgen->apply_button,
276 cgen->reset_button, cgen->cancel_button,
280 /* Alternate Editor Buttons */
281 prop_editors_panel_init(type, ab_combo_box_palitem,
282 cgen->attach_button, cgen->conn_button, cgen->helptxt_button);
285 * Prop Sheet Settings....
289 prop_field_init(&(pcs->name), cgen->name_field_label,
290 cgen->name_field, cgen->name_cb);
292 /* Label, Type, Position */
294 item[n] = cgen->labeltype_rbox_items.String_item;
295 item_val[n] = AB_LABEL_STRING; n++;
296 item[n] = cgen->labeltype_rbox_items.Graphic_item;
297 item_val[n] = AB_LABEL_GLYPH; n++;
298 prop_options_init(&(pcs->label_type), cgen->labeltype_rbox_label,
299 cgen->labeltype_rbox, cgen->labeltype_rbox_menu,
300 n, item, (XtPointer*)item_val,
303 prop_field_init(&(pcs->label), cgen->label_field_label,
304 cgen->label_field, cgen->label_cb);
306 prop_label_field_init(&(pcs->label), cgen->graphic_hint, item, n);
309 item[n] = cgen->labelpos_rbox_items.Above_item;
310 item_val[n] = AB_CP_NORTH; n++;
311 item[n] = cgen->labelpos_rbox_items.Left_item;
312 item_val[n] = AB_CP_WEST; n++;
313 prop_options_init(&(pcs->label_pos), cgen->labelpos_rbox_label,
314 cgen->labelpos_rbox, cgen->labelpos_rbox_menu,
315 n, item, (XtPointer*)item_val,
320 item[n] = cgen->comboboxtype_rbox_items.Static_item;
321 item_val[n] = True; n++;
322 item[n] = cgen->comboboxtype_rbox_items.Editable_item;
323 item_val[n] = False; n++;
324 prop_radiobox_init(&(pcs->combobox_type), cgen->comboboxtype_rbox_label,
325 cgen->comboboxtype_rbox, n, item, (XtPointer*)item_val,
326 cgen->comboboxtype_cb);
329 prop_geomfield_init(&(pcs->pos), cgen->pos_label,
330 cgen->x_field_label, cgen->x_field,
331 cgen->y_field_label, cgen->y_field,
338 item[n] = cgen->wpolicy_rbox_items.Longest_Item_item;
339 item_val[n] = SIZE_OF_CONTENTS_KEY; n++;
340 item[n] = cgen->wpolicy_rbox_items.Fixed_item;
341 item_val[n] = SIZE_FIXED_KEY; n++;
342 prop_radiobox_init(&(pcs->wth_policy), cgen->wpolicy_rbox_label,
343 cgen->wpolicy_rbox, n, item, (XtPointer*)item_val,
347 XtAddCallback(item[i], XmNvalueChangedCallback,
348 (XtCallbackProc)prop_size_policyCB, (XtPointer)&(pcs->wth));
350 prop_geomfield_init(&(pcs->wth), cgen->wpolicy_rbox_label,
351 NULL, NULL, NULL, NULL,
352 cgen->w_field_label, cgen->w_field,
358 item[n] = cgen->istate_ckbox_items.Visible_item;
359 item_val[n] = AB_STATE_VISIBLE; n++;
360 item[n] = cgen->istate_ckbox_items.Active_item;
361 item_val[n] = AB_STATE_ACTIVE; n++;
362 prop_checkbox_init(&(pcs->init_state), cgen->istate_ckbox_label,
363 cgen->istate_ckbox, n, item, item_val,
367 prop_colorfield_init(&(pcs->bg_color), cgen->bg_mbutton,
368 cgen->bg_mbutton_bg_mbutton_menu_items.None_item,
369 cgen->bg_mbutton_bg_mbutton_menu_items.Color_Chooser_item,
370 cgen->bg_swatch, cgen->bg_field, cgen->bg_cb);
372 prop_colorfield_init(&(pcs->fg_color), cgen->fg_mbutton,
373 cgen->fg_mbutton_fg_mbutton_menu_items.None_item,
374 cgen->fg_mbutton_fg_mbutton_menu_items.Color_Chooser_item,
375 cgen->fg_swatch, cgen->fg_field, cgen->fg_cb);
380 prop_field_init(&(pcs->item_label), cgen->itemlabel_label,
381 cgen->itemlabel_field, cgen->itemlist_cb);
385 item[n] = cgen->item_state_ckbox_items.Selected_item;
386 item_val[n] = AB_STATE_SELECTED; n++;
387 prop_checkbox_init(&(pcs->item_state), NULL,
388 cgen->item_state_ckbox, n, item, item_val,
391 /* Store Items->Add menu items in array */
393 item[n] = cgen->item_edit_mbutton_editmenu_items.Add_Before_item;
394 item_val[n] = INSERT_BEFORE; n++;
395 item[n] = cgen->item_edit_mbutton_editmenu_items.Add_After_item;
396 item_val[n] = INSERT_AFTER; n++;
398 /* Store Items->Edit menu items in array */
400 item2[j] = cgen->item_edit_mbutton_editmenu_items.Cut_item;
401 item2_val[j] = AB_EDIT_CUT; j++;
402 item2[j] = cgen->item_edit_mbutton_editmenu_items.Copy_item;
403 item2_val[j] = AB_EDIT_COPY; j++;
404 item2[j] = cgen->item_edit_mbutton_editmenu_items.Paste_item;
405 item2_val[j] = AB_EDIT_PASTE; j++;
406 item2[j] = cgen->item_edit_mbutton_editmenu_items.Delete_item;
407 item2_val[j] = AB_EDIT_DELETE; j++;
408 item2[j] = cgen->item_edit_mbutton_editmenu_items.Change_item;
409 item2_val[j] = EDIT_CHANGE; j++;
411 prop_item_editor_init(&(pcs->items), AB_ITEM_FOR_COMBO_BOX,
412 cgen->itemlist, cgen->itemlist_cb,
413 cgen->item_add_button,
416 &(pcs->item_label), NULL/*label_type*/, NULL/*graphic_hint*/,
417 NULL/*mnemonic*/, NULL/*accel*/, NULL/*line_style*/,
418 &(pcs->item_state), NULL,
419 &(pcs->current_obj));
421 prop_changebars_cleared(pcs->prop_sheet);
423 return (cgen->prop_dialog_shellform);
430 combo_box_prop_activate(
435 ui_set_active(prop_combobox_settings_rec[type].prop_sheet, active);
442 combo_box_prop_clear(
446 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
448 if (pcs->current_obj == NULL)
452 prop_field_set_value(&(pcs->name), "", False);
454 /* Clear Label Type/Position */
455 prop_options_set_value(&(pcs->label_type), (XtPointer)AB_LABEL_STRING, False);
456 prop_options_set_value(&(pcs->label_pos), (XtPointer)AB_CP_WEST, False);
459 ui_set_label_string(pcs->label.label, "Label:");
460 prop_field_set_value(&(pcs->label), "", False);
462 /* Clear Read Only */
463 prop_radiobox_set_value(&(pcs->combobox_type), (XtPointer)True, False);
466 prop_geomfield_clear(&(pcs->pos), GEOM_X);
467 prop_geomfield_clear(&(pcs->pos), GEOM_Y);
470 prop_radiobox_set_value(&(pcs->wth_policy), (XtPointer)SIZE_OF_CONTENTS_KEY, False);
471 prop_geomfield_clear(&(pcs->wth), GEOM_WIDTH);
473 /* Clear Initial State */
474 prop_checkbox_set_value(&(pcs->init_state), AB_STATE_VISIBLE, True, False);
475 prop_checkbox_set_value(&(pcs->init_state), AB_STATE_ACTIVE, True, False);
478 prop_colorfield_set_value(&(pcs->bg_color), "", False);
479 prop_colorfield_set_value(&(pcs->fg_color), "", False);
482 prop_item_editor_clear(&(pcs->items));
484 pcs->current_obj = NULL;
486 turnoff_changebars(type);
495 unsigned long loadkey
498 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
500 BOOL load_all = (loadkey & LoadAll);
504 if (pcs->current_obj != NULL)
505 obj = pcs->current_obj;
509 else if (!obj_is_combo_box(obj))
512 pcs->current_obj = obj;
515 if (load_all || loadkey & LoadName)
516 prop_field_set_value(&(pcs->name), obj_get_name(obj), False);
520 /* Load Label Type/Position */
521 prop_options_set_value(&(pcs->label_type), (XtPointer)obj->label_type, False);
522 prop_options_set_value(&(pcs->label_pos), (XtPointer)obj_get_label_position(obj), False);
525 prop_setup_label_field(&(pcs->label), NULL,
526 obj->label_type, obj_get_label(obj), AB_LINE_UNDEF);
529 prop_radiobox_set_value(&(pcs->combobox_type),
530 (XtPointer)obj_get_read_only(obj), False);
532 /* Load Initial State */
533 prop_checkbox_set_value(&(pcs->init_state), AB_STATE_VISIBLE,
534 obj_is_initially_visible(obj), False);
535 prop_checkbox_set_value(&(pcs->init_state), AB_STATE_ACTIVE,
536 obj_is_initially_active(obj), False);
539 prop_colorfield_set_value(&(pcs->bg_color), obj_get_bg_color(obj), False);
540 prop_colorfield_set_value(&(pcs->fg_color), obj_get_fg_color(obj), False);
543 prop_item_editor_load(&(pcs->items), obj);
545 turnoff_changebars(type);
549 if (load_all || loadkey & LoadPosition)
550 prop_load_obj_position(obj, &(pcs->pos));
553 if (load_all || loadkey & LoadSize)
555 editable = abobj_width_resizable(obj);
556 prop_radiobox_set_value(&(pcs->wth_policy),
557 editable? (XtPointer)SIZE_FIXED_KEY :
558 (XtPointer)SIZE_OF_CONTENTS_KEY, False);
560 ui_set_active(pcs->wth.w_field, editable);
561 ui_set_active(pcs->wth.w_label, editable);
562 prop_geomfield_set_value(&(pcs->wth), GEOM_WIDTH,
563 abobj_get_comp_width(obj), False);
570 combo_box_prop_apply(
574 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
576 int width_policy, new_w;
577 BOOL size_chg = False;
578 BOOL reset_bg = False;
579 BOOL reset_fg = False;
581 if (!verify_props(type))
584 if (prop_changed(pcs->name.changebar))
586 value = prop_field_get_value(&(pcs->name));
587 abobj_set_name(pcs->current_obj, value);
590 if (prop_changed(pcs->label.changebar) ||
591 prop_changed(pcs->label_type.changebar))
593 value = prop_field_get_value(&(pcs->label));
595 abobj_set_label(pcs->current_obj,
596 (AB_LABEL_TYPE)prop_options_get_value(&(pcs->label_type)),
600 abobj_set_label_position(pcs->current_obj,
601 (AB_COMPASS_POINT)prop_options_get_value(&(pcs->label_pos)));
605 if (prop_changed(pcs->combobox_type.changebar))
607 abobj_set_read_only(pcs->current_obj,
608 (BOOL)prop_radiobox_get_value(&(pcs->combobox_type)));
610 if (prop_changed(pcs->pos.changebar))
612 if (abobj_is_movable(pcs->current_obj))
613 abobj_set_xy(pcs->current_obj,
614 prop_geomfield_get_value(&(pcs->pos), GEOM_X),
615 prop_geomfield_get_value(&(pcs->pos), GEOM_Y));
617 if (prop_changed(pcs->wth_policy.changebar))
619 width_policy = prop_radiobox_get_value(&(pcs->wth_policy));
620 abobj_set_size_policy(pcs->current_obj, width_policy == SIZE_FIXED_KEY);
622 if (width_policy == SIZE_FIXED_KEY)
624 new_w = prop_geomfield_get_value(&(pcs->wth), GEOM_WIDTH);
625 abobj_set_pixel_width(pcs->current_obj, new_w, 0);
629 if (prop_changed(pcs->init_state.changebar))
631 abobj_set_visible(pcs->current_obj,
632 prop_checkbox_get_value(&(pcs->init_state), AB_STATE_VISIBLE));
633 abobj_set_active(pcs->current_obj,
634 prop_checkbox_get_value(&(pcs->init_state), AB_STATE_ACTIVE));
636 if (prop_changed(pcs->fg_color.changebar))
638 value = prop_colorfield_get_value(&(pcs->fg_color));
639 abobj_set_foreground_color(pcs->current_obj, value);
640 if (util_strempty(value))
643 prop_colorfield_set_value(&(pcs->fg_color), obj_get_fg_color(pcs->current_obj),
646 if (prop_changed(pcs->bg_color.changebar))
648 value = prop_colorfield_get_value(&(pcs->bg_color));
649 abobj_set_background_color(pcs->current_obj, value);
650 if (util_strempty(value))
653 prop_colorfield_set_value(&(pcs->bg_color), obj_get_bg_color(pcs->current_obj),
656 if (prop_changed(pcs->items.changebar))
658 prop_item_change(&(pcs->items), False);
659 prop_item_editor_apply(&(pcs->items));
662 abobj_tree_instantiate_changes(pcs->current_obj);
664 if (reset_bg || reset_fg) /* Set back to No Color */
665 abobj_reset_colors(pcs->current_obj, reset_bg, reset_fg);
667 abobj_force_dang_form_resize(pcs->current_obj);
669 turnoff_changebars(type);
675 combo_box_prop_pending(
679 return(prop_changebars_pending(prop_combobox_settings_rec[type].prop_sheet));
687 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
689 if (prop_changed(pcs->name.changebar) && !prop_name_ok(pcs->current_obj,
693 if ((prop_changed(pcs->label_type.changebar) || prop_changed(pcs->label.changebar)) &&
694 prop_options_get_value(&(pcs->label_type)) == (XtPointer)AB_LABEL_GLYPH &&
695 !prop_graphic_filename_ok(pcs->label.field, False))
698 if (prop_changed(pcs->pos.changebar) &&
699 (!prop_number_ok(pcs->pos.x_field, (STRING)XFieldStr, -SHRT_MAX, SHRT_MAX) ||
700 !prop_number_ok(pcs->pos.y_field, (STRING)YFieldStr, -SHRT_MAX, SHRT_MAX)))
703 if (prop_changed(pcs->wth.changebar) &&
704 !prop_number_ok(pcs->wth.w_field, (STRING)WFieldStr, 1, SHRT_MAX))
707 if (prop_changed(pcs->fg_color.changebar) && !prop_color_ok(pcs->fg_color.field))
710 if (prop_changed(pcs->bg_color.changebar) && !prop_color_ok(pcs->bg_color.field))
721 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
723 prop_set_changebar(pcs->name.changebar, PROP_CB_OFF);
724 prop_set_changebar(pcs->combobox_type.changebar, PROP_CB_OFF);
725 prop_set_changebar(pcs->pos.changebar, PROP_CB_OFF);
726 prop_set_changebar(pcs->wth_policy.changebar, PROP_CB_OFF);
727 prop_set_changebar(pcs->label_type.changebar, PROP_CB_OFF);
728 prop_set_changebar(pcs->label.changebar, PROP_CB_OFF);
729 prop_set_changebar(pcs->init_state.changebar, PROP_CB_OFF);
730 prop_set_changebar(pcs->bg_color.changebar, PROP_CB_OFF);
731 prop_set_changebar(pcs->fg_color.changebar, PROP_CB_OFF);
732 prop_set_changebar(pcs->items.changebar, PROP_CB_OFF);
734 prop_changebars_cleared(pcs->prop_sheet);
738 combobox_install_obj_destroy_CB()
740 static BOOL callback_installed = False;
742 if (callback_installed)
745 obj_add_destroy_callback(combobox_obj_destroy_CB, "ComboBox Props");
751 combobox_obj_destroy_CB(ObjEvDestroyInfo destroyInfo)
754 ABObj doomedObj = destroyInfo->obj;
755 PropComboboxSettingsRec *pcs;
757 if (!obj_is_combo_box_item(doomedObj))
760 for (i = 0; i < AB_PROP_TYPE_NUM_VALUES; ++i)
762 pcs = &(prop_combobox_settings_rec[i]);
764 if (pcs->current_obj == doomedObj)
765 pcs->current_obj = NULL;
766 if (pcs->items.current_item == doomedObj)
767 pcs->items.current_item = NULL;
768 if (pcs->items.clipboard_item == doomedObj)
769 pcs->items.clipboard_item = NULL;
777 XtPointer clientdata,
778 XmToggleButtonCallbackStruct *state
781 AB_PROP_TYPE type = (AB_PROP_TYPE)clientdata;
782 PropComboboxSettingsRec *pcs = &(prop_combobox_settings_rec[type]);
785 /* Width field should ONLY be editable if Size Policy
790 XtVaGetValues(w, XmNuserData, &value, NULL);
791 ui_field_set_editable(pcs->wth.w_field, value == SIZE_FIXED_KEY);