1 /* 2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef PROGRESS_WINDOW_H 6 #define PROGRESS_WINDOW_H 7 8 9 #include <Window.h> 10 11 class BMessageRunner; 12 class BStatusBar; 13 14 15 class ProgressWindow : public BWindow { 16 public: 17 ProgressWindow(BWindow* referenceWindow, BMessage* abortMessage = NULL); 18 virtual ~ProgressWindow(); 19 20 virtual void MessageReceived(BMessage *message); 21 22 void Start(BWindow* referenceWindow); 23 void Stop(); 24 25 private: 26 void _Center(BWindow* referenceWindow); 27 28 BStatusBar* fStatusBar; 29 BMessageRunner* fRunner; 30 bool fRetrievedUpdate; 31 bool fRetrievedShow; 32 }; 33 34 static const uint32 kMsgProgressStatusUpdate = 'SIup'; 35 36 #endif // PROGRESS_WINDOW_H 37