AeIntFieldUI.h
1.68 KB
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
#ifndef __AeIntFieldUI__
#define __AeIntFieldUI__
#include "AeFieldUI.h"
class AeIntFieldUI : public AeFieldUI
{
public:
AeIntFieldUI (const char * name,
Boolean isEditable,
Boolean isSelectable,
Boolean isHierarchical,
TJustify justify,
TIntGetProc getProc,
TIntSetProc setProc);
AeIntFieldUI (const char * name,
Boolean isEditable,
Boolean isSelectable,
Boolean isHierarchical,
TJustify justify,
TIntGetProc getProc,
TIntSetProc setProc,
int min, int max, int def);
virtual ~AeIntFieldUI (void);
virtual int GetMin (AeAsset *) { return fMin; }
virtual int GetMax (AeAsset *) { return fMax; }
virtual void GetValueString (AeAsset *, String);
virtual Boolean SetValueString (AeAsset *, String);
virtual Boolean VerifyValueString (String);
virtual Boolean VerifyInput (XmTextVerifyCallbackStruct *, const char * prevStr);
virtual Boolean HandleButtonPress (AeBinEditor *, AeAssetUI *, XEvent *, TEditModifier);
virtual void HandleDoubleClick (AeBinEditor *, AeAssetUI *, XEvent *, TEditModifier);
protected:
void getBallisticsConsts (AeAssetUI *, int * pDelta,
int * pMin, int * pMax);
void getBallistics (int speed, int linearDelta,
int * delta, int * divisor);
Boolean incrementValue (AeBinEditor *, AeAssetUI *,
int delta, int min, int max);
Boolean issign (char c, int pos) { return pos == 0 && (c == '-' || c == '+'); }
TIntGetProc fGetProc;
TIntSetProc fSetProc;
int fMin;
int fMax;
int fDefault;
};
#endif