1 #include <../../nrnconf.h> 2 #if HAVE_IV // to end of file 4 #include <InterViews/session.h> 5 #include <InterViews/display.h> 6 #include <InterViews/color.h> 7 #include <InterViews/brush.h> 8 #include <InterViews/canvas.h> 9 #include <InterViews/printer.h> 10 #include <InterViews/window.h> 11 #include <InterViews/transformer.h> 24 printf(
"no help for this Rubberband action\n");
30 printf(
"no help for this handler\n");
41 xor_color_ =
new Color(0,0,0,1,Color::Xor);
43 brush_ =
new Brush(0);
62 t_ = c->transformer();
84 e.window()->grab_pointer();
86 x_ = x_begin_ = e.pointer_x();
87 y_ = y_begin_ = e.pointer_y();
103 e.window()->ungrab_pointer();
139 Coord x1, y1, x2, y2;
144 if (x1 < x2 && y1 < y2) {
157 printf(
"RubberRect::help\n");
167 get_rect_canvas(x1,y1,x2,y2);
169 t.inverse_transform(x1, y1);
170 t.inverse_transform(x2, y2);
178 printf(
"RubberRect::help\n");
198 get_line_canvas(x1,y1,x2,y2);
200 t.inverse_transform(x1, y1);
201 t.inverse_transform(x2, y2);
virtual void get_rect(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
double max(double a, double b)
virtual void draw(Coord, Coord)
virtual void press(Event &)
virtual void undraw(Coord x, Coord y)
static void pr(N_Vector x)
virtual void drag(Event &)
virtual void get_line(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual void draw(Coord, Coord)
static const Color * color()
static const Color * xor_color_
virtual void get_rect_canvas(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual void draw(Coord x, Coord y)
virtual void unref() const
const Event & event() const
RubberLine(RubberAction *=NULL, Canvas *=NULL)
static Rubberband * current_
static const Brush * brush_
virtual void execute(Rubberband *)
static const Brush * brush()
virtual void snapshot(Printer *)
Rubberband(RubberAction *=NULL, Canvas *=NULL)
virtual void get_line_canvas(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual void release(Event &)
RubberRect(RubberAction *=NULL, Canvas *=NULL)