Back to index

plt-scheme  4.2.1
Classes | Defines | Functions | Variables
wxs_slid.cxx File Reference
#include "wx_slidr.h"
#include "wxscheme.h"
#include "wxs_slid.h"

Go to the source code of this file.

Classes

class  os_wxSlider

Defines

#define BM_IN_USE(map)   ((map)->selectedIntoDC)
#define ESCAPE_NO_RET_VAL   /*empty*/
#define wxPLAIN_SLIDER   (wxHORIZONTAL << 2)
#define CB_FUNCTYPE   wxFunction
#define CALLBACKCLASS   os_wxSlider
#define CB_REALCLASS   wxSlider
#define CB_UNBUNDLE   objscheme_unbundle_wxSlider
#define CB_USER   METHODNAME("slider%","initialization")
#define CB_TOSCHEME   wxSliderCallbackToScheme
#define CB_TOC   wxSliderCallbackToC

Functions

static void init_symset_sliderStyle (void)
static int unbundle_symset_sliderStyle (Scheme_Object *v, const char *where)
wxCommandEventobjscheme_unbundle_wxCommandEvent (Scheme_Object *, const char *, int)
Scheme_Objectobjscheme_bundle_wxCommandEvent (wxCommandEvent *)
static void CB_TOSCHEME (CB_REALCLASS *obj, wxCommandEvent *event)
os_wxSlider::os_wxSlider CONSTRUCTOR_ARGS ((class wxPanel *x0, wxFunction x1, nstring x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, class wxFont *x10, string x11))
static Scheme_Objectos_wxSliderOnDropFile (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderPreOnEvent (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderPreOnChar (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderOnSize (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderOnSetFocus (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderOnKillFocus (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderSetValue (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSliderGetValue (int n, Scheme_Object *p[])
static Scheme_Objectos_wxSlider_ConstructScheme (int n, Scheme_Object *p[])
void objscheme_setup_wxSlider (Scheme_Env *env)
int objscheme_istype_wxSlider (Scheme_Object *obj, const char *stop, int nullOK)
Scheme_Objectobjscheme_bundle_wxSlider (class wxSlider *realobj)
class wxSliderobjscheme_unbundle_wxSlider (Scheme_Object *obj, const char *where, int nullOK)

Variables

static Scheme_ObjectsliderStyle_wxVERTICAL_sym = NULL
static Scheme_ObjectsliderStyle_wxHORIZONTAL_sym = NULL
static Scheme_ObjectsliderStyle_wxPLAIN_SLIDER_sym = NULL
static Scheme_ObjectsliderStyle_wxVERTICAL_LABEL_sym = NULL
static Scheme_ObjectsliderStyle_wxHORIZONTAL_LABEL_sym = NULL
static Scheme_ObjectsliderStyle_wxINVISIBLE_sym = NULL
static Scheme_Objectos_wxSlider_class

Define Documentation

#define BM_IN_USE (   map)    ((map)->selectedIntoDC)

Definition at line 23 of file wxs_slid.cxx.

#define CALLBACKCLASS   os_wxSlider

Definition at line 98 of file wxs_slid.cxx.

#define CB_FUNCTYPE   wxFunction

Definition at line 90 of file wxs_slid.cxx.

#define CB_REALCLASS   wxSlider

Definition at line 99 of file wxs_slid.cxx.

#define CB_TOC   wxSliderCallbackToC

Definition at line 106 of file wxs_slid.cxx.

#define CB_TOSCHEME   wxSliderCallbackToScheme

Definition at line 105 of file wxs_slid.cxx.

Definition at line 100 of file wxs_slid.cxx.

#define CB_USER   METHODNAME("slider%","initialization")

Definition at line 101 of file wxs_slid.cxx.

#define ESCAPE_NO_RET_VAL   /*empty*/

Definition at line 28 of file wxs_slid.cxx.

#define wxPLAIN_SLIDER   (wxHORIZONTAL << 2)

Definition at line 38 of file wxs_slid.cxx.


Function Documentation

static void CB_TOSCHEME ( CB_REALCLASS obj,
wxCommandEvent event 
) [static]

Definition at line 754 of file wxs_slid.cxx.

{
  Scheme_Object *p[2];
  Scheme_Class_Object *obj;
  mz_jmp_buf savebuf;
  Scheme_Thread *thread;
  SETUP_VAR_STACK(4);
  VAR_STACK_PUSH(0, obj);
  VAR_STACK_PUSH(1, event);
  VAR_STACK_PUSH(2, p[0]);
  VAR_STACK_PUSH(3, p[1]);

  p[0] = NULL;
  p[1] = NULL;

  obj = (Scheme_Class_Object *)realobj->__gc_external;

  if (!obj) {
    // scheme_signal_error("bad callback object");
    return;
  }

  p[0] = (Scheme_Object *)obj;
  p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));

  thread = scheme_get_current_thread();
  COPY_JMPBUF(savebuf, *(thread->error_buf));

  if (!scheme_setjmp(*(thread->error_buf)))
    WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));

  thread = scheme_get_current_thread();
  COPY_JMPBUF(*(thread->error_buf), savebuf);

  READY_TO_RETURN;
}

Here is the call graph for this function:

os_wxSlider::os_wxSlider CONSTRUCTOR_ARGS ( (class wxPanel *x0, wxFunction x1, nstring x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, class wxFont *x10, string x11)  )

Definition at line 160 of file wxs_slid.cxx.

                 : wxSlider(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11))
{
}
static void init_symset_sliderStyle ( void  ) [static]

Definition at line 513 of file wxs_evnt.cxx.

{
  Scheme_Class_Object *obj INIT_NULLED_OUT;
  Scheme_Object *sobj INIT_NULLED_OUT;

  if (!realobj) return XC_SCHEME_NULL;

  if (realobj->__gc_external)
    return (Scheme_Object *)realobj->__gc_external;

  SETUP_VAR_STACK(2);
  VAR_STACK_PUSH(0, obj);
  VAR_STACK_PUSH(1, realobj);

  if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxCommandEvent_class));

  obj->primdata = realobj;
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  return (Scheme_Object *)obj;
}

Definition at line 710 of file wxs_slid.cxx.

{
  Scheme_Class_Object *obj INIT_NULLED_OUT;
  Scheme_Object *sobj INIT_NULLED_OUT;

  if (!realobj) return XC_SCHEME_NULL;

  if (realobj->__gc_external)
    return (Scheme_Object *)realobj->__gc_external;

  SETUP_VAR_STACK(2);
  VAR_STACK_PUSH(0, obj);
  VAR_STACK_PUSH(1, realobj);

  if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
    { READY_TO_RETURN; return sobj; }
  obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxSlider_class));

  obj->primdata = realobj;
  WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
  obj->primflag = 0;

  realobj->__gc_external = (void *)obj;
  READY_TO_RETURN;
  return (Scheme_Object *)obj;
}

Here is the call graph for this function:

int objscheme_istype_wxSlider ( Scheme_Object obj,
const char *  stop,
int  nullOK 
)

Definition at line 696 of file wxs_slid.cxx.

{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxSlider_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "slider% object or " XC_NULL_STR: "slider% object", -1, 0, &obj));
    return 0;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 671 of file wxs_slid.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 539 of file wxs_evnt.cxx.

class wxSlider* objscheme_unbundle_wxSlider ( Scheme_Object obj,
const char *  where,
int  nullOK 
)

Definition at line 737 of file wxs_slid.cxx.

{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxSlider(obj, where, nullOK);
  Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
  WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
  if (o->primflag)
    return (os_wxSlider *)o->primdata;
  else
    return (wxSlider *)o->primdata;
}

Here is the call graph for this function:

static Scheme_Object* os_wxSlider_ConstructScheme ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 598 of file wxs_slid.cxx.

{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxSlider *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  class wxPanel* x0 INIT_NULLED_OUT;
  wxFunction x1;
  nstring x2 INIT_NULLED_OUT;
  int x3;
  int x4;
  int x5;
  int x6;
  int x7;
  int x8;
  int x9;
  class wxFont* x10 INIT_NULLED_OUT;
  string x11 INIT_NULLED_OUT;

  SETUP_VAR_STACK_PRE_REMEMBERED(6);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, realobj);
  VAR_STACK_PUSH(2, x0);
  VAR_STACK_PUSH(3, x2);
  VAR_STACK_PUSH(4, x10);
  VAR_STACK_PUSH(5, x11);

  int cb_pos = 0;
  if ((n < (POFFSET+7)) || (n > (POFFSET+12))) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in slider%", POFFSET+7, POFFSET+12, n, p, 1));
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in slider%", 0));
  x1 = (SCHEME_NULLP(p[POFFSET+1]) ? NULL : (WITH_REMEMBERED_STACK(objscheme_istype_proc2(p[POFFSET+1], CB_USER)), cb_pos = 1, (CB_FUNCTYPE)CB_TOSCHEME));
  x2 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+2], "initialization in slider%"));
  x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in slider%"));
  x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in slider%"));
  x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "initialization in slider%"));
  x6 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+6], "initialization in slider%"));
  if (n > (POFFSET+7)) {
    x7 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+7], "initialization in slider%"));
  } else
    x7 = -1;
  if (n > (POFFSET+8)) {
    x8 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+8], "initialization in slider%"));
  } else
    x8 = -1;
  if (n > (POFFSET+9)) {
    x9 = WITH_VAR_STACK(unbundle_symset_sliderStyle(p[POFFSET+9], "initialization in slider%"));
  } else
    x9 = wxHORIZONTAL;
  if (n > (POFFSET+10)) {
    x10 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+10], "initialization in slider%", 1));
  } else
    x10 = NULL;
  if (n > (POFFSET+11)) {
    x11 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+11], "initialization in slider%"));
  } else
    x11 = "slider";

  if (x3 < x4 || x5 < x3) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("slider%","initialization"), "minimum, value, and maximum must be increasing; given minimum: ", p[POFFSET+4]));if (x6 <= 0) x6 = 1;
  realobj = WITH_VAR_STACK(new os_wxSlider CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11)));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxSlider(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11));
#endif
  realobj->__gc_external = (void *)p[0];
  
  realobj->callback_closure = p[POFFSET+cb_pos];
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
  return scheme_void;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object* os_wxSliderGetValue ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 418 of file wxs_slid.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderOnDropFile ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 439 of file wxs_slid.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderOnKillFocus ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 575 of file wxs_slid.cxx.

{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSlider_class, "on-kill-focus in slider%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->wxSlider::OnKillFocus());
  else
    WITH_VAR_STACK(((wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderOnSetFocus ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 552 of file wxs_slid.cxx.

{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSlider_class, "on-set-focus in slider%", n, p);

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->wxSlider::OnSetFocus());
  else
    WITH_VAR_STACK(((wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());

  
  
  READY_TO_RETURN;
  return scheme_void;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderOnSize ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 525 of file wxs_slid.cxx.

{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxSlider_class, "on-size in slider%", n, p);
  int x0;
  int x1;

  SETUP_VAR_STACK_REMEMBERED(1);
  VAR_STACK_PUSH(0, p);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in slider%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in slider%"));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    WITH_VAR_STACK(((os_wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->wxSlider::OnSize(x0, x1));
  else
    WITH_VAR_STACK(((wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderPreOnChar ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 495 of file wxs_slid.cxx.

{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSlider_class, "pre-on-char in slider%", n, p);
  class wxWindow* x0 INIT_NULLED_OUT;
  class wxKeyEvent* x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in slider%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in slider%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSlider *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
  else
    r = WITH_VAR_STACK(((wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object * os_wxSliderPreOnEvent ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 465 of file wxs_slid.cxx.

{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxSlider_class, "pre-on-event in slider%", n, p);
  class wxWindow* x0 INIT_NULLED_OUT;
  class wxMouseEvent* x1 INIT_NULLED_OUT;

  SETUP_VAR_STACK_REMEMBERED(3);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, x0);
  VAR_STACK_PUSH(2, x1);

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in slider%", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in slider%", 0));

  
  if (((Scheme_Class_Object *)p[0])->primflag)
    r = WITH_VAR_STACK(((os_wxSlider *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
  else
    r = WITH_VAR_STACK(((wxSlider *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));

  
  
  READY_TO_RETURN;
  return (r ? scheme_true : scheme_false);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static Scheme_Object* os_wxSliderSetValue ( int  n,
Scheme_Object p[] 
) [static]

Definition at line 396 of file wxs_slid.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

static int unbundle_symset_sliderStyle ( Scheme_Object v,
const char *  where 
) [static]

Definition at line 63 of file wxs_slid.cxx.

                                                                            {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!sliderStyle_wxINVISIBLE_sym) WITH_VAR_STACK(init_symset_sliderStyle());
  Scheme_Object *i INIT_NULLED_OUT, *l = v;
  long result = 0;
  while (SCHEME_PAIRP(l)) {
  i = SCHEME_CAR(l);
  if (0) { }
  else if (i == sliderStyle_wxVERTICAL_sym) { result = result | wxVERTICAL; }
  else if (i == sliderStyle_wxHORIZONTAL_sym) { result = result | wxHORIZONTAL; }
  else if (i == sliderStyle_wxPLAIN_SLIDER_sym) { result = result | wxPLAIN_SLIDER; }
  else if (i == sliderStyle_wxVERTICAL_LABEL_sym) { result = result | wxVERTICAL_LABEL; }
  else if (i == sliderStyle_wxHORIZONTAL_LABEL_sym) { result = result | wxHORIZONTAL_LABEL; }
  else if (i == sliderStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
  else { break; } 
  l = SCHEME_CDR(l);
  }
  if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "sliderStyle symbol list", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 158 of file wxs_slid.cxx.

Definition at line 44 of file wxs_slid.cxx.

Definition at line 41 of file wxs_slid.cxx.

Definition at line 45 of file wxs_slid.cxx.

Definition at line 42 of file wxs_slid.cxx.

Definition at line 43 of file wxs_slid.cxx.

Definition at line 40 of file wxs_slid.cxx.