Commit 5a0c6ed1 authored by Sergey Kireev's avatar Sergey Kireev
Browse files

geometry selection added to processing version

parent 12a3a25e
This diff is collapsed.
// Basic class for any screen object
class View {
int startx,starty; // view start (pixels)
int sizex,sizey; // view size (pixels)
int minsizex,minsizey; // minimal view size (pixels) for resizable objects
boolean fixed_size_x;
boolean fixed_size_y;
boolean visible;
boolean debug;
View() { this(false,false); }
View(boolean fixed) { this(fixed,fixed); }
View(boolean fixedx,boolean fixedy) {
fixed_size_x = fixedx;
fixed_size_y = fixedy;
startx = 0; sizex = 0;
starty = 0; sizey = 0;
minsizex = 0; minsizey = 0;
visible = true;
debug = false;
}
void setViewSizeFixed(boolean fixed) { setViewSizeFixedX(fixed); setViewSizeFixedY(fixed); }
void setViewSizeFixed(boolean fixedx,boolean fixedy) { setViewSizeFixedX(fixedx); setViewSizeFixedY(fixedy); }
void setViewSizeFixedX(boolean fixed) { fixed_size_x = fixed; if (fixed) minsizex = sizex; }
void setViewSizeFixedY(boolean fixed) { fixed_size_y = fixed; if (fixed) minsizey = sizey; }
void setViewStartX(int x) { if (debug) println("View.setViewStartX()"); startx = x; }
void setViewStartY(int y) { if (debug) println("View.setViewStartY()"); starty = y; }
void setViewStartSizeX(int newstartx,int newsizex) { if (debug) println("View.setViewStartSizeX()"); setViewStartX(newstartx); setViewSizeX(newsizex); } //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>//
void setViewStartSizeY(int newstarty,int newsizey) { if (debug) println("View.setViewStartSizeY()"); setViewStartY(newstarty); setViewSizeY(newsizey); }
void setViewSizeX(int x) { if (debug) println("View.setViewSizeX()"); sizex = x; if (fixed_size_x) minsizex = x; }
void setViewSizeY(int y) { if (debug) println("View.setViewSizeY()"); sizey = y; if (fixed_size_y) minsizey = y; }
void setViewStart(int x,int y) { setViewStartX(x); setViewStartY(y); }
void setViewSize(int x,int y) { setViewSizeX(x); setViewSizeY(y); }
void setViewStartSize(int newstartx,int newstarty,int newsizex,int newsizey) { setViewStartSizeX(newstartx,newsizex); setViewStartSizeY(newstarty,newsizey); }
void setViewMinSizeX(int x) { minsizex = x; if (fixed_size_x) sizex = x; }
void setViewMinSizeY(int y) { minsizey = y; if (fixed_size_y) sizey = y; }
void setViewMinSize(int x,int y) { setViewMinSizeX(x); setViewMinSizeY(y); }
void setVisible(boolean v) { visible = v; }
void setVisible() { visible = true; }
void setInvisible() { visible = false; }
void draw() {}
}
// Basic class for any screen object
class View {
int startx,starty; // view start (pixels)
int sizex,sizey; // view size (pixels)
int minsizex,minsizey; // minimal view size (pixels) for resizable objects
boolean fixed_size_x;
boolean fixed_size_y;
boolean visible;
boolean debug;
View() { this(false,false); }
View(boolean fixed) { this(fixed,fixed); }
View(boolean fixedx,boolean fixedy) {
fixed_size_x = fixedx;
fixed_size_y = fixedy;
startx = 0; sizex = 0;
starty = 0; sizey = 0;
minsizex = 0; minsizey = 0;
visible = true;
debug = false;
}
void setViewSizeFixed(boolean fixed) { setViewSizeFixedX(fixed); setViewSizeFixedY(fixed); }
void setViewSizeFixed(boolean fixedx,boolean fixedy) { setViewSizeFixedX(fixedx); setViewSizeFixedY(fixedy); }
void setViewSizeFixedX(boolean fixed) { fixed_size_x = fixed; if (fixed) minsizex = sizex; }
void setViewSizeFixedY(boolean fixed) { fixed_size_y = fixed; if (fixed) minsizey = sizey; }
void setViewStartX(int x) { if (debug) println("View.setViewStartX()"); startx = x; }
void setViewStartY(int y) { if (debug) println("View.setViewStartY()"); starty = y; }
void setViewStartSizeX(int newstartx,int newsizex) { if (debug) println("View.setViewStartSizeX()"); setViewStartX(newstartx); setViewSizeX(newsizex); } //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>// //<>//
void setViewStartSizeY(int newstarty,int newsizey) { if (debug) println("View.setViewStartSizeY()"); setViewStartY(newstarty); setViewSizeY(newsizey); }
void setViewSizeX(int x) { if (debug) println("View.setViewSizeX()"); sizex = x; if (fixed_size_x) minsizex = x; }
void setViewSizeY(int y) { if (debug) println("View.setViewSizeY()"); sizey = y; if (fixed_size_y) minsizey = y; }
void setViewStart(int x,int y) { setViewStartX(x); setViewStartY(y); }
void setViewSize(int x,int y) { setViewSizeX(x); setViewSizeY(y); }
void setViewStartSize(int newstartx,int newstarty,int newsizex,int newsizey) { setViewStartSizeX(newstartx,newsizex); setViewStartSizeY(newstarty,newsizey); }
void setViewMinSizeX(int x) { minsizex = x; if (fixed_size_x) sizex = x; }
void setViewMinSizeY(int y) { minsizey = y; if (fixed_size_y) sizey = y; }
void setViewMinSize(int x,int y) { setViewMinSizeX(x); setViewMinSizeY(y); }
void setVisible(boolean v) { visible = v; }
void setVisible() { visible = true; }
void setInvisible() { visible = false; }
void draw() {}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment