add edit menu

This commit is contained in:
cy384 2020-08-13 11:21:05 -04:00
parent 18fb41d338
commit a9fbb1092a
3 changed files with 26 additions and 3 deletions

View File

@ -53,7 +53,8 @@
/* menus */
#define SSHEVEN_MBAR 128
#define MENU_APPLE 128
#define MENU_FILE 129
#define MENU_APPLE 128
#define MENU_FILE 129
#define MENU_EDIT 130
#endif

View File

@ -640,6 +640,11 @@ int main(int argc, char** argv)
void* menu = GetNewMBar(SSHEVEN_MBAR);
SetMenuBar(menu);
AppendResMenu(GetMenuHandle(MENU_APPLE), 'DRVR');
// disable everything in the edit menu until we implement it
menu = GetMenuHandle(MENU_EDIT);
DisableItem(menu, 0);
DrawMenuBar();
console_setup();

View File

@ -235,7 +235,7 @@ resource 'BNDL' (128, purgeable) {
resource 'MBAR' (SSHEVEN_MBAR, preload)
{
{ MENU_APPLE, MENU_FILE };
{ MENU_APPLE, MENU_FILE, MENU_EDIT };
};
resource 'MENU' (MENU_APPLE) {
@ -257,6 +257,23 @@ resource 'MENU' (MENU_FILE) {
}
};
resource 'MENU' (MENU_EDIT) {
MENU_EDIT, textMenuProc;
allEnabled, enabled;
"Edit";
{
"Undo", noIcon, "Z", noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Cut", noIcon, "X", noMark, plain;
"Copy", noIcon, "C", noMark, plain;
"Paste", noIcon, "V", noMark, plain;
"Clear", noIcon, noKey, noMark, plain;
"Select All", noIcon, "A", noMark, plain;
"-", noIcon, noKey, noMark, plain;
"Show Clipboard", noIcon, noKey, noMark, plain;
}
};
#include "Icons.r"
/* use this regex to get rid of data comments: " \/\*[^\*]*\*\/" */