1 #include <../../nrnconf.h> 5 #if HAVE_IV // to end of file 8 #include <InterViews/display.h> 9 #include <InterViews/session.h> 10 #include <InterViews/background.h> 11 #include <InterViews/style.h> 12 #include <InterViews/window.h> 13 #include <InterViews/tformsetter.h> 14 #include <InterViews/brush.h> 15 #include <InterViews/action.h> 16 #include <InterViews/color.h> 17 #include <InterViews/hit.h> 18 #include <InterViews/handler.h> 19 #include <InterViews/event.h> 20 #include <InterViews/telltale.h> 21 #include <InterViews/layout.h> 22 #include <IV-look/kit.h> 42 #define Shape_Section_ "Section PlotShape" 43 #define Shape_Rotate_ "Rotate3D PlotShape" 44 #define Shape_Style_ "ShapeStyle PlotShape" 57 static long beveljoin_ = 0;
62 class ShapeChangeObserver :
public Observer {
65 virtual ~ShapeChangeObserver();
75 static const Color* sec_sel_color() {
79 Display* dis = Session::instance()->default_display();
80 if (!dis->style()->find_attribute(
"section_select_color", c)
89 static const Color* sec_adjacent_color() {
93 Display* dis = Session::instance()->default_display();
94 if (!dis->style()->find_attribute(
"section_adjacent_color", c)
103 inline float norm(
float x,
float y) {
return (x*x + y*y);}
109 PointMark(OcShape*,
Object*,
const Color*,
const char style =
'O',
float size = 8.);
110 virtual ~PointMark();
114 const Object* object() {
return ob_;}
115 virtual void set_loc(
Section*,
float x);
116 bool everything_ok();
126 class OcShapeHandler;
131 virtual void select_section(
Section*);
132 virtual void handle_picked();
136 virtual void set_select_action(
const char*);
137 virtual void set_select_action(
Object*);
138 virtual void save_phase1(ostream&);
139 virtual PointMark* point_mark(
Object*,
const Color*,
const char style =
'O',
const float size = 8.);
140 virtual PointMark* point_mark(
Section*,
float x,
const Color*);
141 virtual void point_mark_remove(
Object* pp =
NULL);
143 virtual void erase_all();
148 OcShapeHandler* osh_;
150 bool show_adjacent_selection_;
155 OcShapeHandler(OcShape*);
156 virtual ~OcShapeHandler();
157 virtual bool event(
Event&);
161 OcShapeHandler::OcShapeHandler(OcShape*
s) { s_ =
s; }
162 OcShapeHandler::~OcShapeHandler() {}
163 bool OcShapeHandler::event(
Event&) {
177 OcShape* sh = (OcShape*)v;
180 for (i=0; i < 8; ++
i) {
220 ((OcShape*)v)->select_section(sec);
232 ((OcShape*)v)->set_select_action(
gargstr(1));
268 if (s && s->
good()) {
270 d = ss->arc_selected();
285 ssec = ss->selected();
287 d = ss->arc_selected();
288 obj = (*nrnpy_seg_from_sec_x)(ssec->
section(), d);
303 ssec = ss->selected();
305 double d = ss->arc_selected();
306 obj = (*nrnpy_seg_from_sec_x)(ssec->
section(), d);
377 s->colorseg(sec, x, c);
416 OcShape*
s = (OcShape*)v;
424 style = char(
chkarg(3, 0, 127));
428 size = float(
chkarg(4, 1
e-9, 1e9));
445 OcShape*
s = (OcShape*)v;
449 s->point_mark_remove(o);
471 s->shape_type(
int(
chkarg(1, 0., 2.)));
580 sh =
new OcShape(sl);
610 point_mark_list_ =
NULL;
611 osh_ =
new OcShapeHandler(
this);
613 section_handler(osh_);
615 Display* dis = Session::instance()->default_display();
616 show_adjacent_selection_ = dis->style()->value_is_on(
"show_adjacent_selection");
619 if (select_)
delete select_;
625 void OcShape::erase_all() {
627 point_mark_list_ =
NULL;
631 PointMark* OcShape::point_mark(
Object* ob,
const Color* c,
const char style,
const float size) {
632 if (!point_mark_list_) {
635 PointMark*
g =
new PointMark(
this, ob, c, style, size);
636 point_mark_list_->append(g);
638 if (!g->everything_ok()) {
639 point_mark_list_->remove(point_mark_list_->count()-1);
640 remove(glyph_index(g));
646 PointMark* OcShape::point_mark(
Section*
sec,
float x,
const Color* c) {
647 if (!point_mark_list_) {
650 PointMark*
g =
new PointMark(
this, NULL, c);
652 point_mark_list_->append(g);
654 if (!g->everything_ok()) {
655 point_mark_list_->remove(point_mark_list_->count()-1);
656 remove(glyph_index(g));
661 void OcShape::point_mark_remove(
Object*
o) {
662 if (point_mark_list_) {
665 for (i=cnt-1; i >= 0; --
i) {
666 PointMark*
g = (PointMark*)point_mark_list_->component(i);
667 if (g->object() ==
o) {
668 remove(glyph_index(g));
669 point_mark_list_->remove(i);
674 while(point_mark_list_->count()) {
675 remove(glyph_index(point_mark_list_->component(0)));
676 point_mark_list_->remove(0);
682 void OcShape::set_select_action(
const char*
s) {
689 void OcShape::set_select_action(
Object* pobj) {
704 if (show_adjacent_selection_) {
710 ss = shape_section(s);
720 c = sec_adjacent_color();
722 if (show_adjacent_selection_) {
728 ss = shape_section(s);
736 void OcShape::select_section(
Section* sec) {
741 ss = shape_section(sec);
750 void OcShape::handle_picked() {
752 if (!s1 || !s1->
good()) {
755 sel_color(sold_, s1);
770 void OcShape::save_phase1(ostream& o) {
772 save_class(o,
"Shape");
779 (s->
x1() + s->
x2())/2, (s->
y1() + s->
y2())/2,
791 Coord x1, y1, x2, y2;
792 zout(x1, y1, x2, y2);
793 size(x1, y1, x2, y2);
800 class ShapeType :
public Action {
803 virtual ~ShapeType();
808 ShapeType::ShapeType(
int st) {
811 ShapeType::~ShapeType() {}
832 while(sg_->count()) {
836 sg_->remove(sg_->count()-1);
855 volatile_ptr_ref =
NULL;
857 if (shape_changed_) {
864 shape_changed_->force();
870 new_size(-100,-100,100,100);
875 shape_changed_ =
NULL;
881 wk.style()->find_attribute(
"shape_beveljoin", beveljoin_);
887 section_handler_ =
NULL;
891 picker()->remove_item(
"Crosshair");
892 picker()->remove_item(
"Plot what?");
893 picker()->remove_item(
"Pick Vector");
894 picker()->remove_item(
"Color/Brush");
895 picker()->remove_item(
"Keep Lines");
896 picker()->remove_item(
"Family Label?");
897 picker()->remove_item(
"Erase");
898 picker()->remove_item(
"Remove");
902 m2->state()->set(TelltaleState::is_chosen,
true);
903 picker()->add_radio_menu(
"3D Rotate", r3b_, 0, ROTATE);
904 picker()->add_menu(
"Redraw Shape",
908 mi = wk.menu_item(
"Show Diam");
910 picker()->add_menu(
"Show Diam", mi, m);
911 mi = wk.menu_item(
"Centroid");
913 picker()->add_menu(
"Centroid", mi, m);
914 mi = wk.menu_item(
"Schematic");
916 picker()->add_menu(
"Schematic", mi, m);
917 mi = wk.menu_item(
"Shape Style");
919 picker()->add_menu(mi);
922 Coord x1, y1, x2, y2;
923 Coord xt1 = 0, yt1 = 0, xt2 = 0, yt2 = 0;
925 for (i=0; i <
cnt; ++
i) {
934 color_value_ =
new ColorValue();
936 shape_changed_ =
new ShapeChangeObserver(
this);
958 volatile_ptr_ref =
NULL;
963 delete shape_changed_;
973 volatile_ptr_ref =
NULL;
984 float xrad,
float yrad,
float zrad)
987 rot->
origin(xorg, yorg, zorg);
1007 for (i=0; i <
n; ++
i) {
1013 if (shape_changed_->needs_update()) {
1014 shape_changed_->update(
NULL);
1021 long i,
j,
n = sg_->count();
1025 for (i=0; i <
n; ++
i) {
1032 if (x1 >= x2 || y1 >= y2) {
1051 if ((var_name_->string())[var_name_->length() - 1] ==
'.') {
1052 sprintf(buf,
"%sappend(save_window_)", var_name_->string());
1054 sprintf(buf,
"%s = save_window_", var_name_->string());
1057 sprintf(buf,
"save_window_.save_name(\"%s\")",
1058 var_name_->string());
1065 Coord x1, y1, x2, y2,
t, b, l, r;
1068 printf(
"new view with %g %g %g %g\n", x1, y1, x2, y2);
1070 double d1, d2;
int ntic;
1080 v =
new View((x2+x1)/2, (y1+y2)/2, x2 - x1,
this,
1081 r - l, (r - l)*(y2 - y1)/(x2 - x1)),
1085 w->place(l + e.pointer_root_x() - e.pointer_x(),
1086 b + e.pointer_root_y() - e.pointer_y());
1093 section_handler_ = h;
1097 if (section_handler_) {
1100 return section_handler_;
1103 return section_handler_;
1114 for (i=0; i <
cnt; ++
i) {
1130 if (
this != volatile_ptr_ref) {
1131 volatile_ptr_ref =
this;
1135 for (i=0; i <
cnt; ++
i) {
1147 static bool par_helper(
Section* sec) {
1179 for (i=0; i <
cnt; ++
i) {
1187 if (par_helper(ss->
section())) {
1198 if (ss && ss->
color() !=
c) {
1205 if (ss && ss->
color() !=
c) {
1212 for (i=0; i <
cnt; ++
i) {
1227 for (i=0; i <
cnt; ++
i) {
1245 w->
xplace(
int(x[4]),
int(x[5]));
1260 if (!selected() || x_sel_ ==
fil) {
1263 return selected()->arc_position(x_sel_, y_sel_);
1277 if (sec_->npt3d == 0) {
1290 int n = sec_->npt3d -1;
1302 if (n_ != sec_->npt3d) {
1303 if (sec_->npt3d == 0) {
1313 Coord x0, y0, xp, yp;
1314 r[0] = sec_->pt3d[0].x;
1315 r[1] = sec_->pt3d[0].y;
1316 r[2] = sec_->pt3d[0].z;
1342 if (logic_con) {
break; }
1346 r[0] = logic_con->
x;
1347 r[1] = logic_con->
y;
1348 r[2] = logic_con->
z;
1356 for (i=0; i < n_; ++
i) {
1357 r[0] = sec_->pt3d[
i].x;
1358 r[1] = sec_->pt3d[
i].y;
1359 r[2] = sec_->pt3d[
i].z;
1361 x_[
i] = xp + len_scale_*(r[0] - x0);
1362 y_[
i] = yp + len_scale_*(r[1] - y0);
1373 for (i=1; i < n_; i++) {
1386 double a =
arc0at0(sec_) ? arc : 1. - arc;
1391 }
else if (a >= .999) {
1392 i = sec_->npt3d - 1;
1395 for (i = 1; i < sec_->npt3d; ++
i) {
1398 if (a < (sec_->pt3d[i].arc + sec_->pt3d[i-1].arc)) {
1404 if (a <= sec_->pt3d[i].arc) {
1405 float a1 = sec_->pt3d[i-1].arc;
1406 float a2 = sec_->pt3d[
i].arc;
1408 float t1 = (a - a1)/(a2 - a1);
1409 x =
x_[
i]*t1 +
x_[i-1]*(1. - t1);
1410 y =
y_[
i]*t1 +
y_[i-1]*(1. - t1);
1428 if (t->test(TelltaleState::is_enabled_active)) {
1429 setColor(sec_sel_color());
1431 }
else if (t->test(TelltaleState::is_enabled)) {
1432 if (color_ == sec_sel_color()) {
1446 Requirement rx( -xmin_, -xmin_, -xmin_, xmax_, xmax_, xmax_);
1447 Requirement ry( -ymin_, -ymin_, -ymin_, ymax_, ymax_, ymax_);
1491 return sec_->prop != 0;
1495 if (!pvar_) {
return; }
1496 int i,
n = section()->nnode-1;
1497 for (i=0; i <
n; ++
i) {
1507 int i,
n=section()->nnode-1;
1508 pvar_ =
new double*[
n];
1509 old_ =
new const Color*[
n];
1512 for (i=0; i <
n; ++
i) {
1522 for (i=0; i <
n; ++
i) {
1538 for (
int i=0;
i < colorseg_size_; ++
i) {
1539 colorseg_[
i]->unref();
1541 delete [] colorseg_;
1560 printf(
"xmin_=%g a.left=%g ymin_=%g a.bottom=%g xmax_=%g a.right=%g\n",
1565 fast_draw(c, x, y,
true);
1571 if (pvar_ || (colorseg_ && colorseg_size_ == sec_->nnode-1)) {
1577 if (sec->
nnode == 2) {
1579 color = colorseg_[0];
1582 color = cv->get_color(*pvar_[0]);
1584 color = cv->no_value();
1586 if (color != old_[0] || b) {
1592 draw_points(c, color, 0, sec_->npt3d);
1596 }
else if (sec->
npt3d > 2) {
1622 for (iseg = 0; iseg < sec->
nnode - 1; ++iseg) {
1624 color = colorseg_[iseg];
1627 color = cv->get_color(*pvar_[iseg]);
1629 color = cv->no_value();
1631 if (color != old_[iseg] || b) {
1636 xend = double(iseg+1)*dseg;
1637 for ( ; i3d < sec->
npt3d; ++i3d) {
1638 a3dold = sec_->pt3d[i3d-1].arc;
1639 a3dnew = sec_->pt3d[i3d].arc;
1640 if (a3dnew > xend) {
1641 frac = (a3dnew - xend)/dseg;
1645 fastidious_draw(c, color, i3d, xbegin, a3dnew);
1651 fastidious_draw(c, color, i3d, xbegin, xend);
1657 fastidious_draw(c, color, i3d, xbegin, a3dnew);
1663 #endif // FASTIDIOUS 1666 for (
int iseg = 0; iseg < sec->
nnode - 1; ++iseg) {
1668 color = colorseg_[iseg];
1671 color = cv->get_color(*pvar_[iseg]);
1673 color = cv->no_value();
1675 if (color != old_[iseg] || b) {
1681 draw_seg(c, color, iseg);
1686 draw_points(c, color_, 0, sec_->npt3d);
1694 float len, f1, f2, d, x1, x2, y1, y2, a, aa;
1695 if (!color) {
return; }
1697 a = sec_->pt3d[
i].arc;
1698 aa = sec_->pt3d[i1].arc;
1699 if ((aa - a) < 1
e-5) {
return; }
1700 f1 = (a1 - a)/(aa - a);
1701 f2 = (a2 - a)/(aa - a);
1710 float d1, d2, t1, t2;
1713 d1 = f1*(t2 - t1) + t1;
1714 d2 = f2*(t2 - t1) + t1;
1715 trapezoid(c, color, x1,y1,x2,y2,d1,d2);
1718 bevel_join(c, color, i, t1);
1737 if (i == 0) {
return; }
1738 float perp1[2], perp2[2], x, y;
1743 if (b && (perp1[0] != perp2[0] || perp1[1] != perp2[1])) {
1745 xt[0] = x + d*perp1[0]; yt[0] = y + d*perp1[1];
1746 xt[1] = x - d*perp2[0]; yt[1] = y - d*perp2[1];
1747 xt[2] = x - d*perp1[0]; yt[2] = y - d*perp1[1];
1748 xt[3] = x + d*perp2[0]; yt[3] = y + d*perp2[1];
1751 c->move_to(xt[0], yt[0]);
1752 for (i = 1; i < 4; ++
i) {
1753 c->line_to(xt[i], yt[i]);
1767 float darc = 1./float(sec_->nnode - 1);
1771 if (sec_->nnode == 2) {
1774 draw_points(c, color, i, j);
1775 }
else if ( sec_->npt3d == 2 ) {
1776 float x1, x2, y1, y2;
1777 x1 = darc*iseg*(
x_[1] -
x_[0]) +
x_[0];
1778 x2 = darc*(iseg + 1)*(
x_[1] -
x_[0]) +
x_[0];
1779 y1 = darc*iseg*(
y_[1] -
y_[0]) +
y_[0];
1780 y2 = darc*(iseg + 1)*(
y_[1] -
y_[0]) +
y_[0];
1783 float d1, d2, t1, t2;
1786 d1 = darc*iseg*(t2 - t1) + t1;
1787 d2 = darc*(iseg + 1)*(t2 - t1) + t1;
1788 trapezoid(c, color, x1,y1,x2,y2,d1,d2);
1800 for (i = 1; i < sec_->npt3d; i++) {
1801 if (sec_->pt3d[i].arc > x) {
1807 for (j = i+1; j < sec_->npt3d; j++) {
1808 if (sec_->pt3d[j].arc > x) {
1812 draw_points(c, color, i, j);
1820 trapezoid(c, color, i);
1823 bevel_join(c, color, i-1,
Math::abs(sec_->pt3d[i-1].d)/2);
1831 c->move_to(
x_[i],
y_[i]);
1833 c->line_to(
x_[i],
y_[i]);
1840 c->line(
x_[i],
y_[i],
1848 trapezoid(c, color,
x_[i-1],
y_[i-1],
x_[i],
y_[i],
1855 float x1,
float y1,
float x2,
float y2,
float d1,
float d2)
const{
1856 float x, y, rx, ry, d, norm;
1859 norm =
sqrt(x*x + y*y);
1870 c->move_to(x1 + rx*d, y1 + ry*d);
1871 c->line_to(x1 - rx*d, y1 - ry*d);
1873 c->line_to(x2 - rx*d, y2 - ry*d);
1874 c->line_to(x2 + rx*d, y2 + ry*d);
1880 xt[0] = x1 + rx*d; yt[0] = y1 + ry*d;
1881 xt[1] = x1 - rx*d; yt[1] = y1 - ry*d;
1883 xt[2] = x2 - rx*d; yt[2] = y2 - ry*d;
1884 xt[3] = x2 + rx*d; yt[3] = y2 + ry*d;
1890 if (x <= 0.0 || x >= 1.0) {
return; }
1891 if (colorseg_size_ != sec_->nnode - 1) {
1895 colorseg_size_ = sec_->nnode - 1;
1896 colorseg_ =
new const Color*[colorseg_size_];
1897 for (
int i=0; i < colorseg_size_; ++
i) {
1898 colorseg_[
i] = color_;
1902 int i =
int(x * colorseg_size_);
1904 colorseg_[
i]->unref();
1918 if (!good() || ! h.event() || h.event()->type() != Event::down)
return;
1920 Coord y = h.bottom();
1926 Coord x2 = how_near(x, y);
1937 h.target(depth,
this, 0,
1952 int n = sec_->npt3d;
1953 for (
int i=1; i <
n; ++
i) {
1967 int n = sec_->npt3d;
1969 for (
int i=1; i <
n; ++
i) {
1983 int ic,
n = sec_->npt3d;
1985 float darc, len, dlen1;
1986 for (
int i=1; i <
n; ++
i) {
2001 if (dlen1 <= d + 1
e-2) {
2003 }
else if (len <= d + 1
e-2) {
2006 darc =
sqrt(dlen1 - d);
2009 d = sec_->pt3d[ic].arc + darc;
2011 d = (d < 0.) ? 0. : d;
2012 d = (d > 1.) ? 1. : d;
2015 float dx = 1./(sec_->nnode-1);
2018 }
else if (d > 1. - dx/4.) {
2021 d = (
int(d*(sec_->nnode - 1)) + .5)*dx;
2027 int i,
n = sec_->npt3d;
2030 for (i=0; i <
n; ++
i) {
2031 if (arc < sec_->pt3d[i].arc) {
2040 double frac = (arc - sec_->pt3d[i-1].arc)
2041 / (sec_->pt3d[i].arc - sec_->pt3d[i-1].arc);
2042 x =
x_[i-1]*(1-frac) +
x_[i]*frac;
2043 y =
y_[i-1]*(1-frac) +
y_[i]*frac;
2044 i = (i > 0 && frac < .5) ? i-1 :
i;
2051 s->
damage(xmin_, ymin_, xmax_, ymax_);
2058 shape_section(
NULL);
2070 PointMark::PointMark(OcShape* sh,
Object* ob,
const Color* c,
const char style,
const float size) :
MonoGlyph(
NULL) {
2081 PointMark::~PointMark() {
2096 sh_->point_mark_remove(ob);
2107 tv.inverse_transform(
x_,
y_, x, y);
2110 MonoGlyph::draw(c, a);
2113 void PointMark::set_loc(
Section* sec,
float x) {
2118 bool PointMark::everything_ok() {
2122 if (pnt && pnt->
sec) {
2127 if (!sec_ || ! sec_->prop) {
2135 if (i_ >= sh_->count() || sh_->component(i_) != (
Glyph*)
this) {
2136 i_ = sh_->glyph_index(
this);
2138 if (i_ < 0)
return false;
2139 sh_->move(i_,
x_,
y_);
2146 if (point_mark_list_) {
2148 for (i=0; i <
cnt; ++
i) {
2149 ((PointMark*)point_mark_list_->component(i))->
update(
NULL);
2154 ShapeChangeObserver::ShapeChangeObserver(
ShapeScene* s) {
2161 ShapeChangeObserver::~ShapeChangeObserver() {
2170 volatile_ptr_ref =
NULL;
2174 if (s_->view_all()) {
double ivoc_gr_size(void *)
void loc(double, Coord &, Coord &)
virtual void allocate(Canvas *, const Allocation &, Extension &)
static ostream * idraw_stream
double max(double a, double b)
static HocMark * instance(char style, float size, const Color *, const Brush *)
int hoc_is_str_arg(int narg)
double nrniv_sh_nearest(void *v)
void set(Canvas *, const Allocation &)
static double sh_point_mark(void *v)
virtual ~SectionHandler()
const Transformer & s2o() const
#define TRY_GUI_REDIRECT_NO_RETURN(name, obj)
double nrniv_len_scale(void *v)
static double sh_select_action(void *v)
virtual void fast_draw(Canvas *, Coord x, Coord y, bool) const
static void round_range(Coord x1, Coord x2, double &y1, double &y2, int &ntic)
struct Section * parentsec
static void * sh_cons(Object *ho)
void shape_section(ShapeSection *)
static void pnode(Prop *)
static double sh_begin(void *v)
virtual void save_phase2(std::ostream &)
static float distance_to_line_segment(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2)
double nrn_arc_position(Section *sec, Node *node)
int get_coord(double arc, Coord &, Coord &) const
static bool equal(float x, float y, float e)
double ivoc_erase_all(void *)
virtual SectionHandler * section_handler()
static bool near_line_segment(Coord x, Coord y, Coord x1, Coord y1, Coord x2, Coord y2, float epsilon)
static bool unit_normal(Coord x, Coord y, Coord *perp)
static void help(const char *)
virtual bool event(Event &)
static void update(NrnThread *)
double ivoc_gr_mark(void *)
check_obj_type(o, "SectionList")
#define RubberCallback(T)
void fastidious_draw(Canvas *, const Color *, int, float, float) const
void origin(float x, float y, float z)
virtual void transform3d(Rubberband *rb=NULL)
virtual void setColorseg(const Color *, double, ShapeScene *)
virtual void section_handler(SectionHandler *)
static Member_func sh_members[]
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
short nrn_value_mark(Section *)
double nrniv_sh_push(void *v)
static double sh_select(void *v)
#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE(name, obj)
int arc0at0(Section *sec)
Section * section() const
#define declareRubberCallback(T)
static double exec_menu(void *v)
struct Pt3d * logical_connection
virtual float nearest(Coord, Coord)
static void Attach(Object *, Observer *)
static float norm2(Coord x, Coord y)
double ivoc_gr_menu_action(void *v)
virtual void selectMenu()
static const Color * default_foreground()
virtual void wholeplot(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
void rotate_z(float radians)
void append(Item *ql, Item *q)
Object ** nrniv_sh_nearest_seg(void *v)
int const size_t const size_t n
virtual void transform3d(Rotation3d *)
virtual void wholeplot(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
virtual void damage(GlyphIndex)
double(* nrnpy_object_to_double_)(Object *)
void hoc_ivbutton(CChar *name, CChar *action, Object *pyact=0)
void notify_detach(Observer *)
void class2oc(const char *, void *(*cons)(Object *), void(*destruct)(void *), Member_func *, int(*checkpoint)(void **), Member_ret_obj_func *, Member_ret_str_func *)
virtual ShapeSection * selected()
virtual void save_phase2(std::ostream &)
double nrn_connection_position(Section *sec)
void colorseg(Section *, double, const Color *)
ShapeSection * shape_section()
virtual void size(Coord &l, Coord &b, Coord &r, Coord &t) const
int nrn_exists(Symbol *s, Node *node)
short nrn_increment_mark(Section *)
virtual void damage(ShapeScene *)
const char * secname(Section *sec)
virtual float arc_selected()
void nrn_pushsec(Section *sec)
static XYView * current_draw_view()
double ivoc_gr_gif(void *)
void hoc_ivpanel(CChar *, bool h=false)
#define ForAllSections(sec)
ShapeScene(SectionList *=NULL)
Object ** nrniv_sh_selected_seg(void *v)
virtual bool event(Event &)
static void polygon(Canvas *, int count, const Coord *x, const Coord *y, const Color *c=NULL, const Brush *b=NULL, bool fill=false)
const Brush * brush(int) const
void bevel_join(Canvas *, const Color *, int, float) const
void trapezoid(Canvas *, const Color *, int i) const
double nrn_section_orientation(Section *sec)
virtual void unref() const
virtual void draw_points(Canvas *, const Color *, int, int) const
static double sh_point_mark_remove(void *v)
Point_process * ob2pntproc_0(Object *)
virtual void new_size(Coord x1, Coord y1, Coord x2, Coord y2)
double nrniv_sh_rotate(void *v)
float arc_position(Coord, Coord) const
static double sh_flush(void *v)
void notify_attach(Observer *)
double nrniv_sh_color_all(void *v)
static double sh_view_count(void *v)
void xplace(int left, int top)
double ivoc_gr_label(void *)
static double sh_save_name(void *v)
double nrniv_sh_color(void *v)
ColorValue * color_value()
static ShapeScene * current_draw_scene()
void hoc_ivmenu(CChar *, bool add2menubar=false)
double section_length(Section *sec)
virtual void name(const char *)
static double sh_show(void *v)
void section_ref(Section *)
double ivoc_gr_erase(void *)
double nrniv_sh_observe(void *v)
void nrn_seg_or_x_arg(int iarg, Section **psec, double *px)
float how_near(Coord, Coord) const
static double sh_view(void *v)
#define TRY_GUI_REDIRECT_OBJ(name, obj)
virtual Scene * scene() const
double ivoc_gr_line(void *)
static ShapeScene * current_pick_scene()
static Member_ret_obj_func retobj_members[]
virtual void setColor(const Color *, ShapeScene *)
PolyGlyph * shape_section_list()
static int component(PyHocObject *po)
virtual void clear_variable()
void rotate(float x, float y, float z, float *tr) const
#define TRY_GUI_REDIRECT_ACTUAL_OBJ(name, obj)
#define implementRubberCallback(T)
Point_process * ob2pntproc(Object *)
Object *(* nrnpy_seg_from_sec_x)(Section *, double)
void rotate_x(float radians)
static void sh_destruct(void *v)
static char line[MAXLINE]
Allotment & x_allotment()
static double sh_printfile(void *v)
static void Detach(Object *, Observer *)
static void box(Requisition &, Coord &x1, Coord &y1, Coord &x2, Coord &y2)
double nrniv_sh_color_list(void *v)
int hoc_is_object_arg(int narg)
Section * nrn_trueparent(Section *sec)
double * nrn_rangepointer(Section *sec, Symbol *s, double d)
virtual void request(Requisition &) const
virtual void draw(Canvas *, const Allocation &) const
Allotment & y_allotment()
static double sh_unmap(void *v)
void nrn_clear_mark(void)
double ivoc_gr_begin_line(void *)
Object ** hoc_temp_objptr(Object *)
void rotate_y(float radians)
static XYView * current_pick_view()
void section_unref(Section *)
const Color * color() const
double ivoc_gr_menu_tool(void *)
Object ** hoc_objgetarg(int)
Section * chk_access(void)
const Color * color(int) const
virtual ShapeSection * shape_section(Section *)
void require(DimensionName, const Requirement &)
double chkarg(int, double low, double high)
double * nrn_recalc_ptr(double *)
virtual void draw_seg(Canvas *, const Color *, int iseg) const
virtual void set_range_variable(Symbol *)
virtual void update(Observable *)
virtual void observe(SectionList *=NULL)
virtual bool near_section(Coord, Coord, Coord mineps) const