X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FApplications%2Faxwin3_src%2FInterface%2Fmain.c;h=0065686b50b83f89bda883314c68ba9932d291e6;hb=637cd82c20678638c93d7ee0b8ce81a597e8f8d2;hp=990489ed99ea3e9552f70bdd3940a4c555063d0c;hpb=d2e9501431148e85345cefe6315f0eace0dfd777;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/Interface/main.c b/Usermode/Applications/axwin3_src/Interface/main.c index 990489ed..0065686b 100644 --- a/Usermode/Applications/axwin3_src/Interface/main.c +++ b/Usermode/Applications/axwin3_src/Interface/main.c @@ -9,14 +9,17 @@ #include #include #include +#include #define SIDEBAR_WIDTH 36 // === PROTOTYPES === void create_sidebar(void); +void create_mainmenu(void); // === GLOBALS === tHWND gSidebar; +tHWND gSystemMenu; tAxWin3_Widget *gSidebarRoot; int giScreenWidth; int giScreenHeight; @@ -25,6 +28,7 @@ tAxWin3_Widget *gSidebarRoot; int systembutton_fire(tAxWin3_Widget *Widget) { _SysDebug("SystemButton pressed"); + AxWin3_Menu_ShowAt(gSystemMenu, SIDEBAR_WIDTH, 0); return 0; } @@ -34,6 +38,7 @@ int main(int argc, char *argv[]) AxWin3_Connect(NULL); create_sidebar(); + create_mainmenu(); // Idle loop AxWin3_MainLoop(); @@ -82,7 +87,22 @@ void create_sidebar(void) } +void mainmenu_app_textedit(void *unused) +{ + _SysDebug("TODO: Launch text editor"); +} + +void mainmenu_run_dialog(void *unused) +{ + _SysDebug("TODO: Show run dialog"); +} + void create_mainmenu(void) { + gSystemMenu = AxWin3_Menu_Create(gSidebar); + + AxWin3_Menu_AddItem(gSystemMenu, "Text &Editor\tWin+E", mainmenu_app_textedit, NULL, 0, NULL); + AxWin3_Menu_AddItem(gSystemMenu, NULL, NULL, NULL, 0, NULL); + AxWin3_Menu_AddItem(gSystemMenu, "Run\tWin+R", mainmenu_run_dialog, NULL, 0, NULL); }