23 #ifndef _LAX_PATCHINTERFACE_H
24 #define _LAX_PATCHINTERFACE_H
26 #include <lax/interfaces/aninterface.h>
27 #include <lax/interfaces/somedata.h>
28 #include <lax/interfaces/linestyle.h>
29 #include <lax/screencolor.h>
34 namespace LaxInterfaces {
42 double length, shrink, grow;
52 NumStack<PointWarpLink> links;
69 PointWarpData(
double xx,
double yy,
double ww,
double hh,
int nx,
int ny,
unsigned int stle);
71 virtual const char *whattype() {
return "PointWarpData"; }
77 virtual void Set(
double xx,
double yy,
double ww,
double hh,
int nx,
int ny,
unsigned int stle);
80 virtual int subdivide(
int r,
double rt,
int c,
double ct);
87 virtual int renderToBuffer(
unsigned char *buffer,
int bufw,
int bufh,
int bufstride,
int bufdepth,
int bufchannels);
98 enum PointWarpInterfaceActions {
99 POINTWARPA_RenderMode,
100 POINTWARPA_RecurseInc,
101 POINTWARPA_RecurseDec,
102 POINTWARPA_Decorations,
111 virtual int PerformAction(
int action);
115 unsigned long rimcolor,handlecolor,gridcolor;
118 unsigned long controlcolor;
130 virtual const char *IconId() {
return "PointWarp"; }
131 virtual const char *Name();
132 virtual const char *whattype() {
return "PointWarpInterface"; }
133 virtual const char *whatdatatype() {
return "PointWarpData"; }
135 virtual int UseThisObject(ObjectContext *oc);
137 virtual int UseThis(
int id,
int ndata);
138 virtual void Clear(SomeData *d=NULL);
139 virtual int InterfaceOn();
140 virtual int InterfaceOff();
141 virtual ObjectContext *Context() {
return poc; }
142 virtual int LBDown(
int x,
int y,
unsigned int state,
int count,
const Laxkit::LaxMouse *d);
145 virtual int CharInput(
unsigned int ch,
const char *buffer,
int len,
unsigned int state,
const Laxkit::LaxKeyboard *d);
148 virtual void drawpatch(
int roff,
int coff);
149 virtual void drawpatches();
153 virtual PointWarpData *
newPointWarpData(
double xx,
double yy,
double ww,
double hh,
int nr,
int nc,
unsigned int stle);
155 virtual int scan(
int x,
int y);
156 virtual int SelectPoint(
int c,
unsigned int state);