| 397 | } |
| 398 | |
| 399 | void init_classes() { |
| 400 | INITCOMMONCONTROLSEX icc; |
| 401 | |
| 402 | icc.dwSize = sizeof(icc); |
| 403 | icc.dwICC = ICC_WIN95_CLASSES; |
| 404 | InitCommonControlsEx(&icc); |
| 405 | |
| 406 | InitCheckedListBox(static_cast<HINSTANCE>(h_module)); |
| 407 | |
| 408 | settings = std::make_unique<Settings>(ini_file_path); |
| 409 | settings->settings_changed.connect(on_settings_changed); |
| 410 | |
| 411 | speller_container = std::make_unique<SpellerContainer>(settings.get(), &npp_data); |
| 412 | |
| 413 | spell_checker = std::make_unique<SpellChecker>(settings.get(), *npp, *speller_container); |
| 414 | |
| 415 | context_menu_handler = std::make_unique<ContextMenuHandler>(*settings, *speller_container, *npp, *spell_checker); |
| 416 | |
| 417 | suggestions_button = std::make_unique<SuggestionMenuButton>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *npp, *context_menu_handler, *settings); |
| 418 | suggestions_button->do_dialog(); |
| 419 | |
| 420 | settings_dlg = std::make_unique<SettingsDialog>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *npp, *settings, *speller_container); |
| 421 | download_dics_dlg = std::make_unique<DownloadDictionariesDialog>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *settings, *speller_container); |
| 422 | |
| 423 | settings_dlg->download_dics_dlg_requested.connect([]() { download_dics_dlg->do_dialog(); }); |
| 424 | |
| 425 | about_dlg = std::make_unique<AboutDialog>(); |
| 426 | about_dlg->init(static_cast<HINSTANCE>(h_module), npp_data.npp_handle); |
| 427 | |
| 428 | progress_dlg = std::make_unique<ProgressDialog>(*download_dics_dlg); |
| 429 | progress_dlg->init(static_cast<HINSTANCE>(h_module), npp_data.npp_handle); |
| 430 | |
| 431 | lang_list_instance = std::make_unique<SelectMultipleLanguagesDialog>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *settings, *speller_container); |
| 432 | |
| 433 | select_proxy_dlg = std::make_unique<ConnectionSettingsDialog>(*settings, *download_dics_dlg); |
| 434 | select_proxy_dlg->init(static_cast<HINSTANCE>(h_module), npp_data.npp_handle); |
| 435 | |
| 436 | remove_dics_dlg = std::make_unique<RemoveDictionariesDialog>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *settings, *speller_container); |
| 437 | aspell_options_dlg = std::make_unique<AspellOptionsDialog>(static_cast<HINSTANCE>(h_module), npp_data.npp_handle, *settings, *speller_container); |
| 438 | |
| 439 | { |
| 440 | auto mut = settings->modify_without_saving(); |
| 441 | mut->load(); |
| 442 | } |
| 443 | resources_inited = true; |
| 444 | } |
| 445 | |
| 446 | void command_menu_clean_up() { |
| 447 | } |
no test coverage detected