Minor changes to GraphicsWindow::menu[]

* Added a comment header identifying the columns

* Added Ctrl-Q accelerator for "Exit", as this is standard

* Replaced a Latin-1 "degree" character with an octal escape, to avoid
  source-file encoding issues

* Undefine (some of) the convenience macros used to define the table
  (the method aliases are numerous and unlikely to collide with anything)
pull/3/head
Daniel Richard G 2013-09-20 14:16:38 -04:00
parent 4a2711476c
commit 2499a02f2f
1 changed files with 10 additions and 2 deletions

View File

@ -21,6 +21,8 @@
#define C CTRL_MASK #define C CTRL_MASK
#define F(k) (FUNCTION_KEY_BASE+(k)) #define F(k) (FUNCTION_KEY_BASE+(k))
const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
//level
// label id accel fn
{ 0, "&File", 0, 0, NULL }, { 0, "&File", 0, 0, NULL },
{ 1, "&New\tCtrl+N", MNU_NEW, 'N'|C, mFile }, { 1, "&New\tCtrl+N", MNU_NEW, 'N'|C, mFile },
{ 1, "&Open...\tCtrl+O", MNU_OPEN, 'O'|C, mFile }, { 1, "&Open...\tCtrl+O", MNU_OPEN, 'O'|C, mFile },
@ -35,7 +37,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
{ 1, "Export Triangle &Mesh...", MNU_EXPORT_MESH, 0, mFile }, { 1, "Export Triangle &Mesh...", MNU_EXPORT_MESH, 0, mFile },
{ 1, "Export &Surfaces...", MNU_EXPORT_SURFACES,0, mFile }, { 1, "Export &Surfaces...", MNU_EXPORT_SURFACES,0, mFile },
{ 1, NULL, 0, 0, NULL }, { 1, NULL, 0, 0, NULL },
{ 1, "E&xit", MNU_EXIT, 0, mFile }, { 1, "E&xit\tCtrl+Q", MNU_EXIT, 'Q'|C, mFile },
{ 0, "&Edit", 0, 0, NULL }, { 0, "&Edit", 0, 0, NULL },
{ 1, "&Undo\tCtrl+Z", MNU_UNDO, 'Z'|C, mEdit }, { 1, "&Undo\tCtrl+Z", MNU_UNDO, 'Z'|C, mEdit },
@ -43,7 +45,7 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
{ 1, "Re&generate All\tSpace", MNU_REGEN_ALL, ' ', mEdit }, { 1, "Re&generate All\tSpace", MNU_REGEN_ALL, ' ', mEdit },
{ 1, NULL, 0, 0, NULL }, { 1, NULL, 0, 0, NULL },
{ 1, "Snap Selection to &Grid\t.", MNU_SNAP_TO_GRID, '.', mEdit }, { 1, "Snap Selection to &Grid\t.", MNU_SNAP_TO_GRID, '.', mEdit },
{ 1, "Rotate Imported &90°\t9", MNU_ROTATE_90, '9', mEdit }, { 1, "Rotate Imported &90\260\t9", MNU_ROTATE_90, '9', mEdit },
{ 1, NULL, 0, 0, NULL }, { 1, NULL, 0, 0, NULL },
{ 1, "Cu&t\tCtrl+X", MNU_CUT, 'X'|C, mClip }, { 1, "Cu&t\tCtrl+X", MNU_CUT, 'X'|C, mClip },
{ 1, "&Copy\tCtrl+C", MNU_COPY, 'C'|C, mClip }, { 1, "&Copy\tCtrl+C", MNU_COPY, 'C'|C, mClip },
@ -145,6 +147,12 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
{ -1 }, { -1 },
}; };
#undef DEL
#undef ESC
#undef S
#undef C
#undef F
void GraphicsWindow::Init(void) { void GraphicsWindow::Init(void) {
memset(this, 0, sizeof(*this)); memset(this, 0, sizeof(*this));