2 * Copyright 2002-2013 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
6 * Ithamar R. Adema <ithamar@unet.nl>
7 * Stephan Aßmus <superstippi@gmx.de>
13 #include <DiskDeviceRoster.h>
14 #include <PopUpMenu.h>
20 class BColumnListView
;
28 class PartitionListView
;
32 MSG_SELECTED_PARTITION_ID
= 'spid',
33 MSG_UPDATE_ZOOM_LIMITS
= 'uzls'
37 class MainWindow
: public BWindow
{
40 virtual ~MainWindow();
43 virtual bool QuitRequested();
44 virtual void MessageReceived(BMessage
* message
);
47 status_t
StoreSettings(BMessage
* archive
) const;
48 status_t
RestoreSettings(BMessage
* archive
);
49 void ApplyDefaultSettings();
54 void _AdaptToSelectedPartition();
55 void _SetToDiskAndPartition(partition_id diskID
,
56 partition_id partitionID
,
57 partition_id parentID
);
58 void _UpdateMenus(BDiskDevice
* disk
,
59 partition_id selectedPartition
,
60 partition_id parentID
);
62 void _DisplayPartitionError(BString message
,
63 const BPartition
* partition
= NULL
,
64 status_t error
= B_OK
) const;
66 void _Mount(BDiskDevice
* disk
,
67 partition_id selectedPartition
);
68 void _Unmount(BDiskDevice
* disk
,
69 partition_id selectedPartition
);
72 void _Initialize(BDiskDevice
* disk
,
73 partition_id selectedPartition
,
74 const BString
& diskSystemName
);
75 void _Create(BDiskDevice
* disk
,
76 partition_id selectedPartition
);
77 void _Delete(BDiskDevice
* disk
,
78 partition_id selectedPartition
);
79 void _ChangeParameters(BDiskDevice
* disk
,
80 partition_id selectedPartition
);
81 float _ColumnListViewHeight(BColumnListView
* list
,
83 void _UpdateWindowZoomLimits();
86 BDiskDeviceRoster fDiskDeviceRoster
;
87 BDiskDevice
* fCurrentDisk
;
88 partition_id fCurrentPartitionID
;
90 PartitionListView
* fListView
;
93 SpaceIDMap fSpaceIDMap
;
98 BMenu
* fPartitionMenu
;
103 BMenuItem
* fWipeMenuItem
;
104 BMenuItem
* fEjectMenuItem
;
105 BMenuItem
* fSurfaceTestMenuItem
;
106 BMenuItem
* fRescanMenuItem
;
108 BMenuItem
* fCreateMenuItem
;
109 BMenuItem
* fChangeMenuItem
;
110 BMenuItem
* fDeleteMenuItem
;
111 BMenuItem
* fMountMenuItem
;
112 BMenuItem
* fUnmountMenuItem
;
113 BMenuItem
* fMountAllMenuItem
;
115 BMenu
* fFormatContextMenuItem
;
116 BMenuItem
* fCreateContextMenuItem
;
117 BMenuItem
* fChangeContextMenuItem
;
118 BMenuItem
* fDeleteContextMenuItem
;
119 BMenuItem
* fMountContextMenuItem
;
120 BMenuItem
* fUnmountContextMenuItem
;
121 BPopUpMenu
* fContextMenu
;
125 #endif // MAIN_WINDOW_H