1 /* 2 * Copyright 2008-2009, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef ACTIVITY_WINDOW_H 6 #define ACTIVITY_WINDOW_H 7 8 9 #include <Messenger.h> 10 #include <Window.h> 11 12 class BFile; 13 class BGroupLayout; 14 class BMenuItem; 15 class ActivityView; 16 17 18 class ActivityWindow : public BWindow { 19 public: 20 ActivityWindow(); 21 virtual ~ActivityWindow(); 22 23 virtual void MessageReceived(BMessage* message); 24 virtual bool QuitRequested(); 25 26 int32 ActivityViewCount() const; 27 ActivityView* ActivityViewAt(int32 index) const; 28 void BroadcastToActivityViews(BMessage* message, 29 BView* exceptToView = NULL); 30 31 bigtime_t RefreshInterval() const; 32 bool IsAlwaysOnTop() const; 33 34 private: 35 status_t _OpenSettings(BFile& file, uint32 mode); 36 status_t _LoadSettings(BMessage& settings); 37 status_t _SaveSettings(); 38 39 void _AddDefaultView(); 40 void _MessageDropped(BMessage *message); 41 void _SetAlwaysOnTop(bool alwaysOnTop); 42 43 BMenuItem* fAlwaysOnTop; 44 #ifdef __HAIKU__ 45 BGroupLayout* fLayout; 46 #endif 47 BMessenger fSettingsWindow; 48 49 }; 50 51 static const uint32 kMsgRemoveView = 'rmvw'; 52 53 #endif // ACTIVITY_WINDOW_H 54