1 /* 2 * Copyright 2010-2017, Haiku, Inc. All Rights Reserved. 3 * Copyright 2009, Pier Luigi Fiorini. 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef _PREFLET_WIN_H 7 #define _PREFLET_WIN_H 8 9 10 #include <GroupView.h> 11 #include <LayoutBuilder.h> 12 #include <Message.h> 13 #include <Window.h> 14 15 #include "SettingsHost.h" 16 17 class BButton; 18 19 class PrefletView; 20 21 class PrefletWin : public BWindow, public SettingsHost { 22 public: 23 PrefletWin(); 24 25 virtual bool QuitRequested(); 26 virtual void MessageReceived(BMessage* msg); 27 28 virtual void SettingChanged(bool showExample); 29 void ReloadSettings(); 30 31 private: 32 status_t _Revert(); 33 bool _RevertPossible(); 34 status_t _Defaults(); 35 bool _DefaultsPossible(); 36 void _SendExampleNotification(); 37 38 PrefletView* fMainView; 39 BGroupView* fButtonsView; 40 BButton* fDefaults; 41 BButton* fRevert; 42 BGroupLayout* fButtonsLayout; 43 }; 44 45 #endif // _PREFLET_WIN_H 46