3 /* Copyright Massachusetts Institute of Technology 1985 */
6 * XMenu: MIT Project Athena, X Window system menu package
8 * XMenuDeletePane - Deletes a pane from an XMenu object.
10 * Author: Tony Della Fera, DEC
18 XMenuDeletePane(display
, menu
, p_num
)
19 register Display
*display
; /* Previously opened display */
20 register XMenu
*menu
; /* Menu object to be modified. */
21 register int p_num
; /* Pane number to be deleted. */
23 register XMPane
*p_ptr
; /* Pointer to pane being deleted. */
24 register XMSelect
*s_ptr
; /* Pointer to selections being deleted. */
25 register XMSelect
*s_next
; /* Pointer to next selection to be deleted. */
28 * Find the right pane.
30 p_ptr
= _XMGetPanePtr(menu
, p_num
);
31 if (p_ptr
== NULL
) return(XM_FAILURE
);
34 * Remove the pane from the association table.
36 XDeleteAssoc(display
, menu
->assoc_tab
, p_ptr
->window
);
39 * Remove the pane from the pane list and update
46 * Remove all the selections in the pane from the
47 * association table and free their XMSelect structures.
50 s_ptr
= p_ptr
->s_list
->next
;
51 s_ptr
!= p_ptr
->s_list
;
54 XDeleteAssoc(display
, menu
->assoc_tab
, s_ptr
->window
);
62 * Destroy the selection transparencies.
64 XDestroySubwindows(display
, p_ptr
->window
);
67 * Destroy the pane window.
69 XDestroyWindow(display
, p_ptr
->window
);
73 * Free the pane's XMPane structure.
78 * Schedule a recompute.
83 * Return the pane number just deleted.
85 _XMErrorCode
= XME_NO_ERROR
;
89 /* arch-tag: 32a5bfd4-4bac-4090-bb53-844110f4908e
90 (do not change this comment) */