summaryrefslogtreecommitdiff
path: root/Plugins/skins/SkinLib/DialogState.h
blob: 08b98d6ecc2f533d65e23951781f22b2091a8e5f (plain)
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
#ifndef __DIALOG_STATE_H__
# define __DIALOG_STATE_H__

#include "Dialog.h"
#include "FieldState.h"
#include "BorderState.h"


/// This have to be deleted before the owning dialog
/// It is responsible for freeing the FieldStates
class DialogState
{
public:
	~DialogState();

	Dialog * getDialog() const;

	std::vector<FieldState *> fields;
	FieldState * getField(const char *name) const;

	int getWidth() const;
	void setWidth(int width);

	int getHeight() const;
	void setHeight(int height);

	BorderState * getBorders();
	const BorderState * getBorders() const;

private:
	DialogState(Dialog *dialog);

	Dialog *dialog;

	Size size;
	BorderState borders;

	int getHorizontalBorders() const;
	int getVerticalBorders() const;

	friend class Dialog;
};


#endif // __DIALOG_STATE_H__