Started to lay down the foundation for events. More thorough accelerator string testing.
This commit is contained in:
parent
ac8e59c004
commit
cdbd31c554
31
test.c
31
test.c
|
@ -6,26 +6,31 @@
|
||||||
// TODO convert to using the new conversion macros
|
// TODO convert to using the new conversion macros
|
||||||
// TODO why can't these be const?
|
// TODO why can't these be const?
|
||||||
|
|
||||||
|
void noopMenu(void *source, void *data)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
|
||||||
static const uiMenuItem fileMenu[] = {
|
static const uiMenuItem fileMenu[] = {
|
||||||
{ uiMenuItemTypeCommand, "New" },
|
{ uiMenuItemTypeCommand, "New", noopMenu, NULL },
|
||||||
{ uiMenuItemTypeCommand, "Open" },
|
{ uiMenuItemTypeCommand, "Open", noopMenu, NULL },
|
||||||
{ uiMenuItemTypeQuit, NULL },
|
{ uiMenuItemTypeQuit, NULL, noopMenu, NULL },
|
||||||
{ 0, NULL },
|
{ 0, NULL, NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uiMenuItem editMenu[] = {
|
static const uiMenuItem editMenu[] = {
|
||||||
{ uiMenuItemTypeCommand, "Undo" },
|
{ uiMenuItemTypeCommand, "Undo", noopMenu, NULL },
|
||||||
{ uiMenuItemTypeSeparator, NULL },
|
{ uiMenuItemTypeSeparator, NULL, NULL, NULL },
|
||||||
{ uiMenuItemTypeCheckbox, "Check Me" },
|
{ uiMenuItemTypeCheckbox, "Check Me", noopMenu, NULL },
|
||||||
{ uiMenuItemTypeCommand, "A&ccelerator T_est" },
|
{ uiMenuItemTypeCommand, "A&ccelerator T_est\tTest", noopMenu, NULL },
|
||||||
{ uiMenuItemTypePreferences, NULL },
|
{ uiMenuItemTypePreferences, NULL, noopMenu, NULL },
|
||||||
{ 0, NULL },
|
{ 0, NULL, NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uiMenuItem helpMenu[] = {
|
static const uiMenuItem helpMenu[] = {
|
||||||
{ uiMenuItemTypeCommand, "Help" },
|
{ uiMenuItemTypeCommand, "Help", noopMenu, NULL },
|
||||||
{ uiMenuItemTypeAbout, NULL },
|
{ uiMenuItemTypeAbout, NULL, noopMenu, NULL },
|
||||||
{ 0, NULL },
|
{ 0, NULL, NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static uiMenu menu[] = {
|
static uiMenu menu[] = {
|
||||||
|
|
2
ui.idl
2
ui.idl
|
@ -145,6 +145,8 @@ struct Menu {
|
||||||
struct MenuItem {
|
struct MenuItem {
|
||||||
field Type MenuItemType;
|
field Type MenuItemType;
|
||||||
field Name *const char;
|
field Name *const char;
|
||||||
|
field OnClicked *func(sender *void, data *void);
|
||||||
|
field OnClickedData *void;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MenuItemType {
|
enum MenuItemType {
|
||||||
|
|
Loading…
Reference in New Issue