- Fixed compilation include path issue in wrlib/tests
[wmaker-crm.git] / WPrefs.app / editmenu.h
blob9838eb817ab05f55f9c3bbae087d150ccc3020ff
1 /* editmenu.h - editable menus
3 * WPrefs - Window Maker Preferences Program
5 * Copyright (c) 2000-2003 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,
20 * USA.
24 #ifndef _editmenu_h_
25 #define _editmenu_h_
27 typedef struct W_EditMenu WEditMenu;
28 typedef struct W_EditMenuItem WEditMenuItem;
31 typedef struct WEditMenuDelegate {
32 void *data;
34 void (*itemCloned)(struct WEditMenuDelegate*, WEditMenu*,
35 WEditMenuItem*, WEditMenuItem *);
36 void (*itemEdited)(struct WEditMenuDelegate*, WEditMenu*,
37 WEditMenuItem*);
38 void (*itemSelected)(struct WEditMenuDelegate*, WEditMenu*,
39 WEditMenuItem*);
40 void (*itemDeselected)(struct WEditMenuDelegate*, WEditMenu*,
41 WEditMenuItem*);
42 Bool (*shouldRemoveItem)(struct WEditMenuDelegate*, WEditMenu*,
43 WEditMenuItem*);
44 } WEditMenuDelegate;
49 WEditMenuItem *WCreateEditMenuItem(WMWidget *parent, char *title,
50 Bool isTitle);
53 char *WGetEditMenuItemTitle(WEditMenuItem *item);
55 void *WGetEditMenuItemData(WEditMenuItem *item);
57 void WSetEditMenuItemData(WEditMenuItem *item, void *data,
58 WMCallback *destroyer);
60 void WSetEditMenuItemImage(WEditMenuItem *item, WMPixmap *pixmap);
62 WEditMenu *WCreateEditMenu(WMScreen *scr, char *title);
64 WEditMenu *WCreateEditMenuPad(WMWidget *parent);
66 void WSetEditMenuDelegate(WEditMenu *mPtr, WEditMenuDelegate *delegate);
68 WEditMenuItem *WInsertMenuItemWithTitle(WEditMenu *mPtr, int index,
69 char *title);
71 WEditMenuItem *WAddMenuItemWithTitle(WEditMenu *mPtr, char *title);
73 WEditMenuItem *WGetEditMenuItem(WEditMenu *mPtr, int index);
75 void WSetEditMenuTitle(WEditMenu *mPtr, char *title);
77 char *WGetEditMenuTitle(WEditMenu *mPtr);
79 void WSetEditMenuAcceptsDrop(WEditMenu *mPtr, Bool flag);
81 void WSetEditMenuSubmenu(WEditMenu *mPtr, WEditMenuItem *item,
82 WEditMenu *submenu);
85 WEditMenu *WGetEditMenuSubmenu(WEditMenu *mPtr, WEditMenuItem *item);
87 void WRemoveEditMenuItem(WEditMenu *mPtr, WEditMenuItem *item);
89 void WSetEditMenuSelectable(WEditMenu *mPtr, Bool flag);
91 void WSetEditMenuEditable(WEditMenu *mPtr, Bool flag);
93 void WSetEditMenuIsFactory(WEditMenu *mPtr, Bool flag);
95 void WSetEditMenuMinSize(WEditMenu *mPtr, WMSize size);
97 void WSetEditMenuMaxSize(WEditMenu *mPtr, WMSize size);
99 WMPoint WGetEditMenuLocationForSubmenu(WEditMenu *mPtr, WEditMenu *submenu);
101 void WTearOffEditMenu(WEditMenu *menu, WEditMenu *submenu);
103 Bool WEditMenuIsTornOff(WEditMenu *mPtr);
106 void WEditMenuHide(WEditMenu *menu);
108 void WEditMenuUnhide(WEditMenu *menu);
110 void WEditMenuShowAt(WEditMenu *menu, int x, int y);
113 #endif