23 #ifndef _LAX_RECTINTERFACE_H
24 #define _LAX_RECTINTERFACE_H
27 #include <lax/interfaces/aninterface.h>
28 #include <lax/interfaces/somedata.h>
29 #include <lax/interfaces/linestyle.h>
31 namespace LaxInterfaces {
40 #define RECT_ISSQUARE (1<<0)
41 #define RECT_OFF (1<<1)
42 #define RECT_DOTTED (1<<2)
43 #define RECT_SOLID (1<<3)
44 #define RECT_INVISIBLECENTER (1<<4)
45 #define RECT_CANTCREATE (1<<5)
46 #define RECT_AFFINE (1<<6)
47 #define RECT_ALLOW_SHEAR (1<<7)
49 #define RECT_HIDE_CONTROLS (1<<8)
50 #define RECT_OBJECT_SHUNT (1<<9)
51 #define RECT_FLIP_AT_SIDES (1<<10)
52 #define RECT_FLIP_LINE (1<<11)
53 #define RECT_LINK_BALL (1<<12)
69 const char *whattype() {
return "RectData"; }
75 enum RectInterfaceActions {
85 RIA_ToggleFlipControls,
97 flatpoint center1,center2,shearpoint,leftp;
106 double xaxislen,yaxislen;
111 virtual void Flip(
int type);
112 virtual void Rotate(
double angle);
115 virtual int PerformAction(
int action);
122 unsigned long controlcolor;
123 int creationstyle,createfrompoint,showdecs;
130 virtual const char *IconId() {
return ""; }
131 virtual const char *Name();
132 virtual const char *whattype() {
return "RectInterface"; }
133 virtual const char *whatdatatype() {
return "RectData"; }
135 virtual int InterfaceOn();
136 virtual int InterfaceOff();
141 virtual int CharInput(
unsigned int ch,
const char *buffer,
int len,
unsigned int state,
const Laxkit::LaxKeyboard *d);
146 virtual void Clear(SomeData *d=NULL);
149 virtual int scan(
int x,
int y);