//See $LK,"Menus",A="HI:Menus"$ #define M_OPTION1 1 #define M_OPTION2 2 U0 PullDownMenuDemo() { I64 msg_code,arg1,arg2; CMenuEntry *tmpse; MenuPush( "File {" " Open(,'O');" " Save(,'S');" " Exit(,CH_SHIFT_ESC);" "}" "Edit {" " Cut(,,SC_DELETE|SCF_SHIFT);" " Paste(,,SC_INS|SCF_SHIFT);" "}" "Misc {" " Beep(,CH_SPACE);" " Opt1(MSG_CMD,M_OPTION1);" " Opt2(MSG_CMD,M_OPTION2);" "}" "Help {" " Help(,,0x3B0000003B);" " About(,,0x23B0000023B);" "}"); "A pull-down menu will appear " "if you move the mouse to the top " "of the scrn.\n\n"; do { msg_code=GetMsg(&arg1,&arg2,1<cur_menu,"Misc/Opt1")) tmpse->checked=!tmpse->checked; break; case M_OPTION2: "Option # 2\n"; if (tmpse=MenuEntryFind(Fs->cur_menu,"Misc/Opt2")) tmpse->checked=!tmpse->checked; break; } break; } } while (msg_code!=MSG_KEY_DOWN||(arg1!=CH_SHIFT_ESC && arg1!=CH_ESC)); MenuPop; } PullDownMenuDemo;