1 /* editmenu.h - editable menus
3 * WPrefs - Window Maker Preferences Program
5 * Copyright (c) 2000 Alfredo K. Kojima
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
24 typedef struct W_EditMenu WEditMenu
;
25 typedef struct W_EditMenuItem WEditMenuItem
;
28 typedef struct WEditMenuDelegate
{
31 void (*itemCloned
)(struct WEditMenuDelegate
*, WEditMenu
*,
32 WEditMenuItem
*, WEditMenuItem
*);
33 void (*itemSelected
)(struct WEditMenuDelegate
*, WEditMenu
*,
35 void (*itemDeselected
)(struct WEditMenuDelegate
*, WEditMenu
*,
37 Bool (*shouldRemoveItem
)(struct WEditMenuDelegate
*, WEditMenu
*,
44 WEditMenuItem
*WCreateEditMenuItem(WMWidget
*parent
, char *title
,
48 char *WGetEditMenuItemTitle(WEditMenuItem
*item
);
50 void *WGetEditMenuItemData(WEditMenuItem
*item
);
52 void WSetEditMenuItemData(WEditMenuItem
*item
, void *data
,
53 WMCallback
*destroyer
);
55 WEditMenu
*WCreateEditMenu(WMScreen
*scr
, char *title
);
57 WEditMenu
*WCreateEditMenuPad(WMWidget
*parent
);
59 void WSetEditMenuDelegate(WEditMenu
*mPtr
, WEditMenuDelegate
*delegate
);
61 WEditMenuItem
*WInsertMenuItemWithTitle(WEditMenu
*mPtr
, int index
,
64 WEditMenuItem
*WAddMenuItemWithTitle(WEditMenu
*mPtr
, char *title
);
66 void WSetEditMenuTitle(WEditMenu
*mPtr
, char *title
);
68 void WSetEditMenuAcceptsDrop(WEditMenu
*mPtr
, Bool flag
);
70 void WSetEditMenuSubmenu(WEditMenu
*mPtr
, WEditMenuItem
*item
,
74 WEditMenu
*WGetEditMenuSubmenu(WEditMenu
*mPtr
, WEditMenuItem
*item
);
76 void WRemoveEditMenuItem(WEditMenu
*mPtr
, WEditMenuItem
*item
);
78 void WSetEditMenuSelectable(WEditMenu
*mPtr
, Bool flag
);
80 void WSetEditMenuEditable(WEditMenu
*mPtr
, Bool flag
);
82 void WSetEditMenuIsFactory(WEditMenu
*mPtr
, Bool flag
);
84 void WSetEditMenuMinSize(WEditMenu
*mPtr
, WMSize size
);
86 void WSetEditMenuMaxSize(WEditMenu
*mPtr
, WMSize size
);
88 WMPoint
WGetEditMenuLocationForSubmenu(WEditMenu
*mPtr
, WEditMenu
*submenu
);
90 void WTearOffEditMenu(WEditMenu
*menu
, WEditMenu
*submenu
);
92 Bool
WEditMenuIsTornOff(WEditMenu
*mPtr
);