23 #ifndef _LAX_LINEEDIT_H
24 #define _LAX_LINEEDIT_H
26 #include <lax/textxeditbase-utf8.h>
27 #include <lax/buttondowninfo.h>
32 #include <sys/times.h>
34 #define LINEEDIT_CNTLTAB_NEXT (1<<16)
35 #define LINEEDIT_INT (1<<17)
36 #define LINEEDIT_FLOAT (1<<18)
37 #define LINEEDIT_FILE (1<<19)
41 #define LINEEDIT_SEND_ANY_CHANGE (1<<20)
42 #define LINEEDIT_SEND_FOCUS_ON (1<<21)
43 #define LINEEDIT_SEND_FOCUS_OFF (1<<22)
44 #define LINEEDIT_DESTROY_ON_ENTER (1<<23)
45 #define LINEEDIT_GRAB_ON_MAP (1<<24)
53 virtual int send(
int i);
59 int padx,pady,mostpixwide;
60 LineEdit(
anXWindow *parnt,
const char *nname,
const char *ntitle,
unsigned int nstyle,
61 int xx,
int yy,
int ww,
int hh,
int brder,
62 anXWindow *prev,
unsigned long nowner=0,
const char *nsend=NULL,
63 const char *newtext=NULL,
unsigned int ntstyle=0);
65 virtual const char *whattype() {
return "LineEdit"; }
67 virtual int Event(
const EventData *e,
const char *mes);
70 virtual void ControlActivation(
int on);
71 virtual int CharInput(
unsigned int ch,
const char *buffer,
int len,
unsigned int state,
const LaxKeyboard *d);
72 virtual int LBDown(
int x,
int y,
unsigned int state,
int count,
const LaxMouse *d);
73 virtual int LBUp(
int x,
int y,
unsigned int ,
const LaxMouse *d);
74 virtual int RBDown(
int x,
int y,
unsigned int ,
int count,
const LaxMouse *d);
75 virtual int RBUp(
int x,
int y,
unsigned int ,
const LaxMouse *d);
76 virtual int WheelUp(
int x,
int y,
unsigned int state,
int count,
const Laxkit::LaxMouse *d);
77 virtual int WheelDown(
int x,
int y,
unsigned int state,
int count,
const Laxkit::LaxMouse *d);
78 virtual int Idle(
int tid=0);
80 virtual int Resize(
int nw,
int nh);
84 virtual void Valid(
int v);
85 virtual void Valid(
int v,
unsigned long col);
87 virtual long GetLong(
int *error_ret);
90 virtual int SetText(
int newtext);
91 virtual int SetText(
double newtext);
92 virtual int SetText(
const char *newtext);
93 virtual long SetCurLine(
long nline) {
return 0; };
94 virtual long SetCurpos(
long newcurpos);
95 virtual int SetSelection(
long newss,
long newse);
97 virtual int inschar(
unsigned int ch,
char a=1);
98 virtual int delchar(
int bksp);
99 virtual int insstring(
const char *blah,
int after=0);
100 virtual int delsel();
102 virtual int replacesel(
const char *newt=NULL,
int after=0);
107 virtual int SetupMetrics();
108 virtual void DrawText(
int a=-1);
Mon Feb 17 2014 11:52:56, Laxkit