BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / drivesetup / AbstractParametersPanel.h
blob4a83defecd9b7bf12af970c5c77c2085829f4f1a
1 /*
2 * Copyright 2008-2013 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Stephan Aßmus <superstippi@gmx.de>
7 * Axel Dörfler, axeld@pinc-software.de.
8 */
9 #ifndef ABSTRACT_PARAMETERS_PANEL_H
10 #define ABSTRACT_PARAMETERS_PANEL_H
13 #include <LayoutBuilder.h>
14 #include <Partition.h>
15 #include <PartitionParameterEditor.h>
16 #include <Window.h>
18 #include "Support.h"
21 class BMenuField;
22 class BTextControl;
25 class AbstractParametersPanel : public BWindow {
26 public:
27 AbstractParametersPanel(BWindow* window);
28 virtual ~AbstractParametersPanel();
30 virtual bool QuitRequested();
31 virtual void MessageReceived(BMessage* message);
33 status_t Go(BString& parameters);
34 void Cancel();
36 protected:
37 void Init(B_PARAMETER_EDITOR_TYPE type,
38 const BString& diskSystem,
39 BPartition* partition);
40 status_t Go(BString& parameters, BMessage& storage);
42 virtual bool NeedsEditor() const;
43 virtual bool ValidWithoutEditor() const;
44 virtual status_t ParametersReceived(const BString& parameters,
45 BMessage& storage);
46 virtual void AddControls(BLayoutBuilder::Group<>& builder,
47 BView* editorView);
49 protected:
50 BButton* fOkButton;
51 status_t fReturnStatus;
53 BPartitionParameterEditor* fEditor;
55 private:
56 class EscapeFilter;
57 EscapeFilter* fEscapeFilter;
58 sem_id fExitSemaphore;
59 BWindow* fWindow;
63 #endif // ABSTRACT_PARAMETERS_PANEL_H