1 #include <../../nrnconf.h>
12 #include <InterViews/glyph.h>
13 #include <InterViews/hit.h>
14 #include <InterViews/event.h>
15 #include <InterViews/color.h>
16 #include <InterViews/brush.h>
17 #include <InterViews/window.h>
18 #include <InterViews/printer.h>
19 #include <InterViews/label.h>
20 #include <InterViews/font.h>
21 #include <InterViews/background.h>
22 #include <InterViews/style.h>
23 #include <InterViews/telltale.h>
24 #include <OS/string.h>
25 #include <InterViews/image.h>
26 extern Image* gif_image(
const char*);
29 #include <IV-look/kit.h>
54 #define Graph_Crosshair_ "Crosshair Graph"
55 #define Graph_Change_label_ "ChangeText Graph"
56 #define Graph_keep_lines_toggle_ "KeepLines Graph"
57 #define Graph_erase_axis_ "AxisType Graph"
58 #define Graph_new_axis_ "NewAxis AxisType Graph"
59 #define Graph_view_axis_ "ViewAxis AxisType Graph"
60 #define Graph_view_box_ "ViewBox AxisType Graph"
61 #define Graph_erase_lines_ "Erase Graph"
62 #define Graph_choose_sym_ "PlotWhat Graph"
63 #define Graph_choose_family_label_ "FamilyLabel Graph"
64 #define Graph_choose_rvp_ "PlotRange Graph"
79 GraphLabelItem(
Glyph* g)
81 virtual ~GraphLabelItem(){};
94 GraphAxisItem(
Glyph* g)
96 virtual ~GraphAxisItem(){};
109 GraphMarkItem(
Glyph* g)
111 virtual ~GraphMarkItem(){};
124 VectorLineItem(
Glyph* g)
126 virtual ~VectorLineItem(){};
133 class LineExtension:
public Glyph {
136 virtual ~LineExtension();
147 return (
DataVec*) gp_->x_data();
150 return (
DataVec*) gp_->y_data();
159 class NewLabelHandler:
public Handler {
163 virtual bool event(
Event&);
177 NewLabelHandler::~NewLabelHandler() {
180 bool NewLabelHandler::event(
Event& e) {
183 GLabel* gl = g_->new_proto_label();
189 g_->vfixed(gl->
scale());
191 if (g_->labeltype() == 2) {
238 ntic = int(
chkarg(4, -1, 100));
245 nminor = int(
chkarg(5, 0, 100));
253 g->
axis(d, x1, x2, pos, ntic, nminor,
invert, number);
285 <<
"," << g->
y2() <<
")\n";
287 *
Oc::save_stream <<
"scene_vector_[" <<
i <<
"] = save_window_" << std::endl;
289 g->Scene::mark(
true);
299 static void move_label(
Graph* g,
const GLabel* lab,
int ioff = 0) {
301 if (
ifarg(4 + ioff) && lab) {
335 ((
Scene*)
v)->picker()->add_menu(
gargstr(1),
new HocCommandAction(hc));
376 for (
i = 0;
i <
s->view_count(); ++
i) {
377 if (
s->sceneview(
i) == view) {
383 view =
s->sceneview(
int(
chkarg(1, 0,
s->view_count() - 1)));
384 float x1, y1, x2, y2;
388 return view->
width();
402 return view->
right();
411 return view->
width() / (x2 - x1);
419 return view->
height() / (y2 - y1);
441 WidgetKit::instance()->font()->font_bbox(b);
442 return b.ascent() + b.descent();
457 view =
s->sceneview(
int(
chkarg(1, 0,
s->view_count() - 1)));
474 if (i < 0 || i >
cnt - 1) {
478 for (
i += 1;
i <
cnt; ++
i) {
503 static void gr_add(
void*
v,
bool var) {
523 pd = hoc_hgetarg<double>(2);
544 if (
ifarg(3 + ioff)) {
545 if (
ifarg(6 + ioff)) {
546 fixtype = int(
chkarg(6 + ioff, 0, 2));
547 }
else if (
ifarg(4 + ioff)) {
564 move_label(g, gl->
label(), ioff);
601 g->
append(
new VectorLineItem(gv));
622 int n = int(
chkarg(1, 1., 1.e5));
624 auto y_handle = hoc_hgetarg<double>(3);
633 for (
int i = 0;
i <
n; ++
i) {
634 gv->
add(x[
i], y_handle.next_array_element(
i));
748 ((
Graph*)
v)->fast_flush();
759 ((
Graph*)
v)->erase_lines();
771 ((
Graph*)
v)->erase_all();
818 Coord x1, y1, x2, y2;
838 view->
zout(x1, y1, x2, y2);
839 view->
size(x1, y1, x2, y2);
842 view->
zin(x1, y1, x2, y2);
844 switch (
int(
chkarg(1, 1., 4.))) {
881 }
else if (
ifarg(2)) {
902 scale =
chkarg(1, .01, 100);
904 ((
Graph*)
v)->fixed(scale);
917 scale =
chkarg(1, .01, 100);
919 ((
Graph*)
v)->vfixed(scale);
932 scale =
chkarg(1, .01, 100.);
934 ((
Graph*)
v)->relative(scale);
952 ((
Graph*)
v)->align(x, y);
986 float(
chkarg(3, 0, 1000)));
1008 for (
i = 0;
i < 8; ++
i) {
1011 XYView* view =
new XYView(x[0], x[1], x[2], x[3], g, x[6], x[7]);
1012 Coord x1, x2, y1, y2;
1013 view->
zout(x1, y1, x2, y2);
1014 view->
size(x1, y1, x2, y2);
1017 w->
xplace(
int(x[4]),
int(x[5]));
1044 style = char(
chkarg(3, 0, 10));
1048 g->
mark(x, y, style);
1049 }
else if (!
ifarg(5)) {
1072 n = ((
Scene*)
v)->view_count();
1098 bool vector_copy =
false;
1100 vector_copy = int(
chkarg(2, 0, 1));
1148 extern double gr_getline(
void*);
1190 {
"getline", gr_getline},
1196 {
nullptr,
nullptr}};
1237 static const char* colorname[] =
1238 {
"white",
"black",
"red",
"blue",
"green",
"orange",
"brown",
"violet",
"yellow",
"gray", 0};
1277 "couldn't lookup color \"%s\", you must be missing the\n\
1278 colormap.ini file or else the name isn't in it\n",
1301 static int brush_pattern[] = {0x0, 0xcccc, 0xfff0, 0xff00, 0xf000};
1309 for (
int j = 0;
j < 5; ++
j) {
1310 for (
int k = 0;
k < 5; ++
k) {
1335 b =
new Brush(pattern, width);
1337 b =
new Brush(width);
1368 MonoGlyph::pick(
c, a, depth, h);
1373 declareActionCallback(
Graph);
1374 implementActionCallback(
Graph);
1379 :
Scene(0, 0, XSCENE, YSCENE) {
1384 cross_action_ =
NULL;
1385 vector_copy_ =
false;
1387 family_label_ =
NULL;
1389 current_polyline_ =
NULL;
1400 mi->state()->set(TelltaleState::is_chosen,
true);
1403 picker()->add_radio_menu(
"Pick Vector", (
OcHandler*)
NULL, PICK);
1407 Menu* m = wk.pullright();
1414 picker()->add_menu(mi);
1418 mi = WidgetKit::instance()->check_menu_item(
"Keep Lines");
1420 keep_lines_toggle_ = mi->state();
1421 keep_lines_toggle_->ref();
1422 picker()->add_menu(
"Keep Lines", mi);
1423 picker()->add_menu(
"Family Label?",
1442 extension_flushed_ =
true;
1450 if (WidgetKit::instance()->style()->find_attribute(
"graph_axis_default",
i)) {
1502 return e->label() == glab;
1516 if (gpl->
label() == glab) {
1534 if (
line->label() == glab) {
1569 if (glin->
label()) {
1601 item->extension()->draw(
c, a);
1615 o <<
"PolyLines" << std::endl;
1620 o << lcnt <<
" addvar/addexpr lines:";
1622 o <<
" " <<
line->name();
1632 bool matrix_form =
true;
1636 for (
i = 0;
i < lcnt; ++
i) {
1647 matrix_form =
false;
1658 for (
i = 0;
i < lcnt; ++
i) {
1668 o << xcnt <<
" rows, " << col + 1 <<
" columns" << std::endl;
1670 for (
j = 0;
j < xcnt; ++
j) {
1672 for (
i = 0;
i < lcnt; ++
i) {
1677 o <<
"\t" << gpl->
y(
j);
1685 o <<
"Line Manifest:" << std::endl;
1686 for (
i = 0;
i < lcnt; ++
i) {
1696 o << jcnt << std::endl;
1700 o <<
"End of Line Manifest" << std::endl;
1701 for (
i = 0;
i < lcnt; ++
i) {
1711 o << jcnt << std::endl;
1713 for (
j = 0;
j < jcnt; ++
j) {
1714 o << gpl->
x(
j) <<
"\t" << gpl->
y(
j) <<
"\n";
1721 o <<
"Graph addvar/addexpr lines" << std::endl;
1722 o << lcnt <<
" " <<
x_->
count() << std::endl;
1729 o <<
" " << item->name();
1733 for (
i = 0;
i < dcnt; ++
i) {
1736 o <<
"\t" << item->y(
i);
1743 for (
i = 0;
i < lcnt; ++
i) {
1747 if (!gpl->
label()) {
1752 o <<
n <<
" unlabeled lines" << std::endl;
1753 for (
i = 0;
i < lcnt; ++
i) {
1757 if (!gpl->
label()) {
1759 o <<
n << std::endl;
1761 for (
j = 0;
j <
n; ++
j) {
1762 o << gpl->
x(
j) <<
"\t" << gpl->
y(
j) << std::endl;
1773 h.event()->pointer_button() == Event::left && h.count() < 2) {
1774 h.target(depth,
this, 0,
new NewLabelHandler(
this, h.left(), h.bottom()));
1777 if (h.event() && h.event()->type() == Event::down) {
1778 if (h.event()->pointer_button() == Event::right) {
1779 h.target(depth,
this, 0,
new RubberRect(
c,
new NewView(
this)));
1780 }
else if (h.event()->pointer_button() == Event::middle) {
1809 for (
i = 0;
i <
cnt; ++
i) {
1829 if (l >= r || b >=
t) {
1861 a =
new Axis(
this, d);
1862 }
else if (ntic < 0) {
1865 a =
new Axis(
this, d,
x1,
x2, pos, ntic, nminor,
invert, number);
1892 glab =
label(lab, fixtype);
1894 glab =
label(expr, fixtype);
1923 hoc_execerror(expr,
"is invalid left hand side of assignment statement");
1944 if (gl->
valid(
true) ==
false) {
1945 printf(
"Graph:: presently invalid expression: %s\n", gl->
name());
1993 for (
i = 0;
i <
cnt; ++
i) {
2000 item->extension()->damage(
this);
2008 item->extension_start();
2015 item->extension_continue();
2031 if (cp && strlen(cp) > 0) {
2059 printf(
"{x=%g y=%g}\n", gpl->
x(
i), gpl->
y(
i));
2072 printf(
"{x=%g y=%g}\n", x, y);
2083 for (
int i =
count() - 1;
i >= 0; --
i) {
2105 Oc::help(Graph_keep_lines_toggle_);
2126 long lcnt =
count();
2127 for (
long i = lcnt - 1;
i >= 0; --
i) {
2162 gl->
color(gl->save_color());
2163 gl->brush(gl->save_brush());
2178 }
else if (
s &&
s[1]) {
2192 for (
i =
cnt - 1;
i >= 0; --
i) {
2237 void Graph::spec_axis() {
2268 for (
i = 0;
i <
cnt; ++
i) {
2281 for (
i =
cnt - 1;
i >= 0; --
i) {
2299 const Color* color) {
2303 }
else if (fixtype == 2) {
2305 }
else if (fixtype == 0) {
2306 append(
new GraphLabelItem(l));
2357 o <<
"{" << std::endl;
2361 static Graph* current_save_graph;
2374 o <<
buf << std::endl;
2375 o <<
"save_window_.save_name(\"" <<
var_name_ <<
"\")" << std::endl;
2382 current_save_graph =
this;
2383 for (
long i = 0;
i <
cnt; ++
i) {
2391 o <<
"}" << std::endl;
2413 Style* style =
new Style(Session::instance()->style());
2414 style->attribute(
"caption",
"Variable to graph");
2420 if (!
v ||
v->scene() != (
Scene*)
this || !
v->canvas() || !
v->canvas()->window()) {
2425 w =
v->canvas()->window();
2427 while ((w &&
sc_->post_for_aligned(w, .5, 1.)) || (!w &&
sc_->post_at(300, 300))) {
2438 for (
int i = 0;
i <
n; ++
i) {
2439 gv->
add(
double(
i), pd_handle.next_array_element(
i));
2444 append(
new VectorLineItem(gv));
2469 Oc::help(Graph_choose_family_label_);
2472 Style* style =
new Style(Session::instance()->style());
2473 style->attribute(
"caption",
"Family label variable");
2500 simgraph_x_sav_ =
NULL;
2512 hoc_execerror(expr,
"is invalid left hand side of assignment statement");
2527 if (!pval_ && !expr_) {
2534 extension_ =
new LineExtension(
this);
2574 extern void graphLineRecDeleted(
GraphLine*);
2580 graphLineRecDeleted(
this);
2629 printf(
"Can't change.\n");
2673 s->remove(
s->glyph_index(gl));
2705 "save_window_.addvar(\"%s\", %d, %d, %g, %g, %d)",
2711 label()->fixtype());
2718 "save_window_.addexpr(\"%s\", %d, %d, %g, %g, %d)",
2724 label()->fixtype());
2726 o <<
buf << std::endl;
2744 const float eps = 1e-4;
2746 span =
x_->
max() -
x + eps;
2747 x = (span > 0) ?
x / span : 0;
2750 span =
y_->
max() -
x + eps;
2751 x = (span > 0) ?
x / span : 0;
2768 if (
cnt - begin < 2) {
2772 Coord x1, y1, x2, y2;
2775 #define GPIN(arg) MyMath::inside(x_->get_val(arg), y_->get_val(arg), x1, y1, x2, y2)
2779 for (
i=begin;
i > 0; --
i) {
2784 for (;
i <
cnt; ++
i) {
2821 if (cnt1 >
cnt - 2) {
2826 for (++
i;
i < cnt1; ++
i) {
2840 float xmax, xmin, ymax, ymin;
2849 for (
i = 0;
i <
cnt; ++
i) {
2858 for (
j =
cnt - 1;
i <
j; --
j) {
2881 for (++
i;
i <
cnt; ++
i) {
2888 for (++
i;
i <
cnt; ++
i) {
2891 c->push_transform();
2900 c->push_transform();
2915 }
else if (
valid()) {
2989 WidgetKit& kit = *WidgetKit::instance();
3022 "save_window_.label(%g, %g, \"%s\", %d, %g, %g, %g, %d)",
3031 o <<
buf << std::endl;
3052 WidgetKit& kit = *WidgetKit::instance();
3065 WidgetKit& kit = *WidgetKit::instance();
3100 c->push_transform();
3152 float* y =
new float[
size_];
3161 }
else if (x < -1e32) {
3232 if (imax >= low && imax < high) {
3236 for (m =
y_[low++]; low < high; low++) {
3246 if (imin >= low && imin < high) {
3250 for (m =
y_[low++]; low < high; low++) {
3267 cout <<
count_ << std::endl;
3269 cout <<
y_[
i] << std::endl;
3280 disconnect_defer_ =
false;
3291 return name_.c_str();
3318 static_cast<double*
>(
py) !=
static_cast<double*
>(
dp_->
p(
dp_->
count() - 1)) + 1) {
3331 if (
static_cast<double const*
>(
dp_->
p(
i)) != &zero) {
3347 LineExtension::LineExtension(
GPolyLine* gp) {
3349 start_ = previous_ = -1;
3351 LineExtension::~LineExtension() {}
3353 void LineExtension::begin() {
3354 previous_ = yd()->count() - 1;
3355 start_ = yd()->count() - 1;
3356 yd()->running_start();
3358 void LineExtension::extend() {
3360 start_ = yd()->count() - 1;
3361 yd()->running_start();
3365 void LineExtension::request(
Requisition& req)
const {
3368 const float eps = 1e-4;
3369 x1 = xd()->running_min();
3370 x2 = xd()->running_max();
3373 x = (span > 0) ? x / span : 0;
3375 x1 = yd()->running_min();
3376 x2 = yd()->running_max();
3377 span = (x2 - x1) / 2;
3379 x = (span > 0) ? x / span : 0;
3392 if (previous_ >= 0) {
3393 gp_->draw_specific(
c, a, previous_, xd()->count());
3397 gp_->draw_specific(
c, a, start_, xd()->count());
3401 void LineExtension::damage(
Graph* g) {
3402 g->
damage(xd()->running_min(), yd()->running_min(), xd()->running_max(), yd()->running_max());
void allot_y(const Allotment &)
Allotment & x_allotment()
Allotment & y_allotment()
void allot_x(const Allotment &)
const Brush * brush_palette[BRUSH_SIZE]
const Brush * brush(int) const
const Color * color_palette[COLOR_SIZE]
const Color * color(int) const
void add(neuron::container::data_handle< double > dh)
neuron::container::data_handle< double > p(std::size_t i)
Object ** new_vect(GLabel *g=NULL) const
float get_val(int i) const
void set(Canvas *, const Allocation &)
virtual void draw(Canvas *, const Allocation &) const
void align(float x, float y)
virtual void allocate(Canvas *, const Allocation &, Extension &)
void relative(float scale)
const char * text() const
GPolyLine * labeled_line() const
GLabel(const char *s, const Color *, int fixtype=1, float size=12, float x_align=0., float y_align=0.)
virtual void save(std::ostream &, Coord, Coord)
void color(const Color *)
virtual void request(Requisition &) const
virtual Glyph * clone() const
const Color * color() const
virtual void request(Requisition &) const
void init(DataVec *, DataVec *, const Color *, const Brush *)
void brush(const Brush *)
const DataVec * y_data() const
const Brush * brush() const
virtual void allocate(Canvas *, const Allocation &, Extension &)
const DataVec * x_data() const
const Color * color() const
virtual void print(Printer *, const Allocation &) const
void color(const Color *)
void plot(Coord x, Coord y)
GPolyLine(DataVec *x, const Color *=NULL, const Brush *=NULL)
virtual void save(std::ostream &)
virtual void draw_specific(Canvas *, const Allocation &, int, int) const
virtual void erase_line(Scene *, GlyphIndex)
virtual void draw(Canvas *, const Allocation &) const
virtual void pick_vector()
void label_loc(Coord &x, Coord &y) const
virtual void erase(Scene *s, GlyphIndex i, int type)
virtual bool is_polyline()
void change_line_color(GPolyLine *)
const Color * color() const
virtual void new_size(Coord x1, Coord y1, Coord x2, Coord y2)
static std::ostream * ascii_
void cross_action(char, GPolyLine *, int)
const Brush * brush() const
virtual bool change_label(GLabel *, const char *, GLabel *gl=NULL)
void line(Coord x, Coord y)
virtual GlyphIndex glyph_index(const Glyph *)
GraphLine * add_var(const char *, const Color *, const Brush *, bool usepointer, int fixtype=1, neuron::container::data_handle< double > p={}, const char *lab=NULL, Object *obj=NULL)
void ascii_save(std::ostream &o) const
void add_polyline(GPolyLine *)
TelltaleState * keep_lines_toggle_
virtual void see_range_plot(GraphVector *)
static bool label_chooser(const char *, char *, GLabel *, Coord x=400., Coord y=400.)
void family_label_chooser()
void begin_line(const char *s=NULL)
virtual void save_phase2(std::ostream &)
void change_label_color(GLabel *)
void add_graphVector(GraphVector *)
virtual void save_phase1(std::ostream &)
void x_expr(const char *, bool usepointer)
GLabel * new_proto_label() const
virtual void delete_label(GLabel *)
neuron::container::data_handle< double > x_pval_
virtual void wholeplot(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
GPolyLine * current_polyline_
void relative(float scale)
HocCommand * cross_action_
void align(float x, float y)
virtual void draw(Canvas *, const Allocation &) const
void mark(Coord x, Coord y, char style='+', float size=12, const Color *=NULL, const Brush *=NULL)
std::vector< GraphLine * > line_list_
void extension_continue()
GLabel * label(float x, float y, const char *s, int fixtype, float scale, float x_align, float y_align, const Color *)
static std::ostream * ascii()
void axis(DimensionName, float min, float max, float pos=0., int ntics=-1, int nminor=0, int invert=0, bool number=true)
void set_cross_action(const char *, Object *, bool vectorcopy=false)
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
virtual void erase(Scene *, GlyphIndex, int erase_type)
virtual bool is_graphVector()
virtual void save(std::ostream &, Coord, Coord)
GraphItem(Glyph *g, bool=true, bool pick=true)
virtual bool is_polyline()
bool valid(bool check=false)
LineExtension * extension_
neuron::container::data_handle< double > pval_
const Brush * save_brush_
const Color * save_color_
const Color * save_color() const
bool change_expr(const char *, Symlist **)
virtual void save(std::ostream &)
virtual void update(Observable *)
const char * name() const
GraphLine(const char *, DataVec *x, Symlist **, const Color *=NULL, const Brush *=NULL, bool usepointer=0, neuron::container::data_handle< double > pd={}, Object *obj=NULL)
void extension_continue()
void simgraph_continuous(double)
void simgraph_activate(bool)
const Brush * save_brush() const
DataVec * simgraph_x_sav_
virtual void save(std::ostream &)
virtual bool choose_sym(Graph *)
const char * name() const
GraphVector(const char *, const Color *=NULL, const Brush *=NULL)
virtual void request(Requisition &) const
virtual void update(Observable *)
void add(float, neuron::container::data_handle< double >)
double func_call(int narg, int *perr=NULL)
int execute(bool notify=true)
static HocMark * instance(char style, float size, const Color *, const Brush *)
static void paneltool(const char *name, const char *procname, const char *action, ScenePicker *, Object *pycallback=NULL, Object *pyselact=NULL)
static MenuItem * menu_item(const char *)
static void extend(Extension &, Coord)
static bool inside(Coord x, Coord min, Coord max)
static void help(const char *)
int run(int argc, const char **argv)
static bool valid_expr(Symbol *)
static std::ostream * save_stream
void notify_when_freed(void *p, Observer *)
const char * name(Symbol *)
Symbol * parseExpr(const char *, Symlist **=NULL)
void notify_pointer_disconnect(Observer *)
void xplace(int left, int top)
void require_x(const Requirement &)
const Requirement & x_requirement() const
void require_y(const Requirement &)
const Requirement & y_requirement() const
virtual void unref() const
virtual void pick(Canvas *, const Allocation &, int depth, Hit &)
static long scene_list_index(Scene *)
virtual XYView * sceneview(int) const
virtual void printfile(const char *)
void move(GlyphIndex, Coord x, Coord y)
virtual void change_to_fixed(GlyphIndex, XYView *)
virtual void damage(GlyphIndex)
virtual void background(Glyph *bg=NULL)
virtual void append_viewfixed(Glyph *)
static const Color * default_background()
void location(GlyphIndex, Coord &x, Coord &y) const
virtual void damage_all()
virtual void append(Glyph *)
virtual void change_to_vfixed(GlyphIndex, XYView *)
virtual void new_size(Coord x1, Coord y1, Coord x2, Coord y2)
static const Color * default_foreground()
virtual void change(GlyphIndex)
virtual void save_class(std::ostream &, const char *)
virtual int view_count() const
virtual void wholeplot(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual GlyphIndex count() const
virtual Glyph * component(GlyphIndex) const
virtual void remove(GlyphIndex)
virtual void insert(GlyphIndex, Glyph *)
virtual void append_fixed(Glyph *)
virtual void modified(GlyphIndex)
virtual void draw(Canvas *, const Allocation &) const
virtual void set_scene_tool(int)
void bind_select(Rubberband *rb)
virtual double * selected_var()
virtual const std::string & selected() const
virtual int selected_vector_count()
virtual void damage_area(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
virtual Coord bottom() const
virtual Coord height() const
virtual Coord top() const
virtual void view_ratio(float xratio, float yratio, Coord &x, Coord &y) const
virtual void zout(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
void size(Coord x1, Coord y1, Coord x2, Coord y2)
virtual Coord width() const
virtual Coord left() const
virtual void ratio_view(Coord x, Coord y, float &xratio, float &yratio) const
virtual void damage_all()
virtual Coord right() const
virtual void zin(Coord &x1, Coord &y1, Coord &x2, Coord &y2) const
static XYView * current_draw_view()
static XYView * current_pick_view()
const Transformer & s2o() const
void class2oc(const char *, ctor_f *cons, dtor_f *destruct, Member_func *, Member_ret_obj_func *, Member_ret_str_func *)
HocReturnType hoc_return_type_code
#define y_(arg)
Crout matrix decomposition : Forward/Backward substitution.
double chkarg(int, double low, double high)
unsigned int DimensionName
static double gr_view(void *v)
static double gr_simgraph(void *v)
double gr_addglyph(void *)
double ivoc_gr_menu_action(void *v)
static double gr_addexpr(void *v)
static double gr_view_count(void *v)
static double gr_addobject(void *v)
static void gr_destruct(void *v)
static double gr_fast_flush(void *v)
static double gr_begin(void *v)
static double gr_family(void *v)
double ivoc_gr_size(void *v)
static double gr_xaxis(void *v)
static double gr_align(void *v)
static double gr_vfixed(void *v)
static double exec_menu(void *v)
static double gr_set_cross_action(void *v)
static double gr_color(void *v)
static double gr_relative(void *v)
double ivoc_erase_all(void *v)
double ivoc_gr_line(void *v)
static double gr_flush(void *v)
double ivoc_gr_begin_line(void *v)
static Member_func gr_members[]
static double gr_plot(void *v)
double ivoc_view_size(void *v)
static double gr_addvar(void *v)
static double gr_save_name(void *v)
static double gr_fixed(void *v)
double gr_line_info(void *v)
static void * gr_cons(Object *ho)
static double gr_xexpr(void *v)
double ivoc_gr_menu_remove(void *v)
double ivoc_gr_gif(void *v)
double ivoc_gr_erase(void *v)
double ivoc_gr_mark(void *v)
static double gr_vector(void *v)
static double gr_printfile(void *v)
static double gr_brush(void *v)
static double gr_unmap(void *v)
double ivoc_view_info(void *v)
double ivoc_gr_menu_tool(void *v)
static double gr_yaxis(void *v)
double ivoc_gr_label(void *v)
int hoc_is_object_arg(int narg)
void hoc_obj_set(int i, Object *obj)
neuron::container::data_handle< double > hoc_val_handle(std::string_view s)
int hoc_is_str_arg(int narg)
int is_obj_type(Object *obj, const char *type_name)
void hoc_free_list(Symlist **)
IvocVect * vector_arg(int i)
char * hoc_object_name(Object *ob)
double * hoc_pgetarg(int narg)
int hoc_is_pdouble_arg(int narg)
void hoc_obj_unref(Object *obj)
void hoc_push_object(Object *d)
#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE(name, obj)
#define TRY_GUI_REDIRECT_NO_RETURN(name, obj)
#define TRY_GUI_REDIRECT_OBJ(name, obj)
Object ** hoc_objgetarg(int)
void nrn_notify_pointer_disconnect(Observer *ob)
double var(InputIterator begin, InputIterator end)
Symbol * lookup(const char *)
void move(Item *q1, Item *q2, Item *q3)
double * vector_vec(IvocVect *v)
void hoc_execerror(const char *s1, const char *s2)
void hoc_warning(const char *s1, const char *s2)
auto get_name(Tag const &tag, int field_index)
Get the nicest available name for the field_index-th instance of Tag.
void notify_when_handle_dies(data_handle< double > dh, Observer *obs)
Register that obs should be notified when dh dies.
constexpr do_not_search_t do_not_search
int Sprintf(char(&buf)[N], const char *fmt, Args &&... args)
Redirect sprintf to snprintf if the buffer size can be deduced.
static void check(VecTNode &)
int const size_t const size_t n
HOC interpreter function declarations (included by hocdec.h)
static double save(void *v)
int hoc_execerror_messages
bool var_pair_chooser(const char *, float &x, float &y, Window *w=NULL, Coord x1=400., Coord y1=400.)