1 #include <../../nrnconf.h>
8 #include <InterViews/iv3text.h>
9 #include <InterViews/layout.h>
10 #include <InterViews/background.h>
11 #include <InterViews/event.h>
12 #include <IV-look/kit.h>
27 extern char** (*nrnpy_gui_helper3_str_)(
const char*
name,
Object* obj,
int handle_strptr);
30 class OcText:
public Text {
34 virtual void keystroke(
const Event& event);
37 class OcMLineEditor:
public OcGlyph {
39 OcMLineEditor(
unsigned row,
unsigned col,
const char*
buf =
NULL);
40 virtual ~OcMLineEditor();
47 static double map(
void*
v) {
51 OcMLineEditor*
e = (OcMLineEditor*)
v;
54 w =
e->make_window(
float(*
getarg(2)),
77 OcMLineEditor*
e = (OcMLineEditor*)
v;
80 e->txt_->readOnly(
int(
chkarg(1, 0, 1)));
82 return double(
e->txt_->readOnly());
92 OcMLineEditor*
e = (OcMLineEditor*)
v;
97 tb->Insert(0, s, strlen(s));
100 *
p = (
char*) tb->Text();
101 return (
const char**)
p;
116 const char*
buf =
"";
124 col = unsigned(
chkarg(3, 1, 1000));
126 OcMLineEditor*
e =
new OcMLineEditor(
row, col,
buf);
138 OcMLineEditor*
e = (OcMLineEditor*)
v;
139 if (
e->has_window()) {
140 e->window()->dismiss();
152 OcMLineEditor::OcMLineEditor(
unsigned row,
unsigned col,
const char*
buf) {
155 body(
new Background(txt_, WidgetKit::instance()->background()));
157 OcMLineEditor::~OcMLineEditor() {
161 OcText::OcText(
unsigned rows,
unsigned cols,
TextBuffer*
buf)
166 void OcText::keystroke(
const Event&
e) {
171 int count =
e.mapkey(buffer, 8);
virtual const char * name() const
double chkarg(int, double low, double high)
char ** hoc_temp_charptr(void)
#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE(name, obj)
#define TRY_GUI_REDIRECT_NO_RETURN(name, obj)
#define TRY_GUI_REDIRECT_OBJ(name, obj)
#define TRY_GUI_REDIRECT_ACTUAL_STR(name, obj)
static double readonly(void *v)
static Member_ret_str_func retstr_members[]
static Member_func members[]
static void * cons(Object *)
double(* nrnpy_object_to_double_)(Object *)
static void destruct(void *v)
static double map(void *v)
static const char ** v_text(void *v)
void class2oc(const char *, void *(*cons)(Object *), void(*destruct)(void *), Member_func *, int(*checkpoint)(void **), Member_ret_obj_func *, Member_ret_str_func *)