2008-03-25 10:02:13 +00:00
|
|
|
#include "solvespace.h"
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
const TextWindow::Color TextWindow::fgColors[] = {
|
|
|
|
{ 'd', RGB(255, 255, 255) },
|
|
|
|
{ 'l', RGB(100, 100, 255) },
|
|
|
|
{ 't', RGB(255, 200, 0) },
|
2008-05-26 09:56:50 +00:00
|
|
|
{ 'h', RGB( 90, 90, 90) },
|
2008-04-28 07:18:39 +00:00
|
|
|
{ 's', RGB( 40, 255, 40) },
|
|
|
|
{ 'm', RGB(200, 200, 0) },
|
|
|
|
{ 'r', RGB( 0, 0, 0) },
|
2008-05-26 09:56:50 +00:00
|
|
|
{ 'x', RGB(255, 20, 20) },
|
2008-06-01 00:26:41 +00:00
|
|
|
{ 'i', RGB( 0, 255, 255) },
|
2008-04-28 07:18:39 +00:00
|
|
|
{ 0, 0 },
|
|
|
|
};
|
|
|
|
const TextWindow::Color TextWindow::bgColors[] = {
|
|
|
|
{ 'd', RGB( 0, 0, 0) },
|
2008-05-26 09:56:50 +00:00
|
|
|
{ 't', RGB( 34, 15, 15) },
|
2008-04-28 09:40:02 +00:00
|
|
|
{ 'a', RGB( 20, 20, 20) },
|
2008-04-28 07:18:39 +00:00
|
|
|
{ 'r', RGB(255, 255, 255) },
|
|
|
|
{ 0, 0 },
|
2008-03-28 10:00:37 +00:00
|
|
|
};
|
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
void TextWindow::Init(void) {
|
2008-06-01 00:26:41 +00:00
|
|
|
ClearSuper();
|
|
|
|
}
|
|
|
|
|
|
|
|
void TextWindow::ClearSuper(void) {
|
|
|
|
HideTextEditControl();
|
2008-04-12 14:12:26 +00:00
|
|
|
memset(this, 0, sizeof(*this));
|
|
|
|
shown = &(showns[shownIndex]);
|
2008-06-01 00:26:41 +00:00
|
|
|
ClearScreen();
|
|
|
|
Show();
|
2008-03-26 09:18:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TextWindow::ClearScreen(void) {
|
2008-03-25 10:02:13 +00:00
|
|
|
int i, j;
|
|
|
|
for(i = 0; i < MAX_ROWS; i++) {
|
|
|
|
for(j = 0; j < MAX_COLS; j++) {
|
|
|
|
text[i][j] = ' ';
|
2008-04-28 07:18:39 +00:00
|
|
|
meta[i][j].fg = 'd';
|
|
|
|
meta[i][j].bg = 'd';
|
2008-03-25 10:02:13 +00:00
|
|
|
meta[i][j].link = NOT_A_LINK;
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
top[i] = i*2;
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
2008-03-26 09:18:12 +00:00
|
|
|
rows = 0;
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
void TextWindow::Printf(bool halfLine, char *fmt, ...) {
|
2008-03-25 10:02:13 +00:00
|
|
|
va_list vl;
|
|
|
|
va_start(vl, fmt);
|
|
|
|
|
2008-04-09 09:35:09 +00:00
|
|
|
if(rows >= MAX_ROWS) return;
|
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
int r, c;
|
2008-04-09 09:35:09 +00:00
|
|
|
r = rows;
|
2008-04-28 07:18:39 +00:00
|
|
|
top[r] = (r == 0) ? 0 : (top[r-1] + (halfLine ? 3 : 2));
|
2008-04-09 09:35:09 +00:00
|
|
|
rows++;
|
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
for(c = 0; c < MAX_COLS; c++) {
|
|
|
|
text[r][c] = ' ';
|
|
|
|
meta[r][c].link = NOT_A_LINK;
|
|
|
|
}
|
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
int fg = 'd', bg = 'd';
|
2008-03-28 10:00:37 +00:00
|
|
|
int link = NOT_A_LINK;
|
|
|
|
DWORD data = 0;
|
2008-05-26 09:56:50 +00:00
|
|
|
LinkFunction *f = NULL, *h = NULL;
|
2008-03-25 10:02:13 +00:00
|
|
|
|
|
|
|
c = 0;
|
|
|
|
while(*fmt) {
|
2008-03-28 10:00:37 +00:00
|
|
|
char buf[1024];
|
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
if(*fmt == '%') {
|
2008-03-26 09:18:12 +00:00
|
|
|
fmt++;
|
|
|
|
if(*fmt == '\0') goto done;
|
2008-03-28 10:00:37 +00:00
|
|
|
strcpy(buf, "");
|
2008-03-26 09:18:12 +00:00
|
|
|
switch(*fmt) {
|
2008-03-28 10:00:37 +00:00
|
|
|
case 'd': {
|
|
|
|
int v = va_arg(vl, int);
|
|
|
|
sprintf(buf, "%d", v);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'x': {
|
|
|
|
DWORD v = va_arg(vl, DWORD);
|
|
|
|
sprintf(buf, "%08x", v);
|
|
|
|
break;
|
|
|
|
}
|
2008-06-11 04:22:52 +00:00
|
|
|
case '@': {
|
|
|
|
double v = va_arg(vl, double);
|
|
|
|
sprintf(buf, "%.2f", v);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case '2': {
|
|
|
|
double v = va_arg(vl, double);
|
|
|
|
sprintf(buf, "%s%.2f", v < 0 ? "" : " ", v);
|
|
|
|
break;
|
|
|
|
}
|
2008-06-01 00:26:41 +00:00
|
|
|
case '3': {
|
|
|
|
double v = va_arg(vl, double);
|
|
|
|
sprintf(buf, "%s%.3f", v < 0 ? "" : " ", v);
|
|
|
|
break;
|
|
|
|
}
|
2008-03-26 09:18:12 +00:00
|
|
|
case 's': {
|
|
|
|
char *s = va_arg(vl, char *);
|
2008-03-28 10:00:37 +00:00
|
|
|
memcpy(buf, s, min(sizeof(buf), strlen(s)+1));
|
2008-03-26 09:18:12 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-06-01 00:26:41 +00:00
|
|
|
case 'c': {
|
|
|
|
char v = va_arg(vl, char);
|
|
|
|
sprintf(buf, "%c", v);
|
|
|
|
break;
|
|
|
|
}
|
2008-03-28 10:00:37 +00:00
|
|
|
case 'E':
|
2008-04-28 07:18:39 +00:00
|
|
|
fg = 'd';
|
|
|
|
// leave the background, though
|
2008-03-28 10:00:37 +00:00
|
|
|
link = NOT_A_LINK;
|
|
|
|
data = 0;
|
|
|
|
f = NULL;
|
2008-05-26 09:56:50 +00:00
|
|
|
h = NULL;
|
2008-03-26 09:18:12 +00:00
|
|
|
break;
|
2008-03-28 10:00:37 +00:00
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
case 'F':
|
|
|
|
case 'B': {
|
|
|
|
int color;
|
2008-03-28 10:00:37 +00:00
|
|
|
if(fmt[1] == '\0') goto done;
|
2008-04-28 07:18:39 +00:00
|
|
|
if(fmt[1] == 'p') {
|
2008-04-11 12:47:14 +00:00
|
|
|
color = va_arg(vl, int);
|
|
|
|
} else {
|
2008-04-28 07:18:39 +00:00
|
|
|
color = fmt[1];
|
2008-04-11 12:47:14 +00:00
|
|
|
}
|
2008-05-30 06:09:41 +00:00
|
|
|
if((color < 0 || color > 255) && !(color & 0x80000000)) {
|
|
|
|
color = 0;
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
if(*fmt == 'F') {
|
|
|
|
fg = color;
|
|
|
|
} else {
|
|
|
|
bg = color;
|
|
|
|
}
|
|
|
|
fmt++;
|
2008-03-28 10:00:37 +00:00
|
|
|
break;
|
2008-04-28 07:18:39 +00:00
|
|
|
}
|
2008-03-28 10:00:37 +00:00
|
|
|
case 'L':
|
|
|
|
if(fmt[1] == '\0') goto done;
|
|
|
|
fmt++;
|
|
|
|
link = *fmt;
|
|
|
|
break;
|
|
|
|
|
2008-04-11 12:47:14 +00:00
|
|
|
case 'f':
|
|
|
|
f = va_arg(vl, LinkFunction *);
|
|
|
|
break;
|
|
|
|
|
2008-05-26 09:56:50 +00:00
|
|
|
case 'h':
|
|
|
|
h = va_arg(vl, LinkFunction *);
|
|
|
|
break;
|
|
|
|
|
2008-03-28 10:00:37 +00:00
|
|
|
case 'D':
|
|
|
|
data = va_arg(vl, DWORD);
|
|
|
|
break;
|
|
|
|
|
2008-03-26 09:18:12 +00:00
|
|
|
case '%':
|
2008-03-28 10:00:37 +00:00
|
|
|
strcpy(buf, "%");
|
2008-03-26 09:18:12 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-03-25 10:02:13 +00:00
|
|
|
} else {
|
2008-03-28 10:00:37 +00:00
|
|
|
buf[0] = *fmt;
|
|
|
|
buf[1]= '\0';
|
|
|
|
}
|
|
|
|
|
|
|
|
for(unsigned i = 0; i < strlen(buf); i++) {
|
2008-03-25 10:02:13 +00:00
|
|
|
if(c >= MAX_COLS) goto done;
|
2008-03-28 10:00:37 +00:00
|
|
|
text[r][c] = buf[i];
|
2008-04-28 07:18:39 +00:00
|
|
|
meta[r][c].fg = fg;
|
|
|
|
meta[r][c].bg = bg;
|
2008-03-28 10:00:37 +00:00
|
|
|
meta[r][c].link = link;
|
|
|
|
meta[r][c].data = data;
|
|
|
|
meta[r][c].f = f;
|
2008-05-26 09:56:50 +00:00
|
|
|
meta[r][c].h = h;
|
2008-03-28 10:00:37 +00:00
|
|
|
c++;
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
2008-03-28 10:00:37 +00:00
|
|
|
|
2008-03-25 10:02:13 +00:00
|
|
|
fmt++;
|
|
|
|
}
|
2008-04-12 14:12:26 +00:00
|
|
|
while(c < MAX_COLS) {
|
2008-04-28 07:18:39 +00:00
|
|
|
meta[r][c].fg = fg;
|
|
|
|
meta[r][c].bg = bg;
|
2008-04-12 14:12:26 +00:00
|
|
|
c++;
|
|
|
|
}
|
2008-03-25 10:02:13 +00:00
|
|
|
|
|
|
|
done:
|
|
|
|
va_end(vl);
|
|
|
|
}
|
|
|
|
|
2008-06-01 00:26:41 +00:00
|
|
|
#define gs (SS.GW.gs)
|
2008-04-12 14:12:26 +00:00
|
|
|
void TextWindow::Show(void) {
|
2008-05-05 06:18:01 +00:00
|
|
|
if(!(SS.GW.pending.operation)) SS.GW.ClearPending();
|
2008-04-13 10:57:41 +00:00
|
|
|
|
2008-05-26 09:56:50 +00:00
|
|
|
SS.GW.GroupSelection();
|
2008-04-12 14:12:26 +00:00
|
|
|
|
2008-05-05 06:18:01 +00:00
|
|
|
if(SS.GW.pending.description) {
|
2008-04-13 10:57:41 +00:00
|
|
|
// A pending operation (that must be completed with the mouse in
|
|
|
|
// the graphics window) will preempt our usual display.
|
2008-06-11 04:22:52 +00:00
|
|
|
HideTextEditControl();
|
2008-06-01 00:26:41 +00:00
|
|
|
ShowHeader(false);
|
2008-04-28 07:18:39 +00:00
|
|
|
Printf(false, "");
|
2008-05-05 06:18:01 +00:00
|
|
|
Printf(false, "%s", SS.GW.pending.description);
|
2008-06-01 00:26:41 +00:00
|
|
|
} else if(gs.n > 0) {
|
2008-06-11 04:22:52 +00:00
|
|
|
HideTextEditControl();
|
2008-06-01 00:26:41 +00:00
|
|
|
ShowHeader(false);
|
|
|
|
DescribeSelection();
|
2008-04-13 10:57:41 +00:00
|
|
|
} else {
|
2008-06-01 00:26:41 +00:00
|
|
|
ShowHeader(true);
|
2008-04-13 10:57:41 +00:00
|
|
|
switch(shown->screen) {
|
|
|
|
default:
|
2008-04-25 08:26:15 +00:00
|
|
|
shown->screen = SCREEN_LIST_OF_GROUPS;
|
2008-04-13 10:57:41 +00:00
|
|
|
// fall through
|
2008-04-27 09:03:01 +00:00
|
|
|
case SCREEN_LIST_OF_GROUPS: ShowListOfGroups(); break;
|
|
|
|
case SCREEN_GROUP_INFO: ShowGroupInfo(); break;
|
2008-05-26 09:56:50 +00:00
|
|
|
case SCREEN_GROUP_SOLVE_INFO: ShowGroupSolveInfo(); break;
|
2008-06-11 04:22:52 +00:00
|
|
|
case SCREEN_CONFIGURATION: ShowConfiguration(); break;
|
2008-04-13 10:57:41 +00:00
|
|
|
}
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
2008-06-13 04:41:27 +00:00
|
|
|
Printf(false, "");
|
2008-04-12 14:12:26 +00:00
|
|
|
InvalidateText();
|
2008-03-26 09:18:12 +00:00
|
|
|
}
|
|
|
|
|
2008-06-02 05:38:12 +00:00
|
|
|
void TextWindow::ScreenUnselectAll(int link, DWORD v) {
|
|
|
|
GraphicsWindow::MenuEdit(GraphicsWindow::MNU_UNSELECT_ALL);
|
|
|
|
}
|
|
|
|
|
2008-06-01 00:26:41 +00:00
|
|
|
void TextWindow::DescribeSelection(void) {
|
|
|
|
Entity *e;
|
|
|
|
Vector p;
|
|
|
|
int i;
|
|
|
|
Printf(false, "");
|
|
|
|
|
|
|
|
if(gs.n == 1 && (gs.points == 1 || gs.entities == 1)) {
|
|
|
|
e = SS.GetEntity(gs.points == 1 ? gs.point[0] : gs.entity[0]);
|
|
|
|
|
2008-06-12 07:31:41 +00:00
|
|
|
#define COSTR(p) \
|
2008-06-14 09:51:25 +00:00
|
|
|
SS.MmToString((p).x), SS.MmToString((p).y), SS.MmToString((p).z)
|
2008-06-01 00:26:41 +00:00
|
|
|
#define PT_AS_STR "(%Fi%s%E, %Fi%s%E, %Fi%s%E)"
|
|
|
|
#define PT_AS_NUM "(%Fi%3%E, %Fi%3%E, %Fi%3%E)"
|
|
|
|
switch(e->type) {
|
|
|
|
case Entity::POINT_IN_3D:
|
|
|
|
case Entity::POINT_IN_2D:
|
|
|
|
case Entity::POINT_N_TRANS:
|
|
|
|
case Entity::POINT_N_ROT_TRANS:
|
|
|
|
case Entity::POINT_N_COPY:
|
|
|
|
case Entity::POINT_N_ROT_AA:
|
|
|
|
p = e->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(false, "%FtPOINT%E at " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Entity::NORMAL_IN_3D:
|
|
|
|
case Entity::NORMAL_IN_2D:
|
|
|
|
case Entity::NORMAL_N_COPY:
|
|
|
|
case Entity::NORMAL_N_ROT:
|
|
|
|
case Entity::NORMAL_N_ROT_AA: {
|
|
|
|
Quaternion q = e->NormalGetNum();
|
|
|
|
p = q.RotationN();
|
|
|
|
Printf(false, "%FtNORMAL / COORDINATE SYSTEM%E");
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " basis n = " PT_AS_NUM, CO(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
p = q.RotationU();
|
|
|
|
Printf(false, " u = " PT_AS_NUM, CO(p));
|
|
|
|
p = q.RotationV();
|
|
|
|
Printf(false, " v = " PT_AS_NUM, CO(p));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case Entity::WORKPLANE: {
|
|
|
|
p = SS.GetEntity(e->point[0])->PointGetNum();
|
|
|
|
Printf(false, "%FtWORKPLANE%E");
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " origin = " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
Quaternion q = e->Normal()->NormalGetNum();
|
|
|
|
p = q.RotationN();
|
|
|
|
Printf(true, " normal = " PT_AS_NUM, CO(p));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case Entity::LINE_SEGMENT: {
|
|
|
|
Vector p0 = SS.GetEntity(e->point[0])->PointGetNum();
|
|
|
|
p = p0;
|
|
|
|
Printf(false, "%FtLINE SEGMENT%E");
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " thru " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
Vector p1 = SS.GetEntity(e->point[1])->PointGetNum();
|
|
|
|
p = p1;
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(false, " " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
Printf(true, " len = %Fi%s%E",
|
2008-06-14 09:51:25 +00:00
|
|
|
SS.MmToString((p1.Minus(p0).Magnitude())));
|
2008-06-01 00:26:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case Entity::CUBIC:
|
|
|
|
Printf(false, "%FtCUBIC BEZIER CURVE%E");
|
|
|
|
for(i = 0; i <= 3; i++) {
|
|
|
|
p = SS.GetEntity(e->point[i])->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf((i==0), " p%c = " PT_AS_STR, '0'+i, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
}
|
|
|
|
break;
|
2008-06-12 07:31:41 +00:00
|
|
|
|
2008-06-01 00:26:41 +00:00
|
|
|
case Entity::ARC_OF_CIRCLE: {
|
|
|
|
Printf(false, "%FtARC OF A CIRCLE%E");
|
|
|
|
p = SS.GetEntity(e->point[0])->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " center = " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
p = SS.GetEntity(e->point[1])->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " endpoints = " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
p = SS.GetEntity(e->point[2])->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(false, " " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
double r = e->CircleGetRadiusNum();
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " diameter = %Fi%s", SS.MmToString(r*2));
|
|
|
|
Printf(false, " radius = %Fi%s", SS.MmToString(r));
|
2008-06-01 00:26:41 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case Entity::CIRCLE: {
|
|
|
|
Printf(false, "%FtCIRCLE%E");
|
|
|
|
p = SS.GetEntity(e->point[0])->PointGetNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " center = " PT_AS_STR, COSTR(p));
|
2008-06-01 00:26:41 +00:00
|
|
|
double r = e->CircleGetRadiusNum();
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " diameter = %Fi%s", SS.MmToString(r*2));
|
|
|
|
Printf(false, " radius = %Fi%s", SS.MmToString(r));
|
2008-06-01 00:26:41 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-06-02 05:38:12 +00:00
|
|
|
case Entity::FACE_NORMAL_PT:
|
|
|
|
case Entity::FACE_XPROD:
|
|
|
|
case Entity::FACE_N_ROT_TRANS:
|
|
|
|
Printf(false, "%FtPLANE FACE%E");
|
2008-06-06 09:14:25 +00:00
|
|
|
p = e->FaceGetNormalNum();
|
2008-06-12 07:31:41 +00:00
|
|
|
Printf(true, " normal = " PT_AS_NUM, CO(p));
|
|
|
|
p = e->FaceGetPointNum();
|
|
|
|
Printf(false, " thru = " PT_AS_STR, COSTR(p));
|
2008-06-02 05:38:12 +00:00
|
|
|
break;
|
|
|
|
|
2008-06-01 00:26:41 +00:00
|
|
|
default:
|
|
|
|
Printf(true, "%Ft?? ENTITY%E");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
Group *g = SS.GetGroup(e->group);
|
|
|
|
Printf(false, "");
|
|
|
|
Printf(false, "%FtIN GROUP%E %s", g->DescriptionString());
|
|
|
|
if(e->workplane.v == Entity::FREE_IN_3D.v) {
|
|
|
|
Printf(false, "%FtNO WORKPLANE (FREE IN 3D)%E");
|
|
|
|
} else {
|
|
|
|
Entity *w = SS.GetEntity(e->workplane);
|
|
|
|
Printf(false, "%FtIN WORKPLANE%E %s", w->DescriptionString());
|
|
|
|
}
|
|
|
|
} else if(gs.n == 2 && gs.points == 2) {
|
|
|
|
Printf(false, "%FtTWO POINTS");
|
2008-06-12 07:31:41 +00:00
|
|
|
Vector p0 = SS.GetEntity(gs.point[0])->PointGetNum();
|
|
|
|
Printf(true, " at " PT_AS_STR, COSTR(p0));
|
|
|
|
Vector p1 = SS.GetEntity(gs.point[1])->PointGetNum();
|
|
|
|
Printf(false, " " PT_AS_STR, COSTR(p1));
|
2008-06-01 00:26:41 +00:00
|
|
|
double d = (p1.Minus(p0)).Magnitude();
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " d = %Fi%s", SS.MmToString(d));
|
2008-06-12 07:31:41 +00:00
|
|
|
} else if(gs.n == 2 && gs.faces == 1 && gs.points == 1) {
|
|
|
|
Printf(false, "%FtA POINT AND A PLANE FACE");
|
|
|
|
Vector pt = SS.GetEntity(gs.point[0])->PointGetNum();
|
|
|
|
Printf(true, " point = " PT_AS_STR, COSTR(pt));
|
|
|
|
Vector n = SS.GetEntity(gs.face[0])->FaceGetNormalNum();
|
|
|
|
Printf(true, " plane normal = " PT_AS_NUM, CO(n));
|
|
|
|
Vector pl = SS.GetEntity(gs.face[0])->FaceGetPointNum();
|
|
|
|
Printf(false, " plane thru = " PT_AS_STR, COSTR(pl));
|
|
|
|
double dd = n.Dot(pl) - n.Dot(pt);
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " distance = %Fi%s", SS.MmToString(dd));
|
2008-06-12 07:31:41 +00:00
|
|
|
} else if(gs.n == 3 && gs.points == 2 && gs.vectors == 1) {
|
|
|
|
Printf(false, "%FtTWO POINTS AND A VECTOR");
|
|
|
|
Vector p0 = SS.GetEntity(gs.point[0])->PointGetNum();
|
|
|
|
Printf(true, " pointA = " PT_AS_STR, COSTR(p0));
|
|
|
|
Vector p1 = SS.GetEntity(gs.point[1])->PointGetNum();
|
|
|
|
Printf(false, " pointB = " PT_AS_STR, COSTR(p1));
|
|
|
|
Vector v = SS.GetEntity(gs.vector[0])->VectorGetNum();
|
|
|
|
v = v.WithMagnitude(1);
|
|
|
|
Printf(true, " vector = " PT_AS_NUM, CO(v));
|
|
|
|
double d = (p1.Minus(p0)).Dot(v);
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " proj_d = %Fi%s", SS.MmToString(d));
|
2008-06-13 04:41:27 +00:00
|
|
|
} else if(gs.n == 2 && gs.faces == 2) {
|
|
|
|
Printf(false, "%FtTWO PLANE FACES");
|
|
|
|
|
|
|
|
Vector n0 = SS.GetEntity(gs.face[0])->FaceGetNormalNum();
|
|
|
|
Printf(true, " planeA normal = " PT_AS_NUM, CO(n0));
|
|
|
|
Vector p0 = SS.GetEntity(gs.face[0])->FaceGetPointNum();
|
|
|
|
Printf(false, " planeA thru = " PT_AS_STR, COSTR(p0));
|
|
|
|
|
|
|
|
Vector n1 = SS.GetEntity(gs.face[1])->FaceGetNormalNum();
|
|
|
|
Printf(true, " planeB normal = " PT_AS_NUM, CO(n1));
|
|
|
|
Vector p1 = SS.GetEntity(gs.face[1])->FaceGetPointNum();
|
|
|
|
Printf(false, " planeB thru = " PT_AS_STR, COSTR(p1));
|
|
|
|
|
|
|
|
double theta = acos(n0.Dot(n1));
|
|
|
|
Printf(true, " angle = %Fi%2%E degrees", theta*180/PI);
|
|
|
|
while(theta < PI/2) theta += PI;
|
|
|
|
while(theta > PI/2) theta -= PI;
|
|
|
|
Printf(false, " or angle = %Fi%2%E (mod 180)", theta*180/PI);
|
|
|
|
|
|
|
|
if(fabs(theta) < 0.01) {
|
|
|
|
double d = (p1.Minus(p0)).Dot(n0);
|
2008-06-14 09:51:25 +00:00
|
|
|
Printf(true, " distance = %Fi%s", SS.MmToString(d));
|
2008-06-13 04:41:27 +00:00
|
|
|
}
|
2008-06-01 00:26:41 +00:00
|
|
|
} else {
|
|
|
|
Printf(true, "%FtSELECTED:%E %d item%s", gs.n, gs.n == 1 ? "" : "s");
|
|
|
|
}
|
2008-06-02 05:38:12 +00:00
|
|
|
|
|
|
|
Printf(true, "%Fl%f%Ll(unselect all)%E", &TextWindow::ScreenUnselectAll);
|
2008-06-01 00:26:41 +00:00
|
|
|
}
|
|
|
|
|
2008-04-28 09:40:02 +00:00
|
|
|
void TextWindow::OneScreenForwardTo(int screen) {
|
2008-04-12 14:12:26 +00:00
|
|
|
SS.TW.shownIndex++;
|
|
|
|
if(SS.TW.shownIndex >= HISTORY_LEN) SS.TW.shownIndex = 0;
|
|
|
|
SS.TW.shown = &(SS.TW.showns[SS.TW.shownIndex]);
|
|
|
|
history++;
|
2008-04-28 09:40:02 +00:00
|
|
|
|
|
|
|
if(screen >= 0) shown->screen = screen;
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
|
|
|
|
2008-04-22 13:14:15 +00:00
|
|
|
void TextWindow::ScreenNavigation(int link, DWORD v) {
|
2008-04-12 14:12:26 +00:00
|
|
|
switch(link) {
|
|
|
|
default:
|
|
|
|
case 'h':
|
2008-04-28 09:40:02 +00:00
|
|
|
SS.TW.OneScreenForwardTo(SCREEN_LIST_OF_GROUPS);
|
2008-04-12 14:12:26 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'b':
|
|
|
|
if(SS.TW.history > 0) {
|
|
|
|
SS.TW.shownIndex--;
|
|
|
|
if(SS.TW.shownIndex < 0) SS.TW.shownIndex = (HISTORY_LEN-1);
|
|
|
|
SS.TW.shown = &(SS.TW.showns[SS.TW.shownIndex]);
|
|
|
|
SS.TW.history--;
|
|
|
|
}
|
|
|
|
break;
|
2008-03-25 10:02:13 +00:00
|
|
|
|
2008-04-12 14:12:26 +00:00
|
|
|
case 'f':
|
2008-04-28 09:40:02 +00:00
|
|
|
SS.TW.OneScreenForwardTo(-1);
|
2008-04-12 14:12:26 +00:00
|
|
|
break;
|
2008-03-25 10:02:13 +00:00
|
|
|
}
|
|
|
|
}
|
2008-06-01 00:26:41 +00:00
|
|
|
void TextWindow::ShowHeader(bool withNav) {
|
2008-04-08 12:54:53 +00:00
|
|
|
ClearScreen();
|
|
|
|
|
2008-05-27 02:22:20 +00:00
|
|
|
char *cd = SS.GW.LockedInWorkplane() ?
|
|
|
|
SS.GetEntity(SS.GW.ActiveWorkplane())->DescriptionString() :
|
|
|
|
"free in 3d";
|
2008-05-02 10:54:22 +00:00
|
|
|
|
|
|
|
// Navigation buttons
|
2008-06-01 00:26:41 +00:00
|
|
|
if(withNav) {
|
2008-05-27 02:22:20 +00:00
|
|
|
Printf(false, " %Lb%f<<%E %Lh%fhome%E %Bt%Ft wrkpl:%Fd %s",
|
2008-04-28 07:18:39 +00:00
|
|
|
(&TextWindow::ScreenNavigation),
|
|
|
|
(&TextWindow::ScreenNavigation),
|
|
|
|
cd);
|
2008-06-01 00:26:41 +00:00
|
|
|
} else {
|
|
|
|
Printf(false, " %Bt%Ft wrkpl:%Fd %s", cd);
|
2008-04-13 10:57:41 +00:00
|
|
|
}
|
2008-04-12 14:12:26 +00:00
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
#define hs(b) ((b) ? 's' : 'h')
|
|
|
|
Printf(false, "%Bt%Ftshow: "
|
2008-05-28 10:34:55 +00:00
|
|
|
"%Fp%Ll%D%fwrkpls%E "
|
2008-05-05 06:18:01 +00:00
|
|
|
"%Fp%Ll%D%fnormals%E "
|
2008-04-28 07:18:39 +00:00
|
|
|
"%Fp%Ll%D%fpoints%E "
|
2008-05-28 10:34:55 +00:00
|
|
|
"%Fp%Ll%D%fconstraints%E ",
|
2008-04-27 03:26:27 +00:00
|
|
|
hs(SS.GW.showWorkplanes), (DWORD)&(SS.GW.showWorkplanes), &(SS.GW.ToggleBool),
|
2008-05-05 06:18:01 +00:00
|
|
|
hs(SS.GW.showNormals), (DWORD)&(SS.GW.showNormals), &(SS.GW.ToggleBool),
|
2008-04-27 03:26:27 +00:00
|
|
|
hs(SS.GW.showPoints), (DWORD)&(SS.GW.showPoints), &(SS.GW.ToggleBool),
|
2008-05-28 10:34:55 +00:00
|
|
|
hs(SS.GW.showConstraints), (DWORD)(&SS.GW.showConstraints), &(SS.GW.ToggleBool)
|
2008-04-11 12:47:14 +00:00
|
|
|
);
|
2008-04-28 07:18:39 +00:00
|
|
|
Printf(false, "%Bt%Ft "
|
2008-05-28 10:34:55 +00:00
|
|
|
"%Fp%Ll%D%fshaded%E "
|
2008-06-02 05:38:12 +00:00
|
|
|
"%Fp%Ll%D%ffaces%E "
|
2008-05-28 10:34:55 +00:00
|
|
|
"%Fp%Ll%D%fmesh%E "
|
2008-05-02 10:54:22 +00:00
|
|
|
"%Fp%Ll%D%fhidden-lines%E",
|
2008-05-28 10:34:55 +00:00
|
|
|
hs(SS.GW.showShaded), (DWORD)(&SS.GW.showShaded), &(SS.GW.ToggleBool),
|
2008-06-02 05:38:12 +00:00
|
|
|
hs(SS.GW.showFaces), (DWORD)(&SS.GW.showFaces), &(SS.GW.ToggleBool),
|
2008-05-28 10:34:55 +00:00
|
|
|
hs(SS.GW.showMesh), (DWORD)(&SS.GW.showMesh), &(SS.GW.ToggleBool),
|
2008-05-02 10:54:22 +00:00
|
|
|
hs(SS.GW.showHdnLines), (DWORD)(&SS.GW.showHdnLines), &(SS.GW.ToggleBool)
|
2008-04-11 12:47:14 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2008-04-27 09:03:01 +00:00
|
|
|
void TextWindow::ScreenSelectGroup(int link, DWORD v) {
|
2008-04-28 09:40:02 +00:00
|
|
|
SS.TW.OneScreenForwardTo(SCREEN_GROUP_INFO);
|
2008-04-27 09:03:01 +00:00
|
|
|
SS.TW.shown->group.v = v;
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
void TextWindow::ScreenToggleGroupShown(int link, DWORD v) {
|
|
|
|
hGroup hg = { v };
|
|
|
|
Group *g = SS.GetGroup(hg);
|
|
|
|
g->visible = !(g->visible);
|
2008-05-25 13:11:44 +00:00
|
|
|
// If a group was just shown, then it might not have been generated
|
|
|
|
// previously, so regenerate.
|
2008-06-02 09:31:26 +00:00
|
|
|
SS.GenerateAll();
|
2008-05-17 08:02:39 +00:00
|
|
|
}
|
|
|
|
void TextWindow::ScreenShowGroupsSpecial(int link, DWORD v) {
|
|
|
|
int i;
|
|
|
|
for(i = 0; i < SS.group.n; i++) {
|
|
|
|
Group *g = &(SS.group.elem[i]);
|
2008-04-28 07:18:39 +00:00
|
|
|
|
2008-06-11 04:22:52 +00:00
|
|
|
if(link == 's') {
|
2008-05-17 08:02:39 +00:00
|
|
|
g->visible = true;
|
2008-06-11 04:22:52 +00:00
|
|
|
} else {
|
2008-05-17 08:02:39 +00:00
|
|
|
g->visible = false;
|
|
|
|
}
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
}
|
|
|
|
void TextWindow::ScreenActivateGroup(int link, DWORD v) {
|
|
|
|
hGroup hg = { v };
|
|
|
|
Group *g = SS.GetGroup(hg);
|
|
|
|
g->visible = true;
|
|
|
|
SS.GW.activeGroup.v = v;
|
2008-06-02 05:38:12 +00:00
|
|
|
SS.GetGroup(SS.GW.activeGroup)->Activate();
|
2008-05-17 23:48:58 +00:00
|
|
|
SS.GW.ClearSuper();
|
2008-04-28 07:18:39 +00:00
|
|
|
}
|
2008-05-26 09:56:50 +00:00
|
|
|
void TextWindow::ReportHowGroupSolved(hGroup hg) {
|
2008-06-01 00:26:41 +00:00
|
|
|
SS.GW.ClearSuper();
|
2008-05-26 09:56:50 +00:00
|
|
|
SS.TW.OneScreenForwardTo(SCREEN_GROUP_SOLVE_INFO);
|
|
|
|
SS.TW.shown->group.v = hg.v;
|
2008-06-03 18:28:41 +00:00
|
|
|
SS.later.showTW = true;
|
2008-05-26 09:56:50 +00:00
|
|
|
}
|
|
|
|
void TextWindow::ScreenHowGroupSolved(int link, DWORD v) {
|
|
|
|
if(SS.GW.activeGroup.v != v) {
|
|
|
|
ScreenActivateGroup(link, v);
|
|
|
|
}
|
|
|
|
SS.TW.OneScreenForwardTo(SCREEN_GROUP_SOLVE_INFO);
|
|
|
|
SS.TW.shown->group.v = v;
|
|
|
|
}
|
2008-06-11 04:22:52 +00:00
|
|
|
void TextWindow::ScreenShowConfiguration(int link, DWORD v) {
|
|
|
|
SS.TW.OneScreenForwardTo(SCREEN_CONFIGURATION);
|
|
|
|
}
|
2008-04-25 08:26:15 +00:00
|
|
|
void TextWindow::ShowListOfGroups(void) {
|
2008-05-26 09:56:50 +00:00
|
|
|
Printf(true, "%Ftactv show ok group-name%E");
|
2008-04-08 12:54:53 +00:00
|
|
|
int i;
|
2008-06-03 18:28:41 +00:00
|
|
|
bool afterActive = false;
|
2008-04-25 08:26:15 +00:00
|
|
|
for(i = 0; i < SS.group.n; i++) {
|
|
|
|
Group *g = &(SS.group.elem[i]);
|
2008-04-28 07:18:39 +00:00
|
|
|
char *s = g->DescriptionString();
|
|
|
|
bool active = (g->h.v == SS.GW.activeGroup.v);
|
|
|
|
bool shown = g->visible;
|
2008-05-26 09:56:50 +00:00
|
|
|
bool ok = (g->solved.how == Group::SOLVED_OKAY);
|
2008-04-28 07:18:39 +00:00
|
|
|
bool ref = (g->h.v == Group::HGROUP_REFERENCES.v);
|
2008-05-26 09:56:50 +00:00
|
|
|
Printf(false, "%Bp%Fd "
|
|
|
|
"%Fp%D%f%s%Ll%s%E%s "
|
2008-06-03 18:28:41 +00:00
|
|
|
"%Fp%D%f%Ll%s%E%Fh%s%E "
|
2008-05-26 09:56:50 +00:00
|
|
|
"%Fp%D%f%s%Ll%s%E "
|
2008-04-28 07:18:39 +00:00
|
|
|
"%Fl%Ll%D%f%s",
|
|
|
|
// Alternate between light and dark backgrounds, for readability
|
|
|
|
(i & 1) ? 'd' : 'a',
|
|
|
|
// Link that activates the group
|
|
|
|
active ? 's' : 'h', g->h.v, (&TextWindow::ScreenActivateGroup),
|
|
|
|
active ? "yes" : (ref ? " " : ""),
|
|
|
|
active ? "" : (ref ? "" : "no"),
|
|
|
|
active ? "" : " ",
|
|
|
|
// Link that hides or shows the group
|
|
|
|
shown ? 's' : 'h', g->h.v, (&TextWindow::ScreenToggleGroupShown),
|
2008-06-03 18:28:41 +00:00
|
|
|
afterActive ? "" : (shown ? "yes" : "no"),
|
|
|
|
afterActive ? " - " : (shown ? "" : " "),
|
2008-05-26 09:56:50 +00:00
|
|
|
// Link to the errors, if a problem occured while solving
|
|
|
|
ok ? 's' : 'x', g->h.v, (&TextWindow::ScreenHowGroupSolved),
|
|
|
|
ok ? "ok" : "",
|
|
|
|
ok ? "" : "NO",
|
2008-04-28 07:18:39 +00:00
|
|
|
// Link to a screen that gives more details on the group
|
2008-04-27 09:03:01 +00:00
|
|
|
g->h.v, (&TextWindow::ScreenSelectGroup), s);
|
2008-06-03 18:28:41 +00:00
|
|
|
|
|
|
|
if(active) afterActive = true;
|
2008-04-08 12:54:53 +00:00
|
|
|
}
|
2008-05-17 08:02:39 +00:00
|
|
|
|
2008-06-11 04:22:52 +00:00
|
|
|
Printf(true, " %Fl%Ls%fshow all%E / %Fl%Lh%fhide all%E",
|
|
|
|
&(TextWindow::ScreenShowGroupsSpecial),
|
2008-05-17 08:02:39 +00:00
|
|
|
&(TextWindow::ScreenShowGroupsSpecial));
|
2008-06-11 04:22:52 +00:00
|
|
|
Printf(false, " %Fl%Ls%fconfiguration%E",
|
|
|
|
&(TextWindow::ScreenShowConfiguration));
|
2008-04-08 12:54:53 +00:00
|
|
|
}
|
2008-04-27 09:03:01 +00:00
|
|
|
|
|
|
|
|
2008-05-26 09:56:50 +00:00
|
|
|
void TextWindow::ScreenHoverConstraint(int link, DWORD v) {
|
2008-06-03 18:28:41 +00:00
|
|
|
if(!SS.GW.showConstraints) return;
|
|
|
|
|
|
|
|
hConstraint hc = { v };
|
|
|
|
Constraint *c = SS.GetConstraint(hc);
|
|
|
|
if(c->group.v != SS.GW.activeGroup.v) {
|
|
|
|
// Only constraints in the active group are visible
|
|
|
|
return;
|
|
|
|
}
|
2008-05-26 09:56:50 +00:00
|
|
|
SS.GW.hover.Clear();
|
2008-06-03 18:28:41 +00:00
|
|
|
SS.GW.hover.constraint = hc;
|
2008-05-26 09:56:50 +00:00
|
|
|
SS.GW.hover.emphasized = true;
|
|
|
|
}
|
|
|
|
void TextWindow::ScreenHoverRequest(int link, DWORD v) {
|
|
|
|
SS.GW.hover.Clear();
|
|
|
|
hRequest hr = { v };
|
|
|
|
SS.GW.hover.entity = hr.entity(0);
|
|
|
|
SS.GW.hover.emphasized = true;
|
|
|
|
}
|
2008-04-27 09:03:01 +00:00
|
|
|
void TextWindow::ScreenSelectConstraint(int link, DWORD v) {
|
2008-05-26 09:56:50 +00:00
|
|
|
SS.GW.ClearSelection();
|
|
|
|
SS.GW.selection[0].constraint.v = v;
|
2008-04-12 14:12:26 +00:00
|
|
|
}
|
2008-04-25 08:26:15 +00:00
|
|
|
void TextWindow::ScreenSelectRequest(int link, DWORD v) {
|
2008-05-26 09:56:50 +00:00
|
|
|
hRequest hr = { v };
|
|
|
|
SS.GW.ClearSelection();
|
|
|
|
SS.GW.selection[0].entity = hr.entity(0);
|
2008-05-17 08:02:39 +00:00
|
|
|
}
|
2008-05-27 06:36:59 +00:00
|
|
|
void TextWindow::ScreenChangeOneOrTwoSides(int link, DWORD v) {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-05-17 08:02:39 +00:00
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
2008-05-27 06:36:59 +00:00
|
|
|
if(g->subtype == Group::ONE_SIDED) {
|
|
|
|
g->subtype = Group::TWO_SIDED;
|
|
|
|
} else if(g->subtype == Group::TWO_SIDED) {
|
|
|
|
g->subtype = Group::ONE_SIDED;
|
2008-05-25 13:11:44 +00:00
|
|
|
} else oops();
|
2008-06-02 11:43:27 +00:00
|
|
|
SS.MarkGroupDirty(g->h);
|
2008-06-02 09:31:26 +00:00
|
|
|
SS.GenerateAll();
|
2008-05-25 13:11:44 +00:00
|
|
|
SS.GW.ClearSuper();
|
|
|
|
}
|
2008-06-12 04:36:33 +00:00
|
|
|
void TextWindow::ScreenChangeSkipFirst(int link, DWORD v) {
|
|
|
|
SS.UndoRemember();
|
|
|
|
|
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
|
|
|
(g->skipFirst) = !(g->skipFirst);
|
|
|
|
SS.MarkGroupDirty(g->h);
|
|
|
|
SS.GenerateAll();
|
|
|
|
SS.GW.ClearSuper();
|
|
|
|
}
|
2008-05-25 13:11:44 +00:00
|
|
|
void TextWindow::ScreenChangeMeshCombine(int link, DWORD v) {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-05-25 13:11:44 +00:00
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
2008-06-03 18:28:41 +00:00
|
|
|
g->meshCombine = v;
|
2008-06-02 11:43:27 +00:00
|
|
|
SS.MarkGroupDirty(g->h);
|
2008-06-02 09:31:26 +00:00
|
|
|
SS.GenerateAll();
|
2008-05-17 11:15:14 +00:00
|
|
|
SS.GW.ClearSuper();
|
2008-04-25 08:26:15 +00:00
|
|
|
}
|
2008-05-30 06:09:41 +00:00
|
|
|
void TextWindow::ScreenColor(int link, DWORD v) {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-05-30 06:09:41 +00:00
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
2008-06-11 04:22:52 +00:00
|
|
|
if(v < 0 || v >= SS.MODEL_COLORS) return;
|
|
|
|
g->color = SS.modelColor[v];
|
2008-06-02 11:43:27 +00:00
|
|
|
SS.MarkGroupDirty(g->h);
|
2008-06-02 09:31:26 +00:00
|
|
|
SS.GenerateAll();
|
2008-05-30 06:09:41 +00:00
|
|
|
SS.GW.ClearSuper();
|
|
|
|
}
|
2008-05-27 06:36:59 +00:00
|
|
|
void TextWindow::ScreenChangeExprA(int link, DWORD v) {
|
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
2008-06-12 04:36:33 +00:00
|
|
|
|
|
|
|
// There's an extra line for the skipFirst parameter in one-sided groups.
|
|
|
|
int r = (g->subtype == Group::ONE_SIDED) ? 15 : 13;
|
|
|
|
|
2008-06-14 08:43:38 +00:00
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "%d", (int)g->valA);
|
|
|
|
ShowTextEditControl(r, 9, str);
|
2008-05-27 06:36:59 +00:00
|
|
|
SS.TW.edit.meaning = EDIT_TIMES_REPEATED;
|
|
|
|
SS.TW.edit.group.v = v;
|
|
|
|
}
|
2008-05-27 09:52:36 +00:00
|
|
|
void TextWindow::ScreenChangeGroupName(int link, DWORD v) {
|
|
|
|
Group *g = SS.GetGroup(SS.TW.shown->group);
|
2008-06-03 18:28:41 +00:00
|
|
|
ShowTextEditControl(7, 14, g->DescriptionString()+5);
|
2008-05-27 09:52:36 +00:00
|
|
|
SS.TW.edit.meaning = EDIT_GROUP_NAME;
|
|
|
|
SS.TW.edit.group.v = v;
|
|
|
|
}
|
2008-06-02 11:43:27 +00:00
|
|
|
void TextWindow::ScreenDeleteGroup(int link, DWORD v) {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-06-02 11:43:27 +00:00
|
|
|
hGroup hg = SS.TW.shown->group;
|
|
|
|
if(hg.v == SS.GW.activeGroup.v) {
|
|
|
|
Error("This group is currently active; activate a different group "
|
|
|
|
"before proceeding.");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
SS.group.RemoveById(SS.TW.shown->group);
|
|
|
|
// This is a major change, so let's re-solve everything.
|
|
|
|
SS.TW.ClearSuper();
|
|
|
|
SS.GW.ClearSuper();
|
|
|
|
SS.GenerateAll(0, INT_MAX);
|
|
|
|
}
|
2008-04-25 08:26:15 +00:00
|
|
|
void TextWindow::ShowGroupInfo(void) {
|
|
|
|
Group *g = SS.group.FindById(shown->group);
|
2008-06-12 04:36:33 +00:00
|
|
|
char *s, *s2, *s3;
|
2008-05-27 09:52:36 +00:00
|
|
|
|
2008-06-02 11:43:27 +00:00
|
|
|
if(shown->group.v == Group::HGROUP_REFERENCES.v) {
|
2008-06-03 18:28:41 +00:00
|
|
|
Printf(true, "%FtGROUP %E%s", g->DescriptionString());
|
2008-06-02 11:43:27 +00:00
|
|
|
} else {
|
2008-06-03 18:28:41 +00:00
|
|
|
Printf(true, "%FtGROUP %E%s "
|
2008-06-11 04:22:52 +00:00
|
|
|
"[%Fl%Ll%D%frename%E/%Fl%Ll%D%fdel%E]",
|
2008-06-02 11:43:27 +00:00
|
|
|
g->DescriptionString(),
|
|
|
|
g->h.v, &TextWindow::ScreenChangeGroupName,
|
|
|
|
g->h.v, &TextWindow::ScreenDeleteGroup);
|
|
|
|
}
|
2008-05-17 08:02:39 +00:00
|
|
|
|
2008-05-29 10:10:12 +00:00
|
|
|
if(g->type == Group::IMPORTED) {
|
2008-06-03 18:28:41 +00:00
|
|
|
Printf(true, "%FtIMPORT%E '%s'", g->impFile);
|
2008-05-29 10:10:12 +00:00
|
|
|
}
|
|
|
|
|
2008-05-17 08:02:39 +00:00
|
|
|
if(g->type == Group::EXTRUDE) {
|
2008-06-03 18:28:41 +00:00
|
|
|
s = "EXTRUDE ";
|
2008-05-27 06:36:59 +00:00
|
|
|
} else if(g->type == Group::TRANSLATE) {
|
|
|
|
s = "TRANSLATE";
|
2008-06-12 04:36:33 +00:00
|
|
|
s2 ="REPEAT ";
|
|
|
|
s3 ="START ";
|
2008-05-27 06:36:59 +00:00
|
|
|
} else if(g->type == Group::ROTATE) {
|
2008-06-12 04:36:33 +00:00
|
|
|
s = "ROTATE ";
|
|
|
|
s2 ="REPEAT ";
|
|
|
|
s3 ="START ";
|
2008-05-27 06:36:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(g->type == Group::EXTRUDE || g->type == Group::ROTATE ||
|
|
|
|
g->type == Group::TRANSLATE)
|
|
|
|
{
|
|
|
|
bool one = (g->subtype == Group::ONE_SIDED);
|
|
|
|
Printf(true, "%Ft%s%E %Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E", s,
|
|
|
|
&TextWindow::ScreenChangeOneOrTwoSides,
|
|
|
|
(one ? "" : "one side"), (one ? "one side" : ""),
|
|
|
|
&TextWindow::ScreenChangeOneOrTwoSides,
|
2008-05-25 13:11:44 +00:00
|
|
|
(!one ? "" : "two sides"), (!one ? "two sides" : ""));
|
2008-05-27 06:36:59 +00:00
|
|
|
}
|
2008-06-06 11:35:28 +00:00
|
|
|
if(g->type == Group::LATHE) {
|
|
|
|
Printf(true, "%FtLATHE");
|
|
|
|
}
|
2008-06-03 18:28:41 +00:00
|
|
|
|
2008-05-27 06:36:59 +00:00
|
|
|
if(g->type == Group::ROTATE || g->type == Group::TRANSLATE) {
|
2008-06-12 04:36:33 +00:00
|
|
|
bool space;
|
|
|
|
if(g->subtype == Group::ONE_SIDED) {
|
|
|
|
bool skip = g->skipFirst;
|
|
|
|
Printf(true, "%Ft%s%E %Fh%f%Ll%s%E%Fs%s%E / %Fh%f%Ll%s%E%Fs%s%E",
|
|
|
|
s3,
|
|
|
|
&ScreenChangeSkipFirst,
|
|
|
|
(!skip ? "" : "with original"), (!skip ? "with original" : ""),
|
|
|
|
&ScreenChangeSkipFirst,
|
|
|
|
(skip ? "":"with copy #1"), (skip ? "with copy #1":""));
|
|
|
|
space = false;
|
|
|
|
} else {
|
|
|
|
space = true;
|
|
|
|
}
|
|
|
|
|
2008-06-14 08:43:38 +00:00
|
|
|
int times = (int)(g->valA);
|
2008-06-12 04:36:33 +00:00
|
|
|
Printf(space, "%Ft%s%E %d time%s %Fl%Ll%D%f[change]%E",
|
2008-05-27 06:36:59 +00:00
|
|
|
s2, times, times == 1 ? "" : "s",
|
2008-05-27 09:52:36 +00:00
|
|
|
g->h.v, &TextWindow::ScreenChangeExprA);
|
2008-05-27 06:36:59 +00:00
|
|
|
}
|
2008-06-03 18:28:41 +00:00
|
|
|
|
2008-06-06 11:35:28 +00:00
|
|
|
if(g->type == Group::EXTRUDE ||
|
|
|
|
g->type == Group::LATHE ||
|
|
|
|
g->type == Group::IMPORTED)
|
|
|
|
{
|
2008-06-03 18:28:41 +00:00
|
|
|
bool un = (g->meshCombine == Group::COMBINE_AS_UNION);
|
2008-05-25 13:11:44 +00:00
|
|
|
bool diff = (g->meshCombine == Group::COMBINE_AS_DIFFERENCE);
|
2008-06-03 18:28:41 +00:00
|
|
|
bool asy = (g->meshCombine == Group::COMBINE_AS_ASSEMBLE);
|
|
|
|
bool asa = (g->type == Group::IMPORTED);
|
|
|
|
|
|
|
|
Printf(false,
|
|
|
|
"%FtMERGE AS%E %Fh%f%D%Ll%s%E%Fs%s%E / %Fh%f%D%Ll%s%E%Fs%s%E %s "
|
|
|
|
"%Fh%f%D%Ll%s%E%Fs%s%E",
|
|
|
|
&TextWindow::ScreenChangeMeshCombine,
|
|
|
|
Group::COMBINE_AS_UNION,
|
|
|
|
(un ? "" : "union"), (un ? "union" : ""),
|
2008-05-25 13:11:44 +00:00
|
|
|
&TextWindow::ScreenChangeMeshCombine,
|
2008-06-03 18:28:41 +00:00
|
|
|
Group::COMBINE_AS_DIFFERENCE,
|
|
|
|
(diff ? "" : "difference"), (diff ? "difference" : ""),
|
|
|
|
asa ? "/" : "",
|
2008-05-25 13:11:44 +00:00
|
|
|
&TextWindow::ScreenChangeMeshCombine,
|
2008-06-03 18:28:41 +00:00
|
|
|
Group::COMBINE_AS_ASSEMBLE,
|
|
|
|
(asy || !asa ? "" : "assemble"), (asy && asa ? "assemble" : ""));
|
2008-05-17 08:02:39 +00:00
|
|
|
}
|
2008-06-04 06:39:32 +00:00
|
|
|
if(g->type == Group::IMPORTED && g->meshError.yes) {
|
|
|
|
Printf(false, "%Fx the parts interfere!");
|
|
|
|
}
|
2008-05-17 08:02:39 +00:00
|
|
|
|
2008-06-06 11:36:16 +00:00
|
|
|
if(g->type == Group::EXTRUDE || g->type == Group::LATHE) {
|
2008-05-30 06:09:41 +00:00
|
|
|
#define TWOX(v) v v
|
2008-06-03 18:28:41 +00:00
|
|
|
Printf(true, "%FtM_COLOR%E " TWOX(TWOX(TWOX("%Bp%D%f%Ln %Bd%E "))),
|
2008-06-11 04:22:52 +00:00
|
|
|
0x80000000 | SS.modelColor[0], 0, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[1], 1, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[2], 2, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[3], 3, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[4], 4, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[5], 5, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[6], 6, &TextWindow::ScreenColor,
|
|
|
|
0x80000000 | SS.modelColor[7], 7, &TextWindow::ScreenColor);
|
2008-05-30 06:09:41 +00:00
|
|
|
}
|
|
|
|
|
2008-06-12 04:36:33 +00:00
|
|
|
// Leave more space if the group has configuration stuff above the req/
|
|
|
|
// constraint list (as all but the drawing groups do).
|
|
|
|
if(g->type == Group::DRAWING_3D || g->type == Group::DRAWING_WORKPLANE) {
|
|
|
|
Printf(true, "%Ftrequests in group");
|
|
|
|
} else {
|
|
|
|
Printf(false, "");
|
|
|
|
Printf(false, "%Ftrequests in group");
|
|
|
|
}
|
2008-04-08 12:54:53 +00:00
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
int i, a = 0;
|
2008-04-18 11:11:48 +00:00
|
|
|
for(i = 0; i < SS.request.n; i++) {
|
2008-04-18 07:21:17 +00:00
|
|
|
Request *r = &(SS.request.elem[i]);
|
2008-04-08 12:54:53 +00:00
|
|
|
|
2008-04-25 08:26:15 +00:00
|
|
|
if(r->group.v == shown->group.v) {
|
2008-04-12 14:12:26 +00:00
|
|
|
char *s = r->DescriptionString();
|
2008-05-26 09:56:50 +00:00
|
|
|
Printf(false, "%Bp %Fl%Ll%D%f%h%s%E",
|
2008-04-28 07:18:39 +00:00
|
|
|
(a & 1) ? 'd' : 'a',
|
2008-05-26 09:56:50 +00:00
|
|
|
r->h.v, (&TextWindow::ScreenSelectRequest),
|
|
|
|
&(TextWindow::ScreenHoverRequest), s);
|
2008-04-28 07:18:39 +00:00
|
|
|
a++;
|
2008-04-27 09:03:01 +00:00
|
|
|
}
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
if(a == 0) Printf(false, "%Ba (none)");
|
2008-04-27 09:03:01 +00:00
|
|
|
|
2008-04-28 07:18:39 +00:00
|
|
|
a = 0;
|
|
|
|
Printf(true, "%Ftconstraints in group");
|
2008-04-27 09:03:01 +00:00
|
|
|
for(i = 0; i < SS.constraint.n; i++) {
|
|
|
|
Constraint *c = &(SS.constraint.elem[i]);
|
|
|
|
|
|
|
|
if(c->group.v == shown->group.v) {
|
|
|
|
char *s = c->DescriptionString();
|
2008-05-26 09:56:50 +00:00
|
|
|
Printf(false, "%Bp %Fl%Ll%D%f%h%s%E",
|
2008-04-28 07:18:39 +00:00
|
|
|
(a & 1) ? 'd' : 'a',
|
2008-05-26 09:56:50 +00:00
|
|
|
c->h.v, (&TextWindow::ScreenSelectConstraint),
|
|
|
|
(&TextWindow::ScreenHoverConstraint), s);
|
2008-04-28 07:18:39 +00:00
|
|
|
a++;
|
2008-04-08 12:54:53 +00:00
|
|
|
}
|
|
|
|
}
|
2008-04-28 07:18:39 +00:00
|
|
|
if(a == 0) Printf(false, "%Ba (none)");
|
2008-04-08 12:54:53 +00:00
|
|
|
}
|
|
|
|
|
2008-05-26 09:56:50 +00:00
|
|
|
void TextWindow::ShowGroupSolveInfo(void) {
|
|
|
|
Group *g = SS.group.FindById(shown->group);
|
2008-06-11 04:22:52 +00:00
|
|
|
if(g->solved.how == Group::SOLVED_OKAY) {
|
|
|
|
// Go back to the default group info screen
|
|
|
|
shown->screen = SCREEN_GROUP_INFO;
|
|
|
|
Show();
|
|
|
|
return;
|
|
|
|
}
|
2008-05-26 09:56:50 +00:00
|
|
|
|
2008-06-11 04:22:52 +00:00
|
|
|
Printf(true, "%FtGROUP %E%s", g->DescriptionString());
|
2008-05-26 09:56:50 +00:00
|
|
|
switch(g->solved.how) {
|
|
|
|
case Group::DIDNT_CONVERGE:
|
|
|
|
Printf(true, " %FxSOLVE FAILED!%Fd no convergence");
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Group::SINGULAR_JACOBIAN: {
|
|
|
|
Printf(true, "%FxSOLVE FAILED!%Fd inconsistent system");
|
|
|
|
Printf(true, "remove any one of these to fix it");
|
|
|
|
for(int i = 0; i < g->solved.remove.n; i++) {
|
|
|
|
hConstraint hc = g->solved.remove.elem[i];
|
2008-06-01 00:26:41 +00:00
|
|
|
Constraint *c = SS.constraint.FindByIdNoOops(hc);
|
|
|
|
if(!c) continue;
|
|
|
|
|
2008-05-26 09:56:50 +00:00
|
|
|
Printf(false, "%Bp %Fl%Ll%D%f%h%s%E",
|
|
|
|
(i & 1) ? 'd' : 'a',
|
|
|
|
c->h.v, (&TextWindow::ScreenSelectConstraint),
|
|
|
|
(&TextWindow::ScreenHoverConstraint),
|
|
|
|
c->DescriptionString());
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-11 04:30:18 +00:00
|
|
|
void TextWindow::ScreenChangeLightDirection(int link, DWORD v) {
|
2008-06-11 04:22:52 +00:00
|
|
|
char str[1024];
|
2008-06-11 04:30:18 +00:00
|
|
|
sprintf(str, "%.2f, %.2f, %.2f", CO(SS.lightDir[v]));
|
2008-06-11 04:22:52 +00:00
|
|
|
ShowTextEditControl(29+2*v, 8, str);
|
2008-06-11 04:30:18 +00:00
|
|
|
SS.TW.edit.meaning = EDIT_LIGHT_DIRECTION;
|
2008-06-11 04:22:52 +00:00
|
|
|
SS.TW.edit.i = v;
|
|
|
|
}
|
|
|
|
void TextWindow::ScreenChangeLightIntensity(int link, DWORD v) {
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "%.2f", SS.lightIntensity[v]);
|
|
|
|
ShowTextEditControl(29+2*v, 30, str);
|
|
|
|
SS.TW.edit.meaning = EDIT_LIGHT_INTENSITY;
|
|
|
|
SS.TW.edit.i = v;
|
|
|
|
}
|
|
|
|
void TextWindow::ScreenChangeColor(int link, DWORD v) {
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "%.2f, %.2f, %.2f",
|
|
|
|
REDf(SS.modelColor[v]),
|
|
|
|
GREENf(SS.modelColor[v]),
|
|
|
|
BLUEf(SS.modelColor[v]));
|
|
|
|
ShowTextEditControl(9+2*v, 12, str);
|
|
|
|
SS.TW.edit.meaning = EDIT_COLOR;
|
|
|
|
SS.TW.edit.i = v;
|
|
|
|
}
|
|
|
|
void TextWindow::ScreenChangeMeshTolerance(int link, DWORD v) {
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "%.2f", SS.meshTol);
|
|
|
|
ShowTextEditControl(37, 3, str);
|
|
|
|
SS.TW.edit.meaning = EDIT_MESH_TOLERANCE;
|
|
|
|
}
|
2008-06-17 19:12:25 +00:00
|
|
|
void TextWindow::ScreenChangeCameraTangent(int link, DWORD v) {
|
|
|
|
char str[1024];
|
|
|
|
sprintf(str, "%.3f", 1000*SS.cameraTangent);
|
|
|
|
ShowTextEditControl(43, 3, str);
|
|
|
|
SS.TW.edit.meaning = EDIT_CAMERA_TANGENT;
|
|
|
|
}
|
2008-06-11 04:22:52 +00:00
|
|
|
void TextWindow::ShowConfiguration(void) {
|
|
|
|
int i;
|
|
|
|
Printf(true, "%Ft material color-(r, g, b)");
|
|
|
|
|
|
|
|
for(i = 0; i < SS.MODEL_COLORS; i++) {
|
|
|
|
Printf(false, "%Bp #%d: %Bp %Bp (%@, %@, %@) %f%D%Ll%Fl[change]%E",
|
|
|
|
(i & 1) ? 'd' : 'a',
|
|
|
|
i, 0x80000000 | SS.modelColor[i],
|
|
|
|
(i & 1) ? 'd' : 'a',
|
|
|
|
REDf(SS.modelColor[i]),
|
|
|
|
GREENf(SS.modelColor[i]),
|
|
|
|
BLUEf(SS.modelColor[i]),
|
|
|
|
&ScreenChangeColor, i);
|
|
|
|
}
|
|
|
|
|
|
|
|
Printf(false, "");
|
2008-06-11 04:30:18 +00:00
|
|
|
Printf(false, "%Ft light direction intensity");
|
2008-06-11 04:22:52 +00:00
|
|
|
for(i = 0; i < 2; i++) {
|
|
|
|
Printf(false, "%Bp #%d (%2,%2,%2)%Fl%D%f%Ll[c]%E "
|
|
|
|
"%2 %Fl%D%f%Ll[c]%E",
|
|
|
|
(i & 1) ? 'd' : 'a', i,
|
2008-06-11 04:30:18 +00:00
|
|
|
CO(SS.lightDir[i]), i, &ScreenChangeLightDirection,
|
2008-06-11 04:22:52 +00:00
|
|
|
SS.lightIntensity[i], i, &ScreenChangeLightIntensity);
|
|
|
|
}
|
|
|
|
|
|
|
|
Printf(false, "");
|
|
|
|
Printf(false, "%Ft mesh tolerance (smaller is finer)%E");
|
|
|
|
Printf(false, "%Ba %2 %Fl%Ll%f%D[change]%E; now %d triangles",
|
|
|
|
SS.meshTol,
|
|
|
|
&ScreenChangeMeshTolerance, 0,
|
|
|
|
SS.group.elem[SS.group.n-1].mesh.l.n);
|
2008-06-17 19:12:25 +00:00
|
|
|
|
|
|
|
Printf(false, "");
|
|
|
|
Printf(false, "%Ft perspective factor (0 for isometric)%E");
|
|
|
|
Printf(false, "%Ba %3 %Fl%Ll%f%D[change]%E",
|
|
|
|
SS.cameraTangent*1000,
|
|
|
|
&ScreenChangeCameraTangent, 0);
|
2008-06-11 04:22:52 +00:00
|
|
|
}
|
|
|
|
|
2008-05-27 06:36:59 +00:00
|
|
|
void TextWindow::EditControlDone(char *s) {
|
|
|
|
switch(edit.meaning) {
|
|
|
|
case EDIT_TIMES_REPEATED: {
|
2008-06-01 08:45:11 +00:00
|
|
|
Expr *e = Expr::From(s);
|
2008-05-27 06:36:59 +00:00
|
|
|
if(e) {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-05-27 06:36:59 +00:00
|
|
|
Group *g = SS.GetGroup(edit.group);
|
2008-06-14 08:43:38 +00:00
|
|
|
g->valA = e->Eval();
|
2008-06-02 11:43:27 +00:00
|
|
|
|
|
|
|
SS.MarkGroupDirty(g->h);
|
2008-06-03 18:28:41 +00:00
|
|
|
SS.later.generateAll = true;
|
2008-05-27 06:36:59 +00:00
|
|
|
} else {
|
|
|
|
Error("Not a valid number or expression: '%s'", s);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2008-05-27 09:52:36 +00:00
|
|
|
case EDIT_GROUP_NAME: {
|
|
|
|
char *t;
|
|
|
|
bool invalid = false;
|
|
|
|
for(t = s; *t; t++) {
|
|
|
|
if(!(isalnum(*t) || *t == '-' || *t == '_')) {
|
|
|
|
invalid = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(invalid || !*s) {
|
|
|
|
Error("Invalid characters. Allowed are: A-Z a-z 0-9 _ -");
|
|
|
|
} else {
|
2008-06-04 10:22:30 +00:00
|
|
|
SS.UndoRemember();
|
|
|
|
|
2008-05-27 09:52:36 +00:00
|
|
|
Group *g = SS.GetGroup(edit.group);
|
|
|
|
g->name.strcpy(s);
|
|
|
|
}
|
2008-06-03 18:28:41 +00:00
|
|
|
SS.unsaved = true;
|
2008-05-27 09:52:36 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-06-11 04:22:52 +00:00
|
|
|
case EDIT_LIGHT_INTENSITY:
|
|
|
|
SS.lightIntensity[edit.i] = min(1, max(0, atof(s)));
|
|
|
|
InvalidateGraphics();
|
|
|
|
break;
|
2008-06-11 04:30:18 +00:00
|
|
|
case EDIT_LIGHT_DIRECTION: {
|
2008-06-11 04:22:52 +00:00
|
|
|
double x, y, z;
|
|
|
|
if(sscanf(s, "%lf, %lf, %lf", &x, &y, &z)==3) {
|
2008-06-11 04:30:18 +00:00
|
|
|
SS.lightDir[edit.i] = Vector::From(x, y, z);
|
2008-06-11 04:22:52 +00:00
|
|
|
} else {
|
|
|
|
Error("Bad format: specify coordinates as x, y, z");
|
|
|
|
}
|
|
|
|
InvalidateGraphics();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EDIT_COLOR: {
|
|
|
|
double r, g, b;
|
|
|
|
if(sscanf(s, "%lf, %lf, %lf", &r, &g, &b)==3) {
|
|
|
|
SS.modelColor[edit.i] = RGB(r*255, g*255, b*255);
|
|
|
|
} else {
|
|
|
|
Error("Bad format: specify color as r, g, b");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case EDIT_MESH_TOLERANCE: {
|
|
|
|
SS.meshTol = min(10, max(0.1, atof(s)));
|
|
|
|
SS.GenerateAll(0, INT_MAX);
|
|
|
|
break;
|
|
|
|
}
|
2008-06-17 19:12:25 +00:00
|
|
|
case EDIT_CAMERA_TANGENT: {
|
|
|
|
SS.cameraTangent = (min(2, max(0, atof(s))))/1000.0;
|
|
|
|
InvalidateGraphics();
|
|
|
|
break;
|
|
|
|
}
|
2008-05-27 06:36:59 +00:00
|
|
|
}
|
2008-06-11 04:22:52 +00:00
|
|
|
SS.later.showTW = true;
|
2008-05-27 09:52:36 +00:00
|
|
|
HideTextEditControl();
|
2008-05-27 06:36:59 +00:00
|
|
|
edit.meaning = EDIT_NOTHING;
|
|
|
|
}
|
2008-04-18 07:06:37 +00:00
|
|
|
|