/
AbstractParametersPanel.h
63 lines (47 loc) · 1.44 KB
/
AbstractParametersPanel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Copyright 2008-2013 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
* Axel Dörfler, axeld@pinc-software.de.
*/
#ifndef ABSTRACT_PARAMETERS_PANEL_H
#define ABSTRACT_PARAMETERS_PANEL_H
#include <LayoutBuilder.h>
#include <Partition.h>
#include <PartitionParameterEditor.h>
#include <Window.h>
#include "Support.h"
class BMenuField;
class BTextControl;
class AbstractParametersPanel : public BWindow {
public:
AbstractParametersPanel(BWindow* window);
virtual ~AbstractParametersPanel();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage* message);
status_t Go(BString& parameters);
void Cancel();
protected:
void Init(B_PARAMETER_EDITOR_TYPE type,
const BString& diskSystem,
BPartition* partition);
status_t Go(BString& parameters, BMessage& storage);
virtual bool NeedsEditor() const;
virtual bool ValidWithoutEditor() const;
virtual status_t ParametersReceived(const BString& parameters,
BMessage& storage);
virtual void AddControls(BLayoutBuilder::Group<>& builder,
BView* editorView);
protected:
BButton* fOkButton;
status_t fReturnStatus;
BPartitionParameterEditor* fEditor;
private:
class EscapeFilter;
EscapeFilter* fEscapeFilter;
sem_id fExitSemaphore;
BWindow* fWindow;
};
#endif // ABSTRACT_PARAMETERS_PANEL_H