- wxMenu *file_menu = new wxMenu;
-
- file_menu->Append(TEST_CLEAR, "&Clear log\tCtrl-L");
- file_menu->AppendSeparator();
- file_menu->Append(TEST_ABOUT, "&About");
- file_menu->AppendSeparator();
- file_menu->Append(TEST_QUIT, "E&xit\tAlt-X");
- wxMenuBar *menu_bar = new wxMenuBar;
- menu_bar->Append(file_menu, "&File");
-
- wxMenu *thread_menu = new wxMenu;
- thread_menu->Append(TEST_START_THREAD, "&Start a new thread\tCtrl-N");
- thread_menu->Append(TEST_START_THREADS, "Start &many threads at once");
- thread_menu->Append(TEST_STOP_THREAD, "S&top a running thread\tCtrl-S");
- thread_menu->AppendSeparator();
- thread_menu->Append(TEST_PAUSE_THREAD, "&Pause a running thread\tCtrl-P");
- thread_menu->Append(TEST_RESUME_THREAD, "&Resume suspended thread\tCtrl-R");
- thread_menu->AppendSeparator();
- thread_menu->Append(TEST_START_WORKER, "Start &worker thread\tCtrl-W");
-
- menu_bar->Append(thread_menu, "&Thread");
- frame->SetMenuBar(menu_bar);
+ wxMenuBar *menuBar = new wxMenuBar;
+
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(THREAD_CLEAR, "&Clear log\tCtrl-L");
+ menuFile->AppendSeparator();
+ menuFile->Append(THREAD_QUIT, "E&xit\tAlt-X");
+ menuBar->Append(menuFile, "&File");
+
+ wxMenu *menuThread = new wxMenu;
+ menuThread->Append(THREAD_START_THREAD, "&Start a new thread\tCtrl-N");
+ menuThread->Append(THREAD_START_THREADS, "Start &many threads at once");
+ menuThread->Append(THREAD_STOP_THREAD, "S&top a running thread\tCtrl-S");
+ menuThread->AppendSeparator();
+ menuThread->Append(THREAD_PAUSE_THREAD, "&Pause a running thread\tCtrl-P");
+ menuThread->Append(THREAD_RESUME_THREAD, "&Resume suspended thread\tCtrl-R");
+ menuThread->AppendSeparator();
+ menuThread->Append(THREAD_START_WORKER, "Start &worker thread\tCtrl-W");
+ menuBar->Append(menuThread, "&Thread");
+
+ wxMenu *menuExec = new wxMenu;
+ menuExec->Append(THREAD_EXEC_MAIN, "&Launch a program from main thread\tF5");
+ menuExec->Append(THREAD_EXEC_THREAD, "L&aunch a program from a thread\tCtrl-F5");
+ menuBar->Append(menuExec, "&Execute");
+
+ wxMenu *menuHelp = new wxMenu;
+ menuHelp->Append(THREAD_SHOWCPUS, "&Show CPU count");
+ menuHelp->AppendSeparator();
+ menuHelp->Append(THREAD_ABOUT, "&About...");
+ menuBar->Append(menuHelp, "&Help");
+
+ frame->SetMenuBar(menuBar);