NEURON
ocnoiv1.cpp
Go to the documentation of this file.
1 #include <../../nrnconf.h>
2 
3 #if !HAVE_IV // to end of file
4 
5 // things we DO NOT want
6 
7 #include "hocdec.h"
8 #include "nrnpy.h"
9 
10 extern void hoc_ret();
11 extern void hoc_pushx(double);
12 extern "C" void nrn_shape_update();
13 
14 void ivoc_help(const char*) {}
15 void ivoc_cleanup() {}
16 
17 void hoc_notify_iv() {
19  hoc_ret();
20  hoc_pushx(0.);
21 }
22 void hoc_xpvalue() {
23  neuron::python::methods.try_gui_helper("xpvalue", nullptr);
24  hoc_ret();
25  hoc_pushx(0.);
26 }
27 void hoc_xlabel() {
28  neuron::python::methods.try_gui_helper("xlabel", nullptr);
29  hoc_ret();
30  hoc_pushx(0.);
31 }
32 void hoc_xbutton() {
33  neuron::python::methods.try_gui_helper("xbutton", nullptr);
34  hoc_ret();
35  hoc_pushx(0.);
36 }
37 void hoc_xcheckbox() {
38  neuron::python::methods.try_gui_helper("xcheckbox", nullptr);
39  hoc_ret();
40  hoc_pushx(0.);
41 }
43  neuron::python::methods.try_gui_helper("xstatebutton", nullptr);
44  hoc_ret();
45  hoc_pushx(0.);
46 }
47 void hoc_xmenu() {
48  neuron::python::methods.try_gui_helper("xmenu", nullptr);
49  hoc_ret();
50  hoc_pushx(0.);
51 }
52 void hoc_xvalue() {
53  neuron::python::methods.try_gui_helper("xvalue", nullptr);
54  hoc_ret();
55  hoc_pushx(0.);
56 }
57 void hoc_xpanel() {
58  neuron::python::methods.try_gui_helper("xpanel", nullptr);
59  hoc_ret();
60  hoc_pushx(0.);
61 }
63  neuron::python::methods.try_gui_helper("xradiobutton", nullptr);
64  hoc_ret();
65  hoc_pushx(0.);
66 }
68  neuron::python::methods.try_gui_helper("xfixedvalue", nullptr);
69  hoc_ret();
70  hoc_pushx(0.);
71 }
72 void hoc_xvarlabel() {
73  if (neuron::python::methods.gui_helper3) {
74  neuron::python::methods.gui_helper3("xvarlabel", nullptr, 1);
75  }
76  hoc_ret();
77  hoc_pushx(0.);
78 }
79 void hoc_xslider() {
80  neuron::python::methods.try_gui_helper("xslider", nullptr);
81  hoc_ret();
82  hoc_pushx(0.);
83 }
85  if (auto* const result = neuron::python::methods.try_gui_helper("boolean_dialog", nullptr)) {
86  hoc_ret();
87  hoc_pushx(neuron::python::methods.object_to_double(*result));
88  } else {
89  hoc_ret();
90  hoc_pushx(0.);
91  }
92 }
94  neuron::python::methods.try_gui_helper("continue_dialog", nullptr);
95  hoc_ret();
96  hoc_pushx(0.);
97 }
99  // TODO: needs to work with strrefs so can actually change the string
100  if (auto* const result = neuron::python::methods.try_gui_helper("string_dialog", nullptr);
101  result) {
102  hoc_ret();
103  hoc_pushx(neuron::python::methods.object_to_double(*result));
104  } else {
105  hoc_ret();
106  hoc_pushx(0.);
107  }
108 }
110  neuron::python::methods.try_gui_helper("pwman_place", nullptr);
111  hoc_ret();
112  hoc_pushx(0.);
113 }
115  neuron::python::methods.try_gui_helper("save_session", nullptr);
116  hoc_ret();
117  hoc_pushx(0.);
118 }
120  neuron::python::methods.try_gui_helper("print_session", nullptr);
121  hoc_ret();
122  hoc_pushx(0.);
123 }
124 void ivoc_style() {
125  neuron::python::methods.try_gui_helper("ivoc_style", nullptr);
126  hoc_ret();
127  hoc_pushx(0.);
128 }
129 #endif
void ivoc_cleanup()
Definition: ocnoiv1.cpp:15
void ivoc_help(const char *)
Definition: ocnoiv1.cpp:14
impl_ptrs methods
Collection of pointers to functions with python-version-specific implementations.
Definition: nrnpy.cpp:21
void hoc_continue_dialog()
Definition: ocnoiv1.cpp:93
void hoc_notify_iv()
Definition: ocnoiv1.cpp:17
void hoc_xpanel()
Definition: ocnoiv1.cpp:57
void hoc_xvalue()
Definition: ocnoiv1.cpp:52
void hoc_xbutton()
Definition: ocnoiv1.cpp:32
void hoc_ret()
Definition: code.cpp:1502
void hoc_xfixedvalue()
Definition: ocnoiv1.cpp:67
void hoc_save_session()
Definition: ocnoiv1.cpp:114
void hoc_xlabel()
Definition: ocnoiv1.cpp:27
void hoc_xstatebutton()
Definition: ocnoiv1.cpp:42
void hoc_xmenu()
Definition: ocnoiv1.cpp:47
void ivoc_style()
Definition: ocnoiv1.cpp:124
void hoc_xpvalue()
Definition: ocnoiv1.cpp:22
void hoc_xvarlabel()
Definition: ocnoiv1.cpp:72
void hoc_xslider()
Definition: ocnoiv1.cpp:79
void hoc_boolean_dialog()
Definition: ocnoiv1.cpp:84
void hoc_pushx(double)
Definition: code.cpp:779
void nrn_shape_update()
Definition: treeset.cpp:915
void hoc_print_session()
Definition: ocnoiv1.cpp:119
void hoc_xradiobutton()
Definition: ocnoiv1.cpp:62
void hoc_xcheckbox()
Definition: ocnoiv1.cpp:37
void hoc_pwman_place()
Definition: ocnoiv1.cpp:109
void hoc_string_dialog()
Definition: ocnoiv1.cpp:98
Object ** try_gui_helper(const char *name, Object *obj) const
Definition: nrnpy.h:56
Object **(* gui_helper3)(const char *name, Object *obj, int handle_strptr)
Definition: nrnpy.h:34