Wed, 11 Oct 2023 19:11:38 +0200
add toolbar appmenu and menu buttons
0 | 1 | /* |
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
3 | * | |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
115
diff
changeset
|
4 | * Copyright 2017 Olaf Wintermann. All rights reserved. |
0 | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions are met: | |
8 | * | |
9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | |
11 | * | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | |
15 | * | |
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | |
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | * POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | |
28 | ||
29 | #ifndef UI_MENU_H | |
30 | #define UI_MENU_H | |
31 | ||
32 | #include "toolkit.h" | |
33 | ||
34 | #ifdef __cplusplus | |
35 | extern "C" { | |
36 | #endif | |
37 | ||
73
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
38 | /* |
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
39 | * application menu functions |
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
40 | */ |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
41 | UIEXPORT void ui_menu(char *label); |
207
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
42 | UIEXPORT void ui_submenu(char *label); // deprecated |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
43 | UIEXPORT void ui_submenu_end(); // deprecated |
0 | 44 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
45 | UIEXPORT void ui_menuitem(char *label, ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
46 | UIEXPORT void ui_menuitem_st(char *stockid, ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
47 | UIEXPORT void ui_menuitem_gr(char *label, ui_callback f, void *userdata, ...); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
48 | UIEXPORT void ui_menuitem_stgr(char *stockid, ui_callback f, void *userdata, ...); |
20
2dda1ad6dc7a
added groups for menu items (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
14
diff
changeset
|
49 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
50 | UIEXPORT void ui_menuseparator(); |
0 | 51 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
52 | UIEXPORT void ui_checkitem(char *label, ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
53 | UIEXPORT void ui_checkitem_nv(char *label, char *vname); |
0 | 54 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
55 | UIEXPORT void ui_menuitem_list(UiList *items, ui_callback f, void *userdata); |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
56 | |
207
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
57 | UIEXPORT void ui_menu_end(void); |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
58 | |
73
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
59 | /* |
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
60 | * widget menu functions |
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
61 | */ |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
62 | UIEXPORT UIMENU ui_contextmenu(UiObject *obj); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
63 | UIEXPORT UIMENU ui_contextmenu_w(UiObject *obj, UIWIDGET widget); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
64 | UIEXPORT void ui_contextmenu_popup(UIMENU menu); |
73
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
65 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
66 | UIEXPORT void ui_widget_menuitem(UiObject *obj, char *label, ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
67 | UIEXPORT void ui_widget_menuitem_st(UiObject *obj, char *stockid, ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
68 | UIEXPORT void ui_widget_menuitem_gr(UiObject *obj, char *label, ui_callback f, void *userdata, ...); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
69 | UIEXPORT void ui_widget_menuitem_stgr(UiObject *obj, char *stockid, ui_callback f, void *userdata, ...); |
73
473acef47ddd
added context menus (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
70 | |
207
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
71 | |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
72 | // used for macro |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
73 | UIEXPORT void ui_menu_close(void); |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
74 | UIEXPORT int ui_menu_is_open(void); |
93b9f502cb88
add toolbar appmenu and menu buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
75 | |
0 | 76 | #ifdef __cplusplus |
77 | } | |
78 | #endif | |
79 | ||
80 | #endif /* UI_MENU_H */ | |
81 |