2026-05-13 15:02:49 +09:00
|
|
|
#include <midas.h>
|
|
|
|
|
|
|
|
|
|
static MwMenu m_exit, m_preferences, m_about_midas;
|
|
|
|
|
|
2026-05-15 00:32:25 +09:00
|
|
|
static void MWAPI menu_handler(MwWidget handle, void* user, void* client) {
|
2026-05-13 15:02:49 +09:00
|
|
|
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);
|
|
|
|
|
}
|