/
CreateParametersPanel.h
59 lines (45 loc) · 1.42 KB
/
CreateParametersPanel.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
/*
* 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.
* Bryce Groff <bgroff@hawaii.edu>
*/
#ifndef CREATE_PARAMS_PANEL_H
#define CREATE_PARAMS_PANEL_H
#include "AbstractParametersPanel.h"
class BMenuField;
class BPopUpMenu;
class BTextControl;
class SizeSlider;
class CreateParametersPanel : public AbstractParametersPanel {
public:
CreateParametersPanel(BWindow* window,
BPartition* parent, off_t offset,
off_t size);
virtual ~CreateParametersPanel();
status_t Go(off_t& offset, off_t& size, BString& name,
BString& type, BString& parameters);
virtual void MessageReceived(BMessage* message);
protected:
virtual bool NeedsEditor() const;
virtual status_t ParametersReceived(const BString& parameters,
BMessage& storage);
virtual void AddControls(BLayoutBuilder::Group<>& builder,
BView* editorView);
private:
void _CreateViewControls(BPartition* parent,
off_t offset, off_t size);
void _UpdateSizeTextControl();
private:
BPopUpMenu* fTypePopUpMenu;
BMenuField* fTypeMenuField;
BTextControl* fNameTextControl;
SizeSlider* fSizeSlider;
BTextControl* fSizeTextControl;
bool fSupportsName;
bool fSupportsType;
};
#endif // CREATE_PARAMS_PANEL_H