#if !defined RQEDIT_H
#define RQEDIT_H
#include <windows.h>
#include "rqfont.h"
#include "rqcontrol.h"
#include "rqdefs.h"
class RQEdit: public RQControl
{
private:
char *text;
bool readOnly;
word maxLength;
HWND handle;
protected:
void messageHandler(HWND, UINT, WPARAM, LPARAM);
RQControl* getParent() { return parent; }
public:
RQEdit();
RQEdit(char*);
~RQEdit();
RQFont font;
void setParent(RQControl&);
void setAlign(ALIGN);
ALIGN getAlign();
void setText(char*);
char const* getText();
void setReadOnly(bool);
bool getReadOnly();
void setMaxLength(word);
word getMaxLength();
void setSelStart(int32);
int32 getSelStart();
void setSelLength(int32);
int32 getSelLength();
HWND getHandle() { return handle; }
void (*onChange)(RQEdit&);
void (*onKeyDown)(int vk, int shifts, RQEdit&);
void (*onKeyPress)(byte ch, RQEdit&);
void (*onKeyUp)(int vk, int shifts, RQEdit&);
};
#endif
|