NEURON
oclist.cpp
Go to the documentation of this file.
1 #include <../../nrnconf.h>
2 
3 #include <stdio.h>
4 #include "classreg.h"
5 #include "code.h"
6 #include "oclist.h"
7 #include "oc2iv.h"
8 #include "hoclist.h"
9 #include "ocobserv.h"
10 #include "oc_ansi.h"
11 #if HAVE_IV
12 #include <InterViews/adjust.h>
13 #include <InterViews/hit.h>
14 #include "ocglyph.h"
15 #include "apwindow.h"
16 #include "ocbrowsr.h"
17 #include "objcmd.h"
18 #endif
19 
20 #include "gui-redirect.h"
21 
22 #include "parse.hpp"
23 extern Object** hoc_temp_objptr(Object*);
26 
28 
29 #if HAVE_IV
30 /*static*/ class OcListBrowser: public OcBrowser {
31  public:
32  OcListBrowser(OcList*, const char* = NULL, Object* pystract = NULL);
33  OcListBrowser(OcList*, char**, const char*);
34  virtual ~OcListBrowser();
35  virtual void drag(const Event& e);
36  virtual void select(GlyphIndex);
37  virtual void dragselect(GlyphIndex);
38  virtual void reload();
39  virtual void reload(GlyphIndex);
40  virtual void set_select_action(const char*, bool on_rel = false, Object* pyact = NULL);
41  virtual void set_accept_action(const char*, Object* pyact = NULL);
42  virtual void accept();
43  virtual void release(const Event&);
44  virtual InputHandler* focus_in();
45  void load_item(GlyphIndex i);
46  void ocglyph(Window* w);
47  void ocglyph_unmap();
48 
49  private:
50  void change_name(GlyphIndex);
51 
52  private:
53  OcList* ocl_;
54  HocCommand* select_action_;
55  HocCommand* accept_action_;
56  HocCommand* label_action_;
57  HocCommand* label_pystract_;
58  bool on_release_;
59  char** plabel_;
60  CopyString* items_;
61  OcGlyph* ocg_;
62  bool ignore_;
63 };
64 #else
65 class OcListBrowser {};
66 #endif
67 
69 static void chk_list(Object* o) {
70  if (!o || o->ctemplate != list_class_sym_->u.ctemplate) {
71  check_obj_type(o, "List");
72  }
73 }
74 
75 static double l_append(void* v) {
76  OcList* o = (OcList*) v;
77  Object* ob = *hoc_objgetarg(1);
78  o->append(ob);
79  return o->count();
80 }
82  if (!ob)
83  return;
84  oref(ob);
85  oli_.push_back(ob);
86 #if HAVE_IV
87  if (b_) {
88  b_->load_item(count() - 1);
89  b_->select_and_adjust(count() - 1);
90  }
91 #endif
92 }
93 
94 void OcList::oref(Object* ob) {
95  if (!ct_) {
96  ++ob->refcount;
97  }
98 }
99 
101  if (!ct_) {
102  hoc_dec_refcount(&ob);
103  }
104 }
105 
107  ClassObservable* co = (ClassObservable*) o;
108  Object* ob = co->object();
109  // printf("notify %d %s\n", co->message(), hoc_object_name(ob));
110  switch (co->message()) {
112  long i = index(ob);
113  if (i >= 0) {
114  remove(i);
115  }
116  } break;
118  append(ob);
119  break;
120  default:
121 #if HAVE_IV
122  if (b_) {
123  long i = index(ob);
124  if (i >= 0) {
125  b_->reload(i);
126  }
127  }
128 #endif
129  break;
130  }
131 }
132 
133 static double l_prepend(void* v) {
134  OcList* o = (OcList*) v;
135  Object* ob = *hoc_objgetarg(1);
136  o->prepend(ob);
137  return o->count();
138 }
140  if (!ob)
141  return;
142  oref(ob);
143  oli_.insert(oli_.begin(), ob);
144 #if HAVE_IV
145  if (b_) {
146  b_->reload();
147  }
148 #endif
149 }
150 
151 static double l_insert(void* v) {
152  OcList* o = (OcList*) v;
153  long i = long(chkarg(1, 0, o->count()));
154  Object* ob = *hoc_objgetarg(2);
155  o->insert(i, ob);
156  return o->count();
157 }
158 void OcList::insert(long i, Object* ob) {
159  if (!ob)
160  return;
161  oref(ob);
162  oli_.insert(oli_.begin() + i, ob);
163 #if HAVE_IV
164  if (b_) {
165  b_->reload();
166  }
167 #endif
168 }
169 
170 static double l_count(void* v) {
171  OcList* o = (OcList*) v;
173  return o->count();
174 }
176  return oli_.size();
177 }
178 
179 static double l_remove(void* v) {
180  OcList* o = (OcList*) v;
181  long i = long(chkarg(1, 0, o->count() - 1));
182  o->remove(i);
183  return o->count();
184 }
185 void OcList::remove(long i) {
186  Object* ob = oli_[i];
187  oli_.erase(oli_.begin() + i);
188 #if HAVE_IV
189  if (b_) {
190  b_->select(-1);
191  b_->remove_selectable(i);
192  b_->remove(i);
193  b_->refresh();
194  }
195 #endif
196  ounref(ob);
197 }
198 
199 static double l_index(void* v) {
200  OcList* o = (OcList*) v;
201  Object* ob = *hoc_objgetarg(1);
203  return o->index(ob);
204 }
206  for (long i = 0; i < oli_.size(); ++i) {
207  if (oli_[i] == ob) {
208  return i;
209  }
210  }
211  return -1;
212 }
213 
214 static Object** l_object(void* v) {
215  OcList* o = (OcList*) v;
216  long i = long(chkarg(1, 0, o->count() - 1));
217  return hoc_temp_objptr(o->object(i));
218 }
220  return oli_[i];
221 }
222 
223 static double l_remove_all(void* v) {
224  OcList* o = (OcList*) v;
225  o->remove_all();
226  return o->count();
227 }
229  for (auto& ob: oli_) {
230  ounref(ob);
231  }
232  oli_.clear();
233 #if HAVE_IV
234  if (b_) {
235  b_->select(-1);
236  b_->reload();
237  }
238 #endif
239 }
240 
241 static double l_browser(void* v) {
243 #if HAVE_IV
244  if (hoc_usegui) {
245  char* s = 0;
246  char* i = 0;
247  char** p = 0;
248  OcList* o = (OcList*) v;
249  if (ifarg(1)) {
250  s = gargstr(1);
251  }
252  if (ifarg(3)) {
253  i = gargstr(3);
254  p = hoc_pgargstr(2);
255  o->create_browser(s, p, i);
256  return 1.;
257  }
258  if (ifarg(2)) {
259  if (hoc_is_object_arg(2)) {
261  return 1.;
262  }
263  i = gargstr(2);
264  }
265  o->create_browser(s, i);
266  }
267 #endif
268  return 1.;
269 }
270 
271 static double l_select(void* v) {
273 #if HAVE_IV
274  if (hoc_usegui) {
275  OcListBrowser* b = ((OcList*) v)->browser();
276  long i = (long) (*getarg(1));
277  if (b) {
278  b->select_and_adjust(i);
279  }
280  }
281 #endif
282  return 1.;
283 }
284 static double l_select_action(void* v) {
286 #if HAVE_IV
287  if (hoc_usegui) {
288  OcListBrowser* b = ((OcList*) v)->browser();
289  if (b) {
290  bool on_rel = false;
291  if (ifarg(2)) {
292  on_rel = (bool) chkarg(2, 0, 1);
293  }
294  if (hoc_is_object_arg(1)) {
295  b->set_select_action(NULL, on_rel, *hoc_objgetarg(1));
296  } else {
297  b->set_select_action(gargstr(1), on_rel);
298  }
299  }
300  }
301 #endif
302  return 1.;
303 }
304 static double l_selected(void* v) {
307 #if HAVE_IV
308  long i = -1;
309  if (hoc_usegui) {
310  OcListBrowser* b = ((OcList*) v)->browser();
311  if (b) {
312  i = b->selected();
313  } else {
314  i = -1;
315  }
316  }
317  return (double) i;
318 #else
319  return 0.;
320 #endif
321 }
322 static double l_accept_action(void* v) {
324 #if HAVE_IV
325  if (hoc_usegui) {
326  OcListBrowser* b = ((OcList*) v)->browser();
327  if (b) {
328  if (hoc_is_object_arg(1)) {
329  b->set_accept_action(NULL, *hoc_objgetarg(1));
330  } else {
331  b->set_accept_action(gargstr(1));
332  }
333  }
334  }
335 #endif
336  return 1.;
337 }
338 
339 static double l_scroll_pos(void* v) {
341 #if HAVE_IV
342  if (hoc_usegui) {
343  OcList* o = (OcList*) v;
344  OcListBrowser* b = o->browser();
345  if (b) {
346  Adjustable* a = b->adjustable();
347  if (ifarg(1)) {
348  Coord c = (Coord) chkarg(1, 0, 1e9);
349  c = (double) o->count() - a->cur_length(Dimension_Y) - c;
350  a->scroll_to(Dimension_Y, c);
351  }
352  // printf("%g %g %g %g\n", (double)o->count(), a->cur_lower(Dimension_Y),
353  // a->cur_upper(Dimension_Y), a->cur_length(Dimension_Y));
354  return (double) (o->count() - 1) - (double) a->cur_upper(Dimension_Y);
355  }
356  }
357 #endif
358  return -1.;
359 }
360 
361 
362 static Member_func l_members[] = {{"append", l_append},
363  {"prepend", l_prepend},
364  {"insrt", l_insert},
365  {"remove", l_remove},
366  {"remove_all", l_remove_all},
367  {"index", l_index},
368  {"count", l_count},
369  {"browser", l_browser},
370  {"selected", l_selected},
371  {"select", l_select},
372  {"select_action", l_select_action},
373  {"accept_action", l_accept_action},
374  {"scroll_pos", l_scroll_pos},
375  {nullptr, nullptr}};
376 
378  {"o", l_object},
379  {nullptr, nullptr}};
380 
381 static void* l_cons(Object*) {
382  OcList* o;
383  if (ifarg(1)) {
384  if (hoc_is_str_arg(1)) {
385  o = new OcList(gargstr(1));
386  } else {
387  o = new OcList(long(chkarg(1, 0, 1e8)));
388  }
389  } else {
390  o = new OcList();
391  }
392  o->ref();
393  return (void*) o;
394 }
395 
396 int ivoc_list_count(Object* olist) {
397  chk_list(olist);
398  OcList* list = (OcList*) olist->u.this_pointer;
399  return list->count();
400 }
401 
402 Object* ivoc_list_item(Object* olist, int i) {
403  chk_list(olist);
404  OcList* list = (OcList*) olist->u.this_pointer;
405  if (i >= 0 && i < list->count()) {
406  return list->object(i);
407  } else {
408  return 0;
409  }
410 }
411 
413  b_ = nullptr;
414  ct_ = nullptr;
415 }
416 
417 OcList::OcList(const char* name) {
418  Symbol* s = hoc_lookup(name);
419  if (!s) {
421  }
422  if (!s || s->type != TEMPLATE) {
423  hoc_execerror(name, "is not a template name");
424  }
425  ct_ = s->u.ctemplate;
426  int cnt = ct_->count;
427  cnt = (cnt) ? cnt : 5;
428  b_ = nullptr;
429  hoc_Item* q;
430  ITERATE(q, ct_->olist) {
431  append(OBJ(q));
432  }
434 }
435 
436 static void l_destruct(void* v) {
437  OcList* o = (OcList*) v;
438  o->unref();
439 }
441  if (ct_) {
443  }
444 #if HAVE_IV
445  if (b_) {
446  b_->ocglyph_unmap();
447  }
449 #endif
450  b_ = NULL;
451  remove_all();
452 }
453 
454 void OcList_reg() {
455  // printf("Oclist_reg\n");
456  class2oc("List", l_cons, l_destruct, l_members, l_retobj_members, nullptr);
457  list_class_sym_ = hoc_lookup("List");
458 }
459 
460 extern bool hoc_objectpath_impl(Object* ob, Object* oblook, char* path, int depth);
461 extern void hoc_path_prepend(char*, const char*, const char*);
462 int ivoc_list_look(Object* ob, Object* oblook, char* path, int) {
463  if (oblook->ctemplate->constructor == l_cons) {
464  OcList* o = (OcList*) oblook->u.this_pointer;
465  long i, cnt = o->count();
466  Object* obj;
467  for (i = 0; i < cnt; ++i) {
468  obj = o->object(i);
469 #if 0
470  if (obj && obj != oblook &&
471  hoc_objectpath_impl(ob, obj, path, depth) ) {
472 #else
473  if (obj == ob) {
474 #endif
475  auto const tmp = "object(" + std::to_string(i) + ")";
476  hoc_path_prepend(path, tmp.c_str(), "");
477  return 1;
478  }
479  }
480 }
481 return 0;
482 }
483 
484 void OcList::create_browser(const char* name, const char* items, Object* pystract) {
485 #if HAVE_IV
486  if (b_) {
487  b_->ocglyph_unmap();
488  }
490  b_ = new OcListBrowser(this, items, pystract);
491  b_->ref();
492  PrintableWindow* w = new StandardWindow(b_->standard_glyph());
493  b_->ocglyph(w);
494  if (name) {
495  w->name(name);
496  }
497  w->map();
498 #endif
499 }
500 
501 void OcList::create_browser(const char* name, char** pstr, const char* action) {
502 #if HAVE_IV
503  if (b_) {
504  b_->ocglyph_unmap();
505  }
507  b_ = new OcListBrowser(this, pstr, action);
508  b_->ref();
509  PrintableWindow* w = new StandardWindow(b_->standard_glyph());
510  b_->ocglyph(w);
511  if (name) {
512  w->name(name);
513  }
514  w->map();
515 #endif
516 }
517 
519  return b_;
520 }
521 
522 //-----------------------------------------
523 #if HAVE_IV
524 
525 OcListBrowser::OcListBrowser(OcList* ocl, const char* items, Object* pystract)
526  : OcBrowser() {
527  ocl_ = ocl; // not reffed because this is reffed by ocl
528  ocg_ = NULL; // do not ref
529  select_action_ = NULL;
530  accept_action_ = NULL;
531  plabel_ = NULL;
532  label_action_ = NULL;
533  label_pystract_ = NULL;
534  if (pystract) {
535  label_pystract_ = new HocCommand(pystract);
536  }
537  on_release_ = false;
538  ignore_ = false;
539  if (items) {
540  items_ = new CopyString(items);
541  } else {
542  items_ = NULL;
543  }
544  reload();
545 }
546 
547 OcListBrowser::OcListBrowser(OcList* ocl, char** pstr, const char* action)
548  : OcBrowser() {
549  ocl_ = ocl;
550  ocg_ = NULL;
551  select_action_ = NULL;
552  accept_action_ = NULL;
553  on_release_ = false;
554  ignore_ = false;
555  plabel_ = pstr;
556  items_ = NULL;
557  label_action_ = new HocCommand(action);
558  label_pystract_ = NULL;
559  reload();
560 }
561 
562 OcListBrowser::~OcListBrowser() {
563  if (select_action_) {
564  delete select_action_;
565  }
566  if (accept_action_) {
567  delete accept_action_;
568  }
569  if (label_action_) {
570  delete label_action_;
571  }
572  if (label_pystract_) {
573  delete label_pystract_;
574  }
575  if (items_) {
576  delete items_;
577  }
578 }
579 
580 void OcListBrowser::release(const Event& e) {
581  OcBrowser::release(e);
582  if (select_action_ && on_release_) {
583  GlyphIndex i = selected();
585  hoc_ac_ = double(i);
586  select_action_->execute();
587  }
588 }
589 
590 InputHandler* OcListBrowser::focus_in() {
591  // works around the problem that the first time a list is used
592  // the InputHandler calls focus in on the press, which then
593  // selects item 0. Perhaps that is necessary for some kind of initialization
594  // but for us with select actions it causes problems. So we temporarily
595  // turn off the select actions during focus in handling.
596  ignore_ = true;
597  InputHandler* ih = OcBrowser::focus_in();
598  ignore_ = false;
599  return ih;
600 }
601 
602 void OcListBrowser::select(GlyphIndex i) {
603  OcBrowser::select(i);
604  // printf("select %d ignore=%d\n", i, ignore_);
605  if (select_action_ && !on_release_ && !ignore_) {
607  hoc_ac_ = (double) i;
608  select_action_->execute();
609  }
610 }
611 void OcListBrowser::dragselect(GlyphIndex i) {
612  GlyphIndex old = selected();
613  OcBrowser::select(i);
614  // printf("select %d old=%d ignore=%d\n", i, old, ignore_);
615  if (old != i && select_action_ && !on_release_ && !ignore_) {
617  hoc_ac_ = (double) i;
618  select_action_->execute();
619  }
620 }
621 // mostly copied from src/InterViews/browser.cpp
622 void OcListBrowser::drag(const Event& e) {
623  if (inside(e)) {
624  Hit h(&e);
625  repick(0, h);
626  if (h.any()) {
627  dragselect(h.index(0));
628  return;
629  }
630  }
631  dragselect(-1);
632 }
633 
634 void OcListBrowser::reload() {
635  GlyphIndex i, cnt;
636  cnt = count();
637  for (i = 0; i < cnt; ++i) {
638  remove_selectable(0);
639  remove(0);
640  }
641  cnt = ocl_->count();
642  for (i = 0; i < cnt; ++i) {
643  load_item(i);
644  }
645  refresh();
646 }
647 void OcListBrowser::reload(GlyphIndex i) {
648  change_name(i);
649 }
650 
651 void OcListBrowser::load_item(GlyphIndex i) {
652  append_item("");
653  change_name(i);
654 }
655 
656 void OcListBrowser::change_name(GlyphIndex i) {
657  if (label_pystract_) {
658  hoc_ac_ = i;
659  char buf[256];
660  if (label_pystract_->exec_strret(buf, 256, bool(false))) {
661  change_item(i, buf);
662  } else {
663  change_item(i, "label error");
664  }
665  } else if (plabel_) {
666  hoc_ac_ = i;
667  if (label_action_->execute(bool(false)) == 0) {
668  change_item(i, *plabel_);
669  } else {
670  change_item(i, "label error");
671  }
672  } else if (items_) {
673  char* pstr = Oc2IV::object_str(items_->string(), ocl_->object(i));
674  if (pstr) {
675  change_item(i, pstr);
676  } else {
677  change_item(i, hoc_object_name(ocl_->object(i)));
678  }
679  } else {
680  change_item(i, hoc_object_name(ocl_->object(i)));
681  }
682 }
683 
684 void OcListBrowser::set_select_action(const char* s, bool on_rel, Object* pyact) {
685  if (select_action_) {
686  delete select_action_;
687  }
688  if (pyact) {
689  select_action_ = new HocCommand(pyact);
690  } else {
691  select_action_ = new HocCommand(s);
692  }
693  on_release_ = on_rel;
694 }
695 void OcListBrowser::set_accept_action(const char* s, Object* pyact) {
696  if (accept_action_) {
697  delete accept_action_;
698  }
699  if (pyact) {
700  accept_action_ = new HocCommand(pyact);
701  } else {
702  accept_action_ = new HocCommand(s);
703  }
704 }
705 void OcListBrowser::accept() {
706  if (accept_action_) {
707  long i = selected();
708  if (i < 0) {
709  return;
710  }
712  hoc_ac_ = (double) i;
713  accept_action_->execute();
714  }
715 }
716 void OcListBrowser::ocglyph(Window* w) {
717  ocg_ = (OcGlyph*) (w->glyph());
718  Resource::ref(ocg_);
719 }
720 
721 void OcListBrowser::ocglyph_unmap() {
722  OcGlyph* o = ocg_;
723  ocg_ = NULL;
724  if (o) {
725  if (o->has_window()) {
726  delete o->window();
727  }
728  Resource::unref(o);
729  }
730 }
731 
732 #endif
#define InputHandler
Definition: _defines.h:149
#define Window
Definition: _defines.h:330
#define Coord
Definition: _defines.h:17
#define Adjustable
Definition: _defines.h:27
#define Hit
Definition: _defines.h:145
#define GlyphIndex
Definition: _defines.h:21
#define Event
Definition: _defines.h:105
static void Detach(cTemplate *, Observer *)
Definition: ocobserv.cpp:54
static void Attach(cTemplate *, Observer *)
Definition: ocobserv.cpp:46
int message()
Definition: ocobserv.h:47
Object * object()
Definition: ocobserv.h:44
virtual const char * name() const
static char * object_str(const char *symname, Object *=NULL)
Definition: oc2iv.cpp:13
virtual PrintableWindow * window()
virtual bool has_window()
Definition: oclist.h:11
OcListBrowser * b_
Definition: oclist.h:40
void remove_all()
Definition: oclist.cpp:228
void create_browser(const char *name, const char *items=NULL, Object *pystract=NULL)
Definition: oclist.cpp:484
virtual void update(Observable *)
Definition: oclist.cpp:106
cTemplate * ct_
Definition: oclist.h:41
OcListBrowser * browser()
Definition: oclist.cpp:518
long count()
Definition: oclist.cpp:175
void prepend(Object *)
Definition: oclist.cpp:139
void ounref(Object *)
Definition: oclist.cpp:100
void append(Object *)
Definition: oclist.cpp:81
std::vector< Object * > oli_
Definition: oclist.h:39
long index(Object *)
Definition: oclist.cpp:205
void insert(long, Object *)
Definition: oclist.cpp:158
void oref(Object *)
Definition: oclist.cpp:94
void remove(long)
Definition: oclist.cpp:185
OcList(long=5)
Definition: oclist.cpp:412
virtual ~OcList()
Definition: oclist.cpp:440
Object * object(long)
Definition: oclist.cpp:219
virtual void map()
virtual void ref() const
Definition: resource.cpp:42
virtual void unref() const
Definition: resource.cpp:47
void class2oc(const char *, ctor_f *cons, dtor_f *destruct, Member_func *, Member_ret_obj_func *, Member_ret_str_func *)
Definition: hoc_oop.cpp:1631
Symbol * hoc_table_lookup(const char *, Symlist *)
Definition: symbol.cpp:48
char * gargstr(int narg)
Definition: code2.cpp:227
HocReturnType hoc_return_type_code
Definition: code.cpp:42
#define cnt
Definition: tqueue.hpp:44
#define v
Definition: md1redef.h:11
#define i
Definition: md1redef.h:19
double chkarg(int, double low, double high)
Definition: code2.cpp:626
@ Dimension_Y
Definition: geometry.h:39
char buf[512]
Definition: init.cpp:13
int hoc_is_object_arg(int narg)
Definition: code.cpp:876
Object * ivoc_list_item(Object *olist, int i)
Definition: oclist.cpp:402
int ivoc_list_look(Object *ob, Object *oblook, char *path, int)
Definition: oclist.cpp:462
int ivoc_list_count(Object *)
Definition: oclist.cpp:396
int hoc_is_str_arg(int narg)
Definition: code.cpp:872
void check_obj_type(Object *obj, const char *type_name)
Definition: hoc_oop.cpp:2098
double hoc_ac_
Definition: hoc_init.cpp:222
char * hoc_object_name(Object *ob)
Definition: hoc_oop.cpp:73
void hoc_dec_refcount(Object **pobj)
Definition: hoc_oop.cpp:1850
Symbol * hoc_lookup(const char *)
Definition: symbol.cpp:59
char ** hoc_pgargstr(int narg)
Definition: code.cpp:1623
#define TRY_GUI_REDIRECT_METHOD_ACTUAL_DOUBLE(name, sym, v)
Definition: gui-redirect.h:16
static int c
Definition: hoc.cpp:169
int hoc_usegui
Definition: hoc.cpp:121
#define getarg
Definition: hocdec.h:17
#define OBJ(q)
Definition: hoclist.h:88
Object ** hoc_objgetarg(int)
Definition: code.cpp:1614
#define ITERATE(itm, lst)
Definition: model.h:18
const char * name
Definition: init.cpp:16
static double inside(void *)
Definition: mymath.cpp:28
void hoc_execerror(const char *s1, const char *s2)
Definition: nrnoc_aux.cpp:39
if(ncell==0)
Definition: cellorder.cpp:785
std::string to_string(const T &obj)
int const size_t const size_t n
Definition: nrngsl.h:10
size_t q
size_t p
s
Definition: multisend.cpp:521
int ifarg(int)
Definition: code.cpp:1607
HOC interpreter function declarations (included by hocdec.h)
static double remove(void *v)
Definition: ocdeck.cpp:205
static double l_append(void *v)
Definition: oclist.cpp:75
static double l_accept_action(void *v)
Definition: oclist.cpp:322
static double l_remove_all(void *v)
Definition: oclist.cpp:223
static double l_count(void *v)
Definition: oclist.cpp:170
static Member_ret_obj_func l_retobj_members[]
Definition: oclist.cpp:377
bool hoc_objectpath_impl(Object *ob, Object *oblook, char *path, int depth)
Symlist * hoc_top_level_symlist
Definition: symdir.cpp:16
static double l_insert(void *v)
Definition: oclist.cpp:151
static void * l_cons(Object *)
Definition: oclist.cpp:381
static double l_select(void *v)
Definition: oclist.cpp:271
static double l_selected(void *v)
Definition: oclist.cpp:304
static double l_prepend(void *v)
Definition: oclist.cpp:133
void handle_old_focus()
Object ** hoc_temp_objptr(Object *)
Definition: code.cpp:151
static Symbol * list_class_sym_
Definition: oclist.cpp:68
static double l_index(void *v)
Definition: oclist.cpp:199
static double l_select_action(void *v)
Definition: oclist.cpp:284
void hoc_path_prepend(char *, const char *, const char *)
static void chk_list(Object *o)
Definition: oclist.cpp:69
static void l_destruct(void *v)
Definition: oclist.cpp:436
static double l_remove(void *v)
Definition: oclist.cpp:179
static Object ** l_object(void *v)
Definition: oclist.cpp:214
static double l_scroll_pos(void *v)
Definition: oclist.cpp:339
void OcList_reg()
Definition: oclist.cpp:454
static double l_browser(void *v)
Definition: oclist.cpp:241
static Member_func l_members[]
Definition: oclist.cpp:362
#define NULL
Definition: spdefs.h:105
Definition: hocdec.h:173
void * this_pointer
Definition: hocdec.h:178
int refcount
Definition: hocdec.h:174
cTemplate * ctemplate
Definition: hocdec.h:180
union Object::@47 u
Definition: model.h:47
union Symbol::@28 u
cTemplate * ctemplate
Definition: hocdec.h:126
Definition: hocdec.h:75
hoc_List * olist
Definition: hocdec.h:155
int count
Definition: hocdec.h:154
void *(* constructor)(struct Object *)
Definition: hocdec.h:158