+void update_time(void)
+{
+ char tmpbuf[2+1+2+1] = "--:--";
+ //strftime(tmpbuf, sizeof(tmpbuf), "%H:%M", NULL);
+ AxWin3_Widget_SetText(gTimeDisplay, tmpbuf);
+}
+
+void mainmenu_app_textedit(void *unused)
+{
+// _SysDebug("TODO: Launch text editor");
+ const char *args[] = {"ate",NULL};
+ _SysSpawn("/Acess/Apps/AxWin/3.0/ate", args, (const char **)gEnvion, 0, NULL, NULL);
+}
+
+void mainmenu_app_terminal(void *unused)
+{
+ _SysDebug("Launch terminal emulator");
+ const char *args[] = {"terminal",NULL};
+ _SysSpawn("/Acess/Apps/AxWin/3.0/terminal", args, (const char **)gEnvion, 0, NULL, NULL);
+}
+
+void mainmenu_run_dialog(void *unused)
+{
+ AxWin3_ShowWindow(gRunDialog, 1);
+ AxWin3_FocusWindow(gRunDialog);
+}
+
+void create_mainmenu(void)
+{
+ gSystemMenu = AxWin3_Menu_Create(NULL);
+
+ AxWin3_Menu_AddItem(gSystemMenu, "Text &Editor\tWin+E", mainmenu_app_textedit, NULL, 0, NULL);
+ AxWin3_Menu_AddItem(gSystemMenu, "&Terminal Emulator\tWin+T", mainmenu_app_terminal, 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);
+}
+
+// --------------------------------------------------------------------
+// "Run" Dialog box
+// --------------------------------------------------------------------
+int run_dorun(tAxWin3_Widget *unused)
+{
+ _SysDebug("DoRun pressed");
+ char *cmd = AxWin3_Widget_GetText(gRunInput);
+ _SysDebug("Command string '%s'", cmd);
+
+ // TODO: Parse the command string into components
+ // TODO: Call _SysSpawn