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 13enum { 14 MSG_LANGUAGE_SELECTED = 'lngs', 15 MSG_KEYMAP_SELECTED = 'kmps', 16}; 17 18 19class BButton; 20class BLanguage; 21class BListView; 22class BMenuItem; 23class BMenuField; 24class BStringView; 25class BTextView; 26 27 28class BootPromptWindow : public BWindow { 29public: 30 BootPromptWindow(); 31 32 bool QuitRequested(); 33 virtual void MessageReceived(BMessage* message); 34 35private: 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 46private: 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