X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=393e5f4f37fa1f046b03141a95866cccd5f91739;hp=eab097cfd309837d8e384946272ba44dd4001294;hb=3195acb0c7c6e7a660fe27eb653a0aca56e91024;hpb=ec73e3f9aa11aea5ba6a4255489fdca63d2b4990 diff --git a/src/views.cpp b/src/views.cpp index eab097c..393e5f4 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.64 2001/01/17 11:00:18 kevin Exp $ +** $Id: views.cpp,v 1.66 2001/01/18 21:30:22 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -773,10 +773,10 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) wxMenu *file_menu = new wxMenu; - file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom..."); - file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter..."); - file_menu->Append(wxID_OPEN, "&Open..."); - file_menu->Append(wxID_SAVE, "&Save"); + file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P"); + file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F"); + file_menu->Append(wxID_OPEN, "&Open...\tCtrl-O"); + file_menu->Append(wxID_SAVE, "&Save\tCtrl-S"); file_menu->Append(wxID_SAVEAS, "Save &As..."); file_menu->Append(wxID_CLOSE, "&Close"); @@ -790,9 +790,9 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) file_menu->Append(wxID_PREVIEW, "Print Pre&view"); wxMenu *view_menu = new wxMenu; - view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale &Set..."); - view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto..."); - view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display &Full Scale"); + view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale S&et...\tCtrl-E"); + view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A"); + view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display F&ull Scale\tCtrl-U"); wxMenu* filter_menu = new wxMenu; filter_menu->Append (IFMENU_FILTER_INVERTVALUES, "&Invert Values"); @@ -840,7 +840,8 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) analyze_menu->Append (IFMENU_COMPARE_COL, "Compare &Column"); wxMenu *help_menu = new wxMenu; - help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); + help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1"); + help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics\tCtrl-T"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); wxMenuBar *menu_bar = new wxMenuBar; @@ -856,6 +857,19 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) subframe->Centre(wxBOTH); + wxAcceleratorEntry accelEntries[9]; + accelEntries[0].Set (wxACCEL_CTRL, static_cast('O'), wxID_OPEN); + accelEntries[1].Set (wxACCEL_CTRL, static_cast('S'), wxID_SAVE); + accelEntries[2].Set (wxACCEL_CTRL, static_cast('T'), MAINMENU_HELP_TOPICS); + accelEntries[3].Set (wxACCEL_CTRL, static_cast('P'), MAINMENU_FILE_CREATE_PHANTOM); + accelEntries[4].Set (wxACCEL_CTRL, static_cast('F'), MAINMENU_FILE_CREATE_FILTER); + accelEntries[5].Set (wxACCEL_NORMAL, WXK_F1, MAINMENU_HELP_CONTENTS); + accelEntries[6].Set (wxACCEL_CTRL, static_cast('A'), IFMENU_VIEW_SCALE_AUTO); + accelEntries[7].Set (wxACCEL_CTRL, static_cast('U'), IFMENU_VIEW_SCALE_FULL); + accelEntries[8].Set (wxACCEL_CTRL, static_cast('E'), IFMENU_VIEW_SCALE_MINMAX); + wxAcceleratorTable accelTable (9, accelEntries); + subframe->SetAcceleratorTable (accelTable); + return subframe; } @@ -1893,6 +1907,7 @@ PhantomView::CreateChildFrame(wxDocument *doc, wxView *view) process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, "&Projections..."); wxMenu *help_menu = new wxMenu; + help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); @@ -2254,6 +2269,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) reconstruct_menu->Append (PJMENU_RECONSTRUCT_FOURIER, "&Fourier..."); wxMenu *help_menu = new wxMenu; + help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); @@ -2539,6 +2555,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view) view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, "Display &Full Scale"); wxMenu *help_menu = new wxMenu; + help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About");