3 /* Copyright Massachusetts Institute of Technology 1985 */
4 /* Copyright (C) 2001, 2002, 2003, 2004, 2005,
5 2006, 2007 Free Software Foundation, Inc. */
8 * XMenu: MIT Project Athena, X Window system menu package
10 * XMenuDeletePane - Deletes a pane from an XMenu object.
12 * Author: Tony Della Fera, DEC
20 XMenuDeletePane(display
, menu
, p_num
)
21 register Display
*display
; /* Previously opened display */
22 register XMenu
*menu
; /* Menu object to be modified. */
23 register int p_num
; /* Pane number to be deleted. */
25 register XMPane
*p_ptr
; /* Pointer to pane being deleted. */
26 register XMSelect
*s_ptr
; /* Pointer to selections being deleted. */
27 register XMSelect
*s_next
; /* Pointer to next selection to be deleted. */
30 * Find the right pane.
32 p_ptr
= _XMGetPanePtr(menu
, p_num
);
33 if (p_ptr
== NULL
) return(XM_FAILURE
);
36 * Remove the pane from the association table.
38 XDeleteAssoc(display
, menu
->assoc_tab
, p_ptr
->window
);
41 * Remove the pane from the pane list and update
48 * Remove all the selections in the pane from the
49 * association table and free their XMSelect structures.
52 s_ptr
= p_ptr
->s_list
->next
;
53 s_ptr
!= p_ptr
->s_list
;
56 XDeleteAssoc(display
, menu
->assoc_tab
, s_ptr
->window
);
64 * Destroy the selection transparencies.
66 XDestroySubwindows(display
, p_ptr
->window
);
69 * Destroy the pane window.
71 XDestroyWindow(display
, p_ptr
->window
);
75 * Free the pane's XMPane structure.
80 * Schedule a recompute.
85 * Return the pane number just deleted.
87 _XMErrorCode
= XME_NO_ERROR
;
91 /* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e
92 (do not change this comment) */