update
This commit is contained in:
parent
20022ebe1d
commit
b2bf457df5
6 changed files with 167 additions and 111 deletions
30
src/gui_menu.c
Normal file
30
src/gui_menu.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <midas.h>
|
||||
|
||||
static MwMenu m_exit, m_preferences, m_about_midas;
|
||||
|
||||
static void menu_handler(MwWidget handle, void* user, void* client) {
|
||||
if(client == m_exit) {
|
||||
MwDispatchUserHandler(window, MwNcloseHandler, NULL);
|
||||
} else if(client == m_preferences) {
|
||||
gui_preferences();
|
||||
} else if(client == m_about_midas) {
|
||||
gui_version();
|
||||
}
|
||||
}
|
||||
|
||||
void gui_menu_init(void) {
|
||||
MwMenu m;
|
||||
|
||||
m = MwMenuAdd(menu, NULL, "File");
|
||||
m_exit = MwMenuAdd(menu, m, "Exit");
|
||||
|
||||
m = MwMenuAdd(menu, NULL, "Edit");
|
||||
m_preferences = MwMenuAdd(menu, m, "Preferences");
|
||||
|
||||
m = MwMenuAdd(menu, NULL, "Project");
|
||||
|
||||
m = MwMenuAdd(menu, NULL, "?Help");
|
||||
m_about_midas = MwMenuAdd(menu, m, "About Midas");
|
||||
|
||||
MwAddUserHandler(menu, MwNmenuHandler, menu_handler, NULL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue