1 #include <../../nrnconf.h>
5 #include <InterViews/deck.h>
6 #include <InterViews/patch.h>
7 #include <InterViews/layout.h>
8 #include <InterViews/background.h>
9 #include <IV-look/kit.h>
23 class SpecialPatch:
public Patch {
26 virtual ~SpecialPatch();
32 SpecialPatch::SpecialPatch(
Glyph*
g)
34 SpecialPatch::~SpecialPatch() {}
35 void SpecialPatch::request(
Requisition& req)
const {
47 Patch::allocate(
c, aa,
e);
49 Patch::allocate(
c, a,
e);
94 if (b->has_window()) {
95 b->window()->dismiss();
105 bool b = int(
chkarg(1, 0., 1.));
121 w = b->make_window(
float(*
getarg(2)),
126 w = b->make_window();
145 if (b->has_window()) {
146 b->window()->dismiss();
163 for (
i=0;
i < 4; ++
i) {
187 i = int(
chkarg(1, -1, b->count() - 1));
212 b->remove((
int)
chkarg(1, 0, b->count() - 1));
225 b->move_last((
int)
chkarg(1, 0, b->count() - 1));
260 bi_ =
new OcDeckImpl;
262 bi_->deck_ =
new Deck(2);
267 lk.flexible(bi_->deck_
272 bi_->save_action_ =
NULL;
281 if (
bi_->save_action_) {
282 delete (
bi_->save_action_);
289 ((SpecialPatch*) body())->reallocate();
290 ((SpecialPatch*) body())->redraw();
296 bi_->ocglyph_list_->append(
g);
297 bi_->deck_->append(
g);
305 if (
bi_->deck_->card() == last) {
308 bi_->ocglyph_list_->remove(last);
309 bi_->deck_->remove(last);
313 if (
bi_->deck_->card() ==
i) {
316 bi_->ocglyph_list_->remove(
i);
317 bi_->deck_->remove(
i);
321 int last =
bi_->ocglyph_list_->count() - 1;
326 bi_->ocglyph_list_->insert(
i,
g);
327 bi_->deck_->insert(
i,
g);
328 last =
bi_->ocglyph_list_->count() - 1;
329 bi_->ocglyph_list_->remove(last);
330 bi_->deck_->remove(last);
337 ++
bi_->oc_ref_->refcount;
343 if (
bi_->save_action_) {
347 o <<
"{ocbox_ = new Deck()" << endl;
348 o <<
"ocbox_list_.prepend(ocbox_)" << endl;
349 o <<
"ocbox_.intercept(1)}" << endl;
350 long i,
cnt =
bi_->ocglyph_list_->count();
351 for (
i = 0;
i <
cnt; ++
i) {
354 o <<
"{ocbox_ = ocbox_list_.object(0)" << endl;
355 o <<
"ocbox_list_.remove(0)" << endl;
356 o <<
"ocbox_.intercept(0)" << endl;
360 "ocbox_.map(\"%s\", %g, %g, %g, %g)}",
368 o <<
"ocbox_.map()}" << endl;
Allotment & y_allotment()
virtual const char * name() const
virtual void flip_to(int)
virtual void save_action(const char *, Object *)
virtual void box_append(OcGlyph *)
virtual void move_last(int)
virtual void save(ostream &)
virtual void remove_last()
virtual PrintableWindow * window()
virtual bool has_window()
virtual void unref() const
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)
double chkarg(int, double low, double high)
char * hoc_object_pathname(Object *ob)
void hoc_dec_refcount(Object **pobj)
#define TRY_GUI_REDIRECT_ACTUAL_DOUBLE(name, obj)
#define TRY_GUI_REDIRECT_NO_RETURN(name, obj)
#define TRY_GUI_REDIRECT_OBJ(name, obj)
Object ** hoc_objgetarg(int)
void class2oc(const char *, void *(*cons)(Object *), void(*destruct)(void *), Member_func *, int(*checkpoint)(void **), Member_ret_obj_func *, Member_ret_str_func *)
static Member_func members[]
static double move_last(void *v)
static void * cons(Object *)
double(* nrnpy_object_to_double_)(Object *)
static void destruct(void *v)
static double unmap(void *v)
static double map(void *v)
static double save(void *v)
static double remove(void *v)
static double intercept(void *v)
static double remove_last(void *v)
static double flip_to(void *v)