blob: fad1d670843f0b1f856c904c2da007e500d1dce5 (
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
|
#include "globals.h"
#include "IconFieldState.h"
#define ICON_SIZE 16
IconFieldState::IconFieldState(DialogState *dialog, IconField *field)
: FieldState(dialog, field)
{
}
IconFieldState::~IconFieldState()
{
}
IconField * IconFieldState::getField() const
{
return (IconField *) FieldState::getField();
}
Size IconFieldState::getPreferedSize() const
{
if (getIcon() == NULL)
return Size(0, 0);
return Size(ICON_SIZE, ICON_SIZE);
}
HICON IconFieldState::getIcon() const
{
return getField()->getIcon();
}
bool IconFieldState::isEmpty() const
{
return getIcon() == NULL;
}
|