AeStringFieldUI.c++
1004 Bytes
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
#include <assert.h>
#include <string.h>
#include "AeTypes.h"
#include "AeFieldUI.h"
#include "AeAsset.h"
#include "AeAssetUI.h"
AeStringFieldUI::AeStringFieldUI (const char * name,
Boolean isEditable,
Boolean isSelectable,
Boolean isHierarchical,
Boolean isCommon,
TJustify justify,
TStringGetProc getProc,
TStringSetProc setProc) :
AeFieldUI (name, isEditable, isSelectable, isHierarchical, isCommon, justify, kStringMaxLen)
{
fGetProc = getProc;
fSetProc = setProc;
}
AeStringFieldUI::~AeStringFieldUI (void)
{
}
void
AeStringFieldUI::GetValueString (AeAsset * asset, String string)
{
String value = fGetProc (asset);
strcpy (string, value);
}
Boolean
AeStringFieldUI::SetValueString (AeAsset * asset, String string)
{
assert (fSetProc);
if (!strcmp (string, fGetProc (asset)))
return False;
fSetProc (asset, string);
return True;
}
Boolean
AeStringFieldUI::VerifyValueString (String string)
{
return True;
}