void Lines_window::next() {
	int x = next_x.get_int();
	int y = next_y.get_int();
	lines.add(Point{x,y});
	ostringstream os;
	os << '(' << x << ',' << y << ')';
	xy_out.put(os.str());
	redraw();
}
示例#2
0
文件: 01.cpp 项目: fanqo/PPPCpp
void Lines_window::next()
{
  int x = next_x.get_int();
  int y = next_y.get_int();
  lines.add(Point{x, y});
  // update current position readout:
  ostringstream ss;
  ss << '(' << x << ',' << y << ')';
  xy_out.put(ss.str());

  redraw();
}
示例#3
0
void Lines_window::next()
{
    int x = next_x.get_int();
    int y = next_y.get_int();

    lines.add(Point(x, y));

    stringstream ss;
    ss << '(' << x << ',' << y << ')';
    xy_out.put(ss.str());

    redraw();
}
int get_int(In_box& ib)
{
    int i = ib.get_int();
    if (i == -999999) error("Invalid value in ",ib.label);
    return i;
}
示例#5
0
		void hexagon_push(){
			kind.hide();
			shapes.push_back(new Regular_polygon(Point(inbox_x.get_int(), inbox_y.get_int()), radius, 6));
			attach(shapes[shapes.size() - 1]);
			menu.show();
		}
示例#6
0
		void circle_push(){
			kind.hide(); 
			shapes.push_back(new Circle(Point(inbox_x.get_int(), inbox_y.get_int()), radius));
			attach(shapes[shapes.size()-1]); 
			menu.show(); 
		}