repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / webpositive / DownloadWindow.h
blob3b6dec5a86e9e50d8f0412a4bc6eb20bfbf2ba79
1 /*
2 * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de>
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef DOWNLOAD_WINDOW_H
7 #define DOWNLOAD_WINDOW_H
10 #include <String.h>
11 #include <Window.h>
13 class BButton;
14 class BFile;
15 class BGroupLayout;
16 class BScrollView;
17 class BWebDownload;
18 class SettingsMessage;
21 class DownloadWindow : public BWindow {
22 public:
23 DownloadWindow(BRect frame, bool visible,
24 SettingsMessage* settings);
25 virtual ~DownloadWindow();
27 virtual void DispatchMessage(BMessage* message,
28 BHandler* target);
29 virtual void MessageReceived(BMessage* message);
30 virtual bool QuitRequested();
32 bool DownloadsInProgress();
33 void SetMinimizeOnClose(bool minimize);
35 private:
36 void _DownloadStarted(BWebDownload* download);
37 void _DownloadFinished(BWebDownload* download);
38 void _RemoveFinishedDownloads();
39 void _RemoveMissingDownloads();
40 void _ValidateButtonStatus();
41 void _SaveSettings();
42 void _LoadSettings();
43 bool _OpenSettingsFile(BFile& file, uint32 mode);
45 private:
46 BScrollView* fDownloadsScrollView;
47 BGroupLayout* fDownloadViewsLayout;
48 BButton* fRemoveFinishedButton;
49 BButton* fRemoveMissingButton;
50 BString fDownloadPath;
51 bool fMinimizeOnClose;
54 #endif // DOWNLOAD_WINDOW_H