1 /* 2 * Copyright 2010, Stephan Aßmus <superstippi@gmx.de>. 3 * Copyright 2020, Panagiotis "Ivory" Vasilopoulos <git@n0toose.net> 4 * All rights reserved. Distributed under the terms of the MIT License. 5 */ 6 #ifndef BOOT_PROMPT_WINDOW_H 7 #define BOOT_PROMPT_WINDOW_H 8 9 10 #include <Window.h> 11 12 13 enum { 14 MSG_LANGUAGE_SELECTED = 'lngs', 15 MSG_KEYMAP_SELECTED = 'kmps', 16 }; 17 18 19 class BButton; 20 class BLanguage; 21 class BListView; 22 class BMenuItem; 23 class BMenuField; 24 class BStringView; 25 class BTextView; 26 27 28 class BootPromptWindow : public BWindow { 29 public: 30 BootPromptWindow(); 31 32 bool QuitRequested(); 33 virtual void MessageReceived(BMessage* message); 34 35 private: 36 void _InitCatalog(bool saveSettings); 37 void _UpdateStrings(); 38 void _UpdateKeymapsMenu(); 39 void _PopulateLanguages(); 40 void _PopulateKeymaps(); 41 void _ActivateKeymap(const BMessage* message) const; 42 status_t _GetCurrentKeymapRef(entry_ref& ref) const; 43 BMenuItem* _KeymapItemForLanguage( 44 BLanguage& language) const; 45 46 private: 47 BTextView* fInfoTextView; 48 BStringView* fLanguagesLabelView; 49 BStringView* fKeymapsMenuLabel; 50 BListView* fLanguagesListView; 51 BMenuField* fKeymapsMenuField; 52 BMenuItem* fDefaultKeymapItem; 53 BButton* fDesktopButton; 54 BButton* fInstallerButton; 55 }; 56 57 58 #endif // BOOT_PROMPT_WINDOW_H 59