1 #include <../../nrnconf.h>
7 #include <InterViews/iv3text.h>
8 #include <InterViews/layout.h>
9 #include <InterViews/background.h>
10 #include <InterViews/event.h>
11 #include <IV-look/kit.h>
26 class OcText:
public Text {
30 virtual void keystroke(
const Event& event);
33 class OcMLineEditor:
public OcGlyph {
35 OcMLineEditor(
unsigned row,
unsigned col,
const char*
buf =
NULL);
36 virtual ~OcMLineEditor();
43 static double map(
void*
v) {
47 OcMLineEditor* e = (OcMLineEditor*)
v;
50 w = e->make_window(
float(*
getarg(2)),
73 OcMLineEditor* e = (OcMLineEditor*)
v;
76 e->txt_->readOnly(
int(
chkarg(1, 0, 1)));
78 return double(e->txt_->readOnly());
88 OcMLineEditor* e = (OcMLineEditor*)
v;
93 tb->Insert(0,
s, strlen(
s));
96 *
p = (
char*) tb->Text();
97 return (
const char**)
p;
112 const char*
buf =
"";
120 col = unsigned(
chkarg(3, 1, 1000));
122 OcMLineEditor* e =
new OcMLineEditor(
row, col,
buf);
134 OcMLineEditor* e = (OcMLineEditor*)
v;
135 if (e->has_window()) {
136 e->window()->dismiss();
148 OcMLineEditor::OcMLineEditor(
unsigned row,
unsigned col,
const char*
buf) {
151 body(
new Background(txt_, WidgetKit::instance()->background()));
153 OcMLineEditor::~OcMLineEditor() {
157 OcText::OcText(
unsigned rows,
unsigned cols,
TextBuffer*
buf)
162 void OcText::keystroke(
const Event& e) {
167 int count = e.mapkey(buffer, 8);
virtual const char * name() 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
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 *)
static void destruct(void *v)
static double map(void *v)
static const char ** v_text(void *v)