1 /* 2 * Copyright 2013, Gerasim Troeglazov, 3dEyes@gmail.com. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifndef CONFIG_VIEW_H 7 #define CONFIG_VIEW_H 8 9 #include "TranslatorSettings.h" 10 11 #include <View.h> 12 #include <TextView.h> 13 #include <String.h> 14 #include <GroupView.h> 15 #include <CheckBox.h> 16 #include <MenuField.h> 17 18 #define MSG_COMPRESSION_CHANGED 'cchg' 19 #define MSG_VERSION_CHANGED 'vchg' 20 21 class ConfigView : public BGroupView { 22 public: 23 ConfigView(TranslatorSettings *settings); 24 virtual ~ConfigView(); 25 26 virtual void AllAttached(); 27 virtual void MessageReceived(BMessage* message); 28 29 private: 30 void _AddItemToMenu(BMenu* menu, const char* label, 31 uint32 mess, uint32 value, uint32 current_value); 32 33 BTextView* fCopyrightView; 34 BMenuField* fCompressionField; 35 BMenuField* fVersionField; 36 37 TranslatorSettings *fSettings; 38 }; 39 40 #endif // CONFIG_VIEW_H 41