btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / installer / InstallerWindow.h
blobd6be378153295146cc8dcb488a02466dad2fed32
1 /*
2 * Copyright 2009-2010, Stephan Aßmus <superstippi@gmx.de>
3 * Copyright 2005, Jérôme DUVAL
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef INSTALLER_WINDOW_H
7 #define INSTALLER_WINDOW_H
10 #include <String.h>
11 #include <Window.h>
14 namespace BPrivate {
15 class PaneSwitch;
17 using namespace BPrivate;
19 class BButton;
20 class BLayoutItem;
21 class BMenu;
22 class BMenuField;
23 class BMenuItem;
24 class BStatusBar;
25 class BStringView;
26 class BTextView;
27 class PackagesView;
28 class WorkerThread;
30 enum InstallStatus {
31 kReadyForInstall,
32 kInstalling,
33 kFinished,
34 kCancelled
38 class InstallerWindow : public BWindow {
39 public:
40 InstallerWindow();
41 virtual ~InstallerWindow();
43 virtual void MessageReceived(BMessage* message);
44 virtual bool QuitRequested();
46 private:
47 void _ShowOptionalPackages();
48 void _LaunchDriveSetup();
49 void _LaunchBootManager();
50 void _DisableInterface(bool disable);
51 void _ScanPartitions();
52 void _UpdateControls();
53 void _PublishPackages();
54 void _SetStatusMessage(const char* text);
56 void _SetCopyEngineCancelSemaphore(sem_id id,
57 bool alreadyLocked = false);
58 void _QuitCopyEngine(bool askUser);
60 static int _ComparePackages(const void* firstArg,
61 const void* secondArg);
63 BTextView* fStatusView;
64 BMenu* fSrcMenu;
65 BMenu* fDestMenu;
66 BMenuField* fSrcMenuField;
67 BMenuField* fDestMenuField;
69 PaneSwitch* fPackagesSwitch;
70 PackagesView* fPackagesView;
71 BStringView* fSizeView;
73 BStatusBar* fProgressBar;
75 BLayoutItem* fPkgSwitchLayoutItem;
76 BLayoutItem* fPackagesLayoutItem;
77 BLayoutItem* fSizeViewLayoutItem;
78 BLayoutItem* fProgressLayoutItem;
80 BButton* fBeginButton;
81 BButton* fLaunchDriveSetupButton;
82 BMenuItem* fLaunchBootManagerItem;
83 BMenuItem* fMakeBootableItem;
85 bool fEncouragedToSetupPartitions;
87 bool fDriveSetupLaunched;
88 bool fBootManagerLaunched;
89 InstallStatus fInstallStatus;
91 WorkerThread* fWorkerThread;
92 BString fLastStatus;
93 sem_id fCopyEngineCancelSemaphore;
97 #endif // INSTALLER_WINDOW_H