xref: /haiku/src/apps/drivesetup/ChangeParametersPanel.h (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
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 CHANGE_PARAMS_PANEL_H
11 #define CHANGE_PARAMS_PANEL_H
12 
13 
14 #include "AbstractParametersPanel.h"
15 
16 
17 class BMenuField;
18 class BPopUpMenu;
19 class BTextControl;
20 
21 
22 class ChangeParametersPanel : public AbstractParametersPanel {
23 public:
24 								ChangeParametersPanel(BWindow* window,
25 									BPartition* parent);
26 	virtual						~ChangeParametersPanel();
27 
28 			status_t			Go(BString& name, BString& type,
29 									BString& parameters);
30 
31 	virtual	void				MessageReceived(BMessage* message);
32 
33 protected:
34 								ChangeParametersPanel(BWindow* window);
35 
36 			status_t			Go(BString& name, BString& type,
37 									BString& parameters, BMessage& storage);
38 			void 				CreateChangeControls(BPartition* parent);
39 
40 	virtual bool				NeedsEditor() const;
41 	virtual bool				ValidWithoutEditor() const;
42 	virtual status_t			ParametersReceived(const BString& parameters,
43 									BMessage& storage);
44 	virtual	void				AddControls(BLayoutBuilder::Group<>& builder,
45 									BView* editorView);
46 
47 protected:
48 			BPopUpMenu*			fTypePopUpMenu;
49 			BMenuField*			fTypeMenuField;
50 			BTextControl*		fNameTextControl;
51 			bool				fSupportsName;
52 			bool				fSupportsType;
53 };
54 
55 
56 #endif // CHANGE_PARAMS_PANEL_H
57