// Create menus
- int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1, -1, 0 );
- int editMenu = createMenu( tr( "MEN_DESK_EDIT" ), -1, -1, 10 );
- int viewMenu = createMenu( tr( "MEN_DESK_VIEW" ), -1, -1, 10 );
- int helpMenu = createMenu( tr( "MEN_DESK_HELP" ), -1, -1, 1000 );
+ int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1, MenuFileId, 0 );
+ int editMenu = createMenu( tr( "MEN_DESK_EDIT" ), -1, MenuEditId, 10 );
+ int viewMenu = createMenu( tr( "MEN_DESK_VIEW" ), -1, MenuViewId, 10 );
+ int helpMenu = createMenu( tr( "MEN_DESK_HELP" ), -1, MenuHelpId, 1000 );
// Create menu items
- createMenu( FileNewId, fileMenu, 0 );
- createMenu( FileOpenId, fileMenu, 0 );
- createMenu( FileLoadId, fileMenu, 0 ); //SRN: BugID IPAL9021, add a menu item "Load"
- createMenu( FileCloseId, fileMenu, 0 );
- createMenu( separator(), fileMenu, -1, 0 );
- createMenu( FileSaveId, fileMenu, 0 );
+ createMenu( FileNewId, fileMenu, 0 );
+ createMenu( FileOpenId, fileMenu, 0 );
+ createMenu( FileLoadId, fileMenu, 0 ); //SRN: BugID IPAL9021, add a menu item "Load"
+ createMenu( FileCloseId, fileMenu, 0 );
+ createMenu( separator(), fileMenu, -1, 0 );
+ createMenu( FileSaveId, fileMenu, 0 );
createMenu( FileSaveAsId, fileMenu, 0 );
- createMenu( separator(), fileMenu, -1, 0 );
+ createMenu( separator(), fileMenu, -1, 0 );
- createMenu( separator(), fileMenu );
- createMenu( FileExitId, fileMenu );
+ createMenu( separator(), fileMenu );
+ createMenu( FileExitId, fileMenu );
- createMenu( EditCopyId, editMenu );
+ createMenu( EditCopyId, editMenu );
createMenu( EditPasteId, editMenu );
createMenu( separator(), editMenu );
- createMenu( ViewWindowsId, viewMenu );
+ createMenu( ViewWindowsId, viewMenu );
createMenu( ViewStatusBarId, viewMenu );
- createMenu( separator(), viewMenu );
+ createMenu( separator(), viewMenu );
createMenu( HelpAboutId, helpMenu );
createMenu( separator(), helpMenu );
for ( int i = EditCopyId; i <= EditPasteId; i++ )
{
- mMgr->setShown( i, myEditEnabled );
- tMgr->setShown( i, myEditEnabled );
+ mMgr->setShown( mMgr->actionId(action(i)), myEditEnabled );
+ tMgr->setShown( tMgr->actionId(action(i)), myEditEnabled );
}
}
virtual void onViewManagerActivated( SUIT_ViewManager* );
protected:
- enum { FileNewId, FileOpenId, FileCloseId, FileSaveId, FileSaveAsId,
- FileExitId, EditCutId, EditCopyId, EditPasteId, ViewStatusBarId,
- NewWindowId, HelpAboutId, ViewWindowsId, FileLoadId, UserID };
+ enum { MenuFileId = 1,
+ MenuViewId = 2,
+ MenuEditId = 3,
+ MenuHelpId = 7
+ };
+
+ enum { FileNewId, FileOpenId, FileLoadId, FileCloseId,
+ FileSaveId, FileSaveAsId, FileExitId,
+ ViewStatusBarId, ViewWindowsId, NewWindowId,
+ EditCutId, EditCopyId, EditPasteId,
+ HelpAboutId,
+ UserID
+ };
protected:
virtual void createActions();