static void Main() { const Waypoints way_points; InterfaceBlackboard blackboard; blackboard.SetComputerSettings().SetDefaults(); blackboard.SetComputerSettings().polar.glide_polar_task = GlidePolar(fixed(1)); blackboard.SetUISettings().SetDefaults(); TaskBehaviour task_behaviour; task_behaviour.SetDefaults(); TaskManager task_manager(task_behaviour, way_points); task_manager.SetGlidePolar(blackboard.GetComputerSettings().polar.glide_polar_task); GlideComputerTaskEvents task_events; task_manager.SetTaskEvents(task_events); Airspaces airspace_database; ProtectedTaskManager protected_task_manager(task_manager, blackboard.GetComputerSettings().task); LoadFiles(airspace_database); const TaskFactoryType task_type_default = blackboard.GetComputerSettings().task.task_type_default; OrderedTask *task = protected_task_manager.TaskCreateDefault(&way_points, task_type_default); if (task != nullptr) { protected_task_manager.TaskCommit(*task); delete task; } GlideComputer glide_computer(way_points, airspace_database, protected_task_manager, task_events); glide_computer.ReadComputerSettings(blackboard.GetComputerSettings()); glide_computer.SetTerrain(terrain); glide_computer.SetContestIncremental(false); glide_computer.Initialise(); LoadReplay(replay, glide_computer, blackboard); delete replay; SingleWindow main_window; main_window.Create(_T("RunAnalysis"), {640, 480}); dlgAnalysisShowModal(main_window, *look, blackboard, glide_computer, &protected_task_manager, &airspace_database, terrain); delete terrain; }
static void OnAnalysisClicked(WindowControl * Sender, WndListFrame::ListInfo_t *ListInfo){ (void)Sender; (void)ListInfo; wf->SetVisible(false); dlgAnalysisShowModal(ANALYSIS_PAGE_TASK); wf->SetVisible(true); }
static void ShowAnalysis8() { dlgAnalysisShowModal(UIGlobals::GetMainWindow(), UIGlobals::GetLook(), CommonInterface::Full(), *glide_computer, &airspace_database, terrain, AnalysisPage::OLC); }
// Analysis // Displays the analysis/statistics dialog // See the analysis dialog section of the reference manual // for more info. void InputEvents::eventAnalysis(gcc_unused const TCHAR *misc) { dlgAnalysisShowModal(*CommonInterface::main_window, CommonInterface::main_window->GetLook(), CommonInterface::Full(), *glide_computer, &airspace_database, terrain); }
bool InfoBoxContentBarogram::HandleKey(const InfoBoxKeyCodes keycode) { switch (keycode) { case ibkEnter: dlgAnalysisShowModal(XCSoarInterface::main_window, 0); return true; case ibkUp: case ibkDown: case ibkLeft: case ibkRight: break; } return false; }
bool InfoBoxContentOLC::HandleKey(const InfoBoxKeyCodes keycode) { switch (keycode) { case ibkEnter: dlgAnalysisShowModal(XCSoarInterface::main_window, *CommonInterface::main_window.look, CommonInterface::Full(), *glide_computer, protected_task_manager, &airspace_database, terrain, 8); return true; default: break; } return false; }
bool InfoBoxContentBarogram::HandleKey(const InfoBoxKeyCodes keycode) { switch (keycode) { case ibkEnter: dlgAnalysisShowModal(UIGlobals::GetMainWindow(), UIGlobals::GetLook(), CommonInterface::Full(), *glide_computer, protected_task_manager, &airspace_database, terrain, 0); return true; case ibkUp: case ibkDown: case ibkLeft: case ibkRight: break; } return false; }
static void OnAnalysisClicked(WndButton* pWnd){ wf->SetVisible(false); dlgAnalysisShowModal(ANALYSIS_PAGE_TASK); wf->SetVisible(true); }
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, #ifdef _WIN32_WCE LPWSTR lpCmdLine, #else LPSTR lpCmdLine2, #endif int nCmdShow) #endif { #ifdef WIN32 Args args(GetCommandLine(), "DRIVER FILE"); #else Args args(argc, argv, "DRIVER FILE"); #endif DebugReplay *replay = CreateDebugReplay(args); if (replay == NULL) return EXIT_FAILURE; args.ExpectEnd(); InitialiseDataPath(); Profile::SetFiles(_T("")); Profile::Load(); const Waypoints way_points; InterfaceBlackboard blackboard; blackboard.SetComputerSettings().SetDefaults(); GlideComputerTaskEvents task_events; TaskManager task_manager(way_points); task_manager.SetTaskEvents(task_events); Airspaces airspace_database; AirspaceWarningManager airspace_warning(airspace_database); ProtectedTaskManager protected_task_manager(task_manager, blackboard.GetComputerSettings().task); LoadFiles(airspace_database); GlideComputer glide_computer(way_points, airspace_database, protected_task_manager, task_events); glide_computer.SetTerrain(terrain); glide_computer.Initialise(); glide_computer.ReadComputerSettings(blackboard.GetComputerSettings()); ScreenGlobalInit screen_init; LoadReplay(replay, glide_computer, blackboard); delete replay; #ifdef WIN32 ResourceLoader::Init(hInstance); #endif Layout::Initialize(640, 480); SingleWindow main_window; main_window.set(_T("STATIC"), _T("RunAnalysis"), PixelRect{0, 0, 640, 480}); Fonts::Initialize(); dialog_settings.SetDefaults(); Look *look = new Look(); look->Initialise(); look->InitialiseConfigured(blackboard.GetUISettings()); SetXMLDialogLook(look->dialog); dialog_look = &look->dialog; main_window.show(); dlgAnalysisShowModal(main_window, *look, blackboard, glide_computer, &protected_task_manager, &airspace_database, terrain); delete look; Fonts::Deinitialize(); delete terrain; DeinitialiseDataPath(); return 0; }