1 #include <../../nrnconf.h>
42 void* (*nrnpy_save_thread)();
86 while (
pvob->find(pt,
pv, ob)) {
110 while (
pdob->find(
p, size, pp, ob)) {
113 pdob->remove(pp, ob);
119 char* cp =
new char[sz];
137 sprintf(m,
"%s (See terminal window)", mes);
146 #include <InterViews/event.h>
147 #include <InterViews/reqerr.h>
148 #include <InterViews/style.h>
149 #include <IV-look/kit.h>
163 extern int hoc_oc(
const char*);
185 extern bool (*IVDialog_setAcceptInput)(bool);
186 bool setAcceptInputCallback(
bool);
187 bool setAcceptInputCallback(
bool b) {
195 if (Session::instance()) {
196 Style* s = Session::instance()->style();
197 s->remove_attribute(
gargstr(1));
202 if (WidgetKit::instance()->style()->find_attribute(
gargstr(1)+1, s)) {
213 #if !defined(MINGW) && !defined(MAC) && !defined(carbon)
214 class ReqErr1:
public ReqErr {
217 virtual void Error();
218 virtual int count() {
232 void ReqErr1::Error() {
233 if (!count_ || code != r_) {
237 fprintf(stderr,
"X Error of failed request: %s\n", message);
239 fprintf(stderr,
"Further messages for error code %d will not be shown\n", r_);
245 static ReqErr1* reqerr1;
254 void winio_key_press() {
273 IVDialog_setAcceptInput = setAcceptInputCallback;
277 #if !defined(WIN32) && !defined(MAC) && !defined(carbon)
278 reqerr1 =
new ReqErr1;
281 #if defined(MINGW) || defined(MAC)
285 Dispatcher::instance().link(0, Dispatcher::ReadMask,
handleStdin_);
286 Dispatcher::instance().link(0, Dispatcher::ExceptMask,
handleStdin_);
293 if (
session_->style()->find_attribute(
"first_instance_message", str)) {
308 #if !defined(MINGW) && !defined(MAC) && !defined(carbon)
309 if (reqerr1 && reqerr1->count()) {
310 fprintf(stderr,
"total X Errors: %d\n", reqerr1->count());
326 int Oc::run(
const char*
buf,
bool show_err_mes) {
395 #if defined(WIN32) || MAC
404 #if MAC && !defined(carbon)
405 extern Boolean IVOCGoodLine;
426 extern bool read_if_pending(
Event&);
427 while (!session->done() && read_if_pending(
e)) {
431 bool dsav = session->done();
433 while (session->pending() && !session->done()) {
443 HocPanel::keep_updated();
445 Session::instance()->screen_update();
451 extern void nrniv_bind_call(
void);
457 if (!nrn_is_gui_thread()) {
virtual int exceptionRaised(int fd)
virtual int inputReady(int fd)
virtual void attach(Observer *)
virtual void detach(Observer *)
virtual void update(Observable *)
static void setStdinSeen(bool i)
void notify_detach(Observer *)
int run(int argc, const char **argv)
static Observable * notify_change_
void notify_attach(Observer *)
void notify_freed(void(*pf)(void *, int))
static Session * session_
void notify_when_freed(void *p, Observer *)
const char * name(Symbol *)
static bool setAcceptInput(bool)
Symbol * parseExpr(const char *, Symlist **=NULL)
void notify_pointer_disconnect(Observer *)
static int getStdinSeen()
static HandleStdin * handleStdin_
static Session * getSession()
const char * string() const
static void dismiss_defer()
sprintf(buf, " if (secondorder) {\n" " int _i;\n" " for (_i = 0; _i < %d; ++_i) {\n" " _p[_slist%d[_i]] += dt*_p[_dlist%d[_i]];\n" " }}\n", numeqn, listnum, listnum)
void notify_freed_val_array(double *p, size_t size)
void notify_pointer_freed(void *pt)
Symbol * hoc_parse_expr(const char *str, Symlist **psymlist)
int hoc_oc(const char *buf)
double hoc_run_expr(Symbol *sym)
char * cxx_char_alloc(size_t sz)
void notify_freed(void *p)
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
int hoc_execerror_messages
void nrn_err_dialog(const char *mes)
static nrn::tool::bimap< double *, Observer * > * pdob
void nrn_notify_freed(PF pf)
static nrn::tool::bimap< void *, Observer * > * pvob
double(* nrnpy_object_to_double_)(Object *)
int nrn_err_dialog_active_
void(* nrnpy_restore_thread)(void *)
void nrn_notify_when_void_freed(void *p, Observer *ob)
void nrn_notify_when_double_freed(double *p, Observer *ob)
void nrniv_bind_thread(void)
void nrn_notify_pointer_disconnect(Observer *ob)
int hoc_print_first_instance
void hoc_main1_init(const char *, const char **)
int hoc_main1(int, const char **, const char **)
#define MUTCONSTRUCT(mkmut)
static const char ** pname(void *v)
static double done(void *v)
void continue_dialog(const char *label, Window *w=NULL, Coord x=400., Coord y=400.)