xref: /haiku/src/apps/drivesetup/CreateParametersPanel.h (revision 68ea01249e1e2088933cb12f9c28d4e5c5d1c9ef)
1 /*
2  * Copyright 2008-2013 Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT license.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  *		Axel Dörfler, axeld@pinc-software.de.
8  *		Bryce Groff	  <bgroff@hawaii.edu>
9  */
10 #ifndef CREATE_PARAMS_PANEL_H
11 #define CREATE_PARAMS_PANEL_H
12 
13 
14 #include "ChangeParametersPanel.h"
15 
16 
17 class SizeSlider;
18 
19 
20 class CreateParametersPanel : public ChangeParametersPanel {
21 public:
22 								CreateParametersPanel(BWindow* window,
23 									BPartition* parent, off_t offset,
24 									off_t size);
25 	virtual						~CreateParametersPanel();
26 
27 			status_t			Go(off_t& offset, off_t& size, BString& name,
28 									BString& type, BString& parameters);
29 
30 	virtual	void				MessageReceived(BMessage* message);
31 
32 protected:
33 	virtual bool				NeedsEditor() const;
34 	virtual status_t			ParametersReceived(const BString& parameters,
35 									BMessage& storage);
36 	virtual	void				AddControls(BLayoutBuilder::Group<>& builder,
37 									BView* editorView);
38 
39 private:
40 			void 				_CreateCreateControls(BPartition* parent,
41 									off_t offset, off_t size);
42 
43 			void				_UpdateSizeTextControl();
44 
45 private:
46 			SizeSlider*			fSizeSlider;
47 			BTextControl*		fSizeTextControl;
48 };
49 
50 
51 #endif // CREATE_PARAMS_PANEL_H
52