summaryrefslogtreecommitdiff
path: root/plugins/Skins/SkinLib/ControlFieldState.h
blob: 85186c304a2e054176ae92b5efdbadd43b17383f (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
#ifndef __LABEL_CONTROL_FIELD_STATE_H__
# define __LABEL_CONTROL_FIELD_STATE_H__

#include "ControlField.h"
#include "FieldState.h"
#include "FontState.h"


class ControlFieldState : public FieldState
{
public:
	virtual ~ControlFieldState();

	virtual ControlField * getField() const;

	virtual Size getPreferedSize() const = 0;

	virtual const TCHAR * getText() const;
	virtual void setText(const TCHAR *text);

	virtual FontState * getFont();
	virtual const FontState * getFont() const;

protected:
	ControlFieldState(DialogState *dialog, ControlField *field);

	virtual Size getTextPreferedSize(unsigned int format) const;

private:
	FontState font;

	bool textSet;
	std::tstring text;

	friend class ControlField;
};


#endif // __LABEL_CONTROL_FIELD_STATE_H__