1 /* 2 * Copyright 2009, Axel Dörfler, axeld@pinc-software.de. 3 * Copyright 2011, Philippe Saint-Pierre, stpere@gmail.com. 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef CHARACTER_WINDOW_H 7 #define CHARACTER_WINDOW_H 8 9 10 #include <Messenger.h> 11 #include <Window.h> 12 13 class BFile; 14 class BListView; 15 class BMenu; 16 class BMenuItem; 17 class BSlider; 18 class BStringView; 19 class BTextControl; 20 class CharacterView; 21 class UnicodeBlockView; 22 23 24 class CharacterWindow : public BWindow { 25 public: 26 CharacterWindow(); 27 virtual ~CharacterWindow(); 28 29 virtual void MessageReceived(BMessage* message); 30 virtual bool QuitRequested(); 31 32 private: 33 status_t _OpenSettings(BFile& file, uint32 mode); 34 status_t _LoadSettings(BMessage& settings); 35 status_t _SaveSettings(); 36 37 void _SetFont(const char* family, const char* style); 38 BMenu* _CreateFontMenu(); 39 void _UpdateFontMenu(BMenu* menu); 40 void MenusBeginning(); 41 private: 42 BTextControl* fFilterControl; 43 UnicodeBlockView* fUnicodeBlockView; 44 CharacterView* fCharacterView; 45 BMenuItem* fSelectedFontItem; 46 BSlider* fFontSizeSlider; 47 BStringView* fGlyphView; 48 BStringView* fCodeView; 49 BMenu* fFontMenu; 50 }; 51 52 #endif // CHARACTER_WINDOW_H 53