forked from Ares-Developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 25
/
EditClass.h
49 lines (40 loc) · 1.1 KB
/
EditClass.h
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
#pragma once
#include <ControlClass.h>
#include <GeneralStructures.h>
// Accept Alpha, Digit, and other characters, ToUpper will convert alpha into upper-case
enum class EditFlag : int
{
Alpha = 0x1,
Digit = 0x2,
Other = 0x4,
ToUpper = 0x8
};
class NOVTABLE EditClass : public ControlClass
{
public:
//EditClass
virtual void SetText(wchar_t* lpStr, int nMaxLength) RX;
virtual wchar_t* GetText() R0;
virtual void DrawBackground() RX;
virtual void DrawText(wchar_t* lpStr) RX;
virtual bool HandleKeyInput(int nASCII) R0;
//Non virtual
//Statics
//Constructors
EditClass(int ID, wchar_t* Text, int nMaxLength, TextPrintType eTextFlag, int X, int Y, int Width, int Height, EditFlag eEditFlag) noexcept
: ControlClass(noinit_t()) { JMP_THIS(0x4C2FC0); }
protected:
explicit __forceinline EditClass(noinit_t) noexcept
: ControlClass(noinit_t())
{
}
//Properties
public:
TextPrintType TextFlags;
EditFlag EditFlags; // 1 for alpha only; 2 for digit only; 4 for not num nor alpha accepted; 8 to convert alpha into upper case
wchar_t* Text;
int MaxLength;
int Length;
int Color;
bool IsReadOnly;
};