/* DO NOT EDIT THIS FILE. */
/* This file was generated by xctocc from "wxs_styl.xc". */


#if defined(_MSC_VER)
# include "wx.h"
#endif
#if defined(OS_X)
# include "common.h"
#endif

#include "wx_style.h"
#include "wx_mtype.h"




#ifdef wx_x
# define BM_SELECTED(map) ((map)->selectedTo)
#endif
#if defined(wx_mac) || defined(wx_msw)
# define BM_SELECTED(map) ((map)->selectedInto)
#endif
# define BM_IN_USE(map) ((map)->selectedIntoDC)





#include "wxscheme.h"
#include "wxs_styl.h"

#ifdef MZ_PRECISE_GC
START_XFORM_SKIP;
#endif




class os_wxMultColour : public wxMultColour {
 public:

  ~os_wxMultColour();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxMultColour::gcMark() {
  wxMultColour::gcMark();
}
void os_wxMultColour::gcFixup() {
  wxMultColour::gcFixup();
}
#endif

static Scheme_Object *os_wxMultColour_class;
static Scheme_Object *os_wxMultColour_interface;

os_wxMultColour::~os_wxMultColour()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxMultColourSet(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMultColour_class, "set in mult-color<%>", n, p);
  double x0;
  double x1;
  double x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+0], "set in mult-color<%>"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+1], "set in mult-color<%>"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET+2], "set in mult-color<%>"));

  
  WITH_VAR_STACK(((wxMultColour *)((Scheme_Class_Object *)p[0])->primdata)->Set(x0, x1, x2));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxMultColourGet(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxMultColour_class, "get in mult-color<%>", n, p);
  double _x0;
  double* x0 = &_x0;
  double _x1;
  double* x1 = &_x1;
  double _x2;
  double* x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+0], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+1], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+2], "get in mult-color<%>")), WITH_VAR_STACK(objscheme_unbundle_double(sbox_tmp, "get in mult-color<%>"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxMultColour *)((Scheme_Class_Object *)p[0])->primdata)->Get(x0, x1, x2));

  
  if (n > (POFFSET+0))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x0)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x1)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  if (n > (POFFSET+2))
    { Scheme_Object *sbv_ = WITH_VAR_STACK(scheme_make_double(_x2)); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxMultColour_Getr(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  double v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxMultColour_class, "get-r in mult-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-r in mult-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::r;
  else
    v = ((wxMultColour *)cobj->primdata)->r;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

static Scheme_Object *objscheme_wxMultColour_Setr(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  double v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxMultColour_class, "set-r in mult-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-r in mult-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET], "set-r in mult-color%"));
  ((wxMultColour *)cobj->primdata)->r = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxMultColour_Getg(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  double v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxMultColour_class, "get-g in mult-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-g in mult-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::g;
  else
    v = ((wxMultColour *)cobj->primdata)->g;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

static Scheme_Object *objscheme_wxMultColour_Setg(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  double v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxMultColour_class, "set-g in mult-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-g in mult-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET], "set-g in mult-color%"));
  ((wxMultColour *)cobj->primdata)->g = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxMultColour_Getb(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  double v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxMultColour_class, "get-b in mult-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-b in mult-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxMultColour *)cobj->primdata)->wxMultColour::b;
  else
    v = ((wxMultColour *)cobj->primdata)->b;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

static Scheme_Object *objscheme_wxMultColour_Setb(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  double v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxMultColour_class, "set-b in mult-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-b in mult-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET], "set-b in mult-color%"));
  ((wxMultColour *)cobj->primdata)->b = v;

  READY_TO_RETURN;
  return scheme_void;
}

void objscheme_setup_wxMultColour(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxMultColour_class);
  wxREGGLOB(os_wxMultColour_interface);

  os_wxMultColour_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "mult-color%", "object%", NULL, 8));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class, "set" " method", (Scheme_Method_Prim *)os_wxMultColourSet, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class, "get" " method", (Scheme_Method_Prim *)os_wxMultColourGet, 3, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-r" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Getr, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-r" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Setr, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-g" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Getg, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-g" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Setg, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"get-b" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Getb, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxMultColour_class,"set-b" " method", (Scheme_Method_Prim *)objscheme_wxMultColour_Setb, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxMultColour_class));

  os_wxMultColour_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxMultColour_class, "mult-color" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxMultColour_interface, "mult-color" "<%>", env));

  READY_TO_RETURN;
}

int objscheme_istype_wxMultColour(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxMultColour_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "mult-color% object or " XC_NULL_STR: "mult-color% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxMultColour(class wxMultColour *realobj)
{
  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_wxMultColour_class));

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

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

class wxMultColour *objscheme_unbundle_wxMultColour(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxMultColour(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_wxMultColour *)o->primdata;
  else
    return (wxMultColour *)o->primdata;
}




// short* should really be rshort[-1000|1000]*:

class os_wxAddColour : public wxAddColour {
 public:

  ~os_wxAddColour();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxAddColour::gcMark() {
  wxAddColour::gcMark();
}
void os_wxAddColour::gcFixup() {
  wxAddColour::gcFixup();
}
#endif

static Scheme_Object *os_wxAddColour_class;
static Scheme_Object *os_wxAddColour_interface;

os_wxAddColour::~os_wxAddColour()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxAddColourSet(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxAddColour_class, "set in add-color<%>", n, p);
  int x0;
  int x1;
  int x2;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+0], -1000, 1000, "set in add-color<%>"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+1], -1000, 1000, "set in add-color<%>"));
  x2 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+2], -1000, 1000, "set in add-color<%>"));

  
  WITH_VAR_STACK(((wxAddColour *)((Scheme_Class_Object *)p[0])->primdata)->Set(x0, x1, x2));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxAddColourGet(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxAddColour_class, "get in add-color<%>", n, p);
  short _x0;
  short* x0 = &_x0;
  short _x1;
  short* x1 = &_x1;
  short _x2;
  short* x2 = &_x2;
  Scheme_Object *sbox_tmp;

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

  
      *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+0], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));
      *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+1], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));
      *x2 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+2], "get in add-color<%>")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get in add-color<%>"", extracting boxed argument")));

  
  WITH_VAR_STACK(((wxAddColour *)((Scheme_Class_Object *)p[0])->primdata)->Get(x0, x1, x2));

  
  if (n > (POFFSET+0))
    { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
  if (n > (POFFSET+1))
    { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
  if (n > (POFFSET+2))
    { Scheme_Object *sbv_ = scheme_make_integer(_x2); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+2], sbv_)); } 
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxAddColour_Getr(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxAddColour_class, "get-r in add-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-r in add-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::r;
  else
    v = ((wxAddColour *)cobj->primdata)->r;

  return scheme_make_integer(v);
}

static Scheme_Object *objscheme_wxAddColour_Setr(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxAddColour_class, "set-r in add-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-r in add-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET], -1000, 1000, "set-r in add-color%"));
  ((wxAddColour *)cobj->primdata)->r = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxAddColour_Getg(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxAddColour_class, "get-g in add-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-g in add-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::g;
  else
    v = ((wxAddColour *)cobj->primdata)->g;

  return scheme_make_integer(v);
}

static Scheme_Object *objscheme_wxAddColour_Setg(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxAddColour_class, "set-g in add-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-g in add-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET], -1000, 1000, "set-g in add-color%"));
  ((wxAddColour *)cobj->primdata)->g = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxAddColour_Getb(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxAddColour_class, "get-b in add-color%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-b in add-color%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxAddColour *)cobj->primdata)->wxAddColour::b;
  else
    v = ((wxAddColour *)cobj->primdata)->b;

  return scheme_make_integer(v);
}

static Scheme_Object *objscheme_wxAddColour_Setb(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxAddColour_class, "set-b in add-color%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-b in add-color%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET], -1000, 1000, "set-b in add-color%"));
  ((wxAddColour *)cobj->primdata)->b = v;

  READY_TO_RETURN;
  return scheme_void;
}

void objscheme_setup_wxAddColour(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxAddColour_class);
  wxREGGLOB(os_wxAddColour_interface);

  os_wxAddColour_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "add-color%", "object%", NULL, 8));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class, "set" " method", (Scheme_Method_Prim *)os_wxAddColourSet, 3, 3));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class, "get" " method", (Scheme_Method_Prim *)os_wxAddColourGet, 3, 3));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-r" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Getr, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-r" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Setr, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-g" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Getg, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-g" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Setg, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"get-b" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Getb, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxAddColour_class,"set-b" " method", (Scheme_Method_Prim *)objscheme_wxAddColour_Setb, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxAddColour_class));

  os_wxAddColour_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxAddColour_class, "add-color" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxAddColour_interface, "add-color" "<%>", env));

  READY_TO_RETURN;
}

int objscheme_istype_wxAddColour(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxAddColour_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "add-color% object or " XC_NULL_STR: "add-color% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxAddColour(class wxAddColour *realobj)
{
  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_wxAddColour_class));

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

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

class wxAddColour *objscheme_unbundle_wxAddColour(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxAddColour(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_wxAddColour *)o->primdata;
  else
    return (wxAddColour *)o->primdata;
}


static Scheme_Object *family_wxBASE_sym = NULL;
static Scheme_Object *family_wxDEFAULT_sym = NULL;
static Scheme_Object *family_wxDECORATIVE_sym = NULL;
static Scheme_Object *family_wxROMAN_sym = NULL;
static Scheme_Object *family_wxSCRIPT_sym = NULL;
static Scheme_Object *family_wxSWISS_sym = NULL;
static Scheme_Object *family_wxMODERN_sym = NULL;
static Scheme_Object *family_wxSYSTEM_sym = NULL;
static Scheme_Object *family_wxSYMBOL_sym = NULL;

static void init_symset_family(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(family_wxBASE_sym);
  family_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(family_wxDEFAULT_sym);
  family_wxDEFAULT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("default"));
  wxREGGLOB(family_wxDECORATIVE_sym);
  family_wxDECORATIVE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("decorative"));
  wxREGGLOB(family_wxROMAN_sym);
  family_wxROMAN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("roman"));
  wxREGGLOB(family_wxSCRIPT_sym);
  family_wxSCRIPT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("script"));
  wxREGGLOB(family_wxSWISS_sym);
  family_wxSWISS_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("swiss"));
  wxREGGLOB(family_wxMODERN_sym);
  family_wxMODERN_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("modern"));
  wxREGGLOB(family_wxSYSTEM_sym);
  family_wxSYSTEM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("system"));
  wxREGGLOB(family_wxSYMBOL_sym);
  family_wxSYMBOL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("symbol"));
}

static int unbundle_symset_family(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!family_wxSYMBOL_sym) WITH_VAR_STACK(init_symset_family());
  if (0) { }
  else if (v == family_wxBASE_sym) { READY_TO_RETURN; return wxBASE; }
  else if (v == family_wxDEFAULT_sym) { READY_TO_RETURN; return wxDEFAULT; }
  else if (v == family_wxDECORATIVE_sym) { READY_TO_RETURN; return wxDECORATIVE; }
  else if (v == family_wxROMAN_sym) { READY_TO_RETURN; return wxROMAN; }
  else if (v == family_wxSCRIPT_sym) { READY_TO_RETURN; return wxSCRIPT; }
  else if (v == family_wxSWISS_sym) { READY_TO_RETURN; return wxSWISS; }
  else if (v == family_wxMODERN_sym) { READY_TO_RETURN; return wxMODERN; }
  else if (v == family_wxSYSTEM_sym) { READY_TO_RETURN; return wxSYSTEM; }
  else if (v == family_wxSYMBOL_sym) { READY_TO_RETURN; return wxSYMBOL; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "family symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_family(int v) {
  if (!family_wxSYMBOL_sym) init_symset_family();
  switch (v) {
  case wxBASE: return family_wxBASE_sym;
  case wxDEFAULT: return family_wxDEFAULT_sym;
  case wxDECORATIVE: return family_wxDECORATIVE_sym;
  case wxROMAN: return family_wxROMAN_sym;
  case wxSCRIPT: return family_wxSCRIPT_sym;
  case wxSWISS: return family_wxSWISS_sym;
  case wxMODERN: return family_wxMODERN_sym;
  case wxSYSTEM: return family_wxSYSTEM_sym;
  case wxSYMBOL: return family_wxSYMBOL_sym;
  default: return NULL;
  }
}


static Scheme_Object *weight_wxBASE_sym = NULL;
static Scheme_Object *weight_wxNORMAL_sym = NULL;
static Scheme_Object *weight_wxLIGHT_sym = NULL;
static Scheme_Object *weight_wxBOLD_sym = NULL;

static void init_symset_weight(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(weight_wxBASE_sym);
  weight_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(weight_wxNORMAL_sym);
  weight_wxNORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("normal"));
  wxREGGLOB(weight_wxLIGHT_sym);
  weight_wxLIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("light"));
  wxREGGLOB(weight_wxBOLD_sym);
  weight_wxBOLD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("bold"));
}

static int unbundle_symset_weight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!weight_wxBOLD_sym) WITH_VAR_STACK(init_symset_weight());
  if (0) { }
  else if (v == weight_wxBASE_sym) { READY_TO_RETURN; return wxBASE; }
  else if (v == weight_wxNORMAL_sym) { READY_TO_RETURN; return wxNORMAL; }
  else if (v == weight_wxLIGHT_sym) { READY_TO_RETURN; return wxLIGHT; }
  else if (v == weight_wxBOLD_sym) { READY_TO_RETURN; return wxBOLD; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "weight symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_weight(int v) {
  if (!weight_wxBOLD_sym) init_symset_weight();
  switch (v) {
  case wxBASE: return weight_wxBASE_sym;
  case wxNORMAL: return weight_wxNORMAL_sym;
  case wxLIGHT: return weight_wxLIGHT_sym;
  case wxBOLD: return weight_wxBOLD_sym;
  default: return NULL;
  }
}


static Scheme_Object *style_wxBASE_sym = NULL;
static Scheme_Object *style_wxNORMAL_sym = NULL;
static Scheme_Object *style_wxITALIC_sym = NULL;
static Scheme_Object *style_wxSLANT_sym = NULL;

static void init_symset_style(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(style_wxBASE_sym);
  style_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(style_wxNORMAL_sym);
  style_wxNORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("normal"));
  wxREGGLOB(style_wxITALIC_sym);
  style_wxITALIC_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("italic"));
  wxREGGLOB(style_wxSLANT_sym);
  style_wxSLANT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("slant"));
}

static int unbundle_symset_style(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!style_wxSLANT_sym) WITH_VAR_STACK(init_symset_style());
  if (0) { }
  else if (v == style_wxBASE_sym) { READY_TO_RETURN; return wxBASE; }
  else if (v == style_wxNORMAL_sym) { READY_TO_RETURN; return wxNORMAL; }
  else if (v == style_wxITALIC_sym) { READY_TO_RETURN; return wxITALIC; }
  else if (v == style_wxSLANT_sym) { READY_TO_RETURN; return wxSLANT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "style symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_style(int v) {
  if (!style_wxSLANT_sym) init_symset_style();
  switch (v) {
  case wxBASE: return style_wxBASE_sym;
  case wxNORMAL: return style_wxNORMAL_sym;
  case wxITALIC: return style_wxITALIC_sym;
  case wxSLANT: return style_wxSLANT_sym;
  default: return NULL;
  }
}


static Scheme_Object *smoothing_wxBASE_sym = NULL;
static Scheme_Object *smoothing_wxSMOOTHING_DEFAULT_sym = NULL;
static Scheme_Object *smoothing_wxSMOOTHING_PARTIAL_sym = NULL;
static Scheme_Object *smoothing_wxSMOOTHING_ON_sym = NULL;
static Scheme_Object *smoothing_wxSMOOTHING_OFF_sym = NULL;

static void init_symset_smoothing(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(smoothing_wxBASE_sym);
  smoothing_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(smoothing_wxSMOOTHING_DEFAULT_sym);
  smoothing_wxSMOOTHING_DEFAULT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("default"));
  wxREGGLOB(smoothing_wxSMOOTHING_PARTIAL_sym);
  smoothing_wxSMOOTHING_PARTIAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("partly-smoothed"));
  wxREGGLOB(smoothing_wxSMOOTHING_ON_sym);
  smoothing_wxSMOOTHING_ON_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("smoothed"));
  wxREGGLOB(smoothing_wxSMOOTHING_OFF_sym);
  smoothing_wxSMOOTHING_OFF_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("unsmoothed"));
}

static int unbundle_symset_smoothing(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!smoothing_wxSMOOTHING_OFF_sym) WITH_VAR_STACK(init_symset_smoothing());
  if (0) { }
  else if (v == smoothing_wxBASE_sym) { READY_TO_RETURN; return wxBASE; }
  else if (v == smoothing_wxSMOOTHING_DEFAULT_sym) { READY_TO_RETURN; return wxSMOOTHING_DEFAULT; }
  else if (v == smoothing_wxSMOOTHING_PARTIAL_sym) { READY_TO_RETURN; return wxSMOOTHING_PARTIAL; }
  else if (v == smoothing_wxSMOOTHING_ON_sym) { READY_TO_RETURN; return wxSMOOTHING_ON; }
  else if (v == smoothing_wxSMOOTHING_OFF_sym) { READY_TO_RETURN; return wxSMOOTHING_OFF; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "smoothing symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_smoothing(int v) {
  if (!smoothing_wxSMOOTHING_OFF_sym) init_symset_smoothing();
  switch (v) {
  case wxBASE: return smoothing_wxBASE_sym;
  case wxSMOOTHING_DEFAULT: return smoothing_wxSMOOTHING_DEFAULT_sym;
  case wxSMOOTHING_PARTIAL: return smoothing_wxSMOOTHING_PARTIAL_sym;
  case wxSMOOTHING_ON: return smoothing_wxSMOOTHING_ON_sym;
  case wxSMOOTHING_OFF: return smoothing_wxSMOOTHING_OFF_sym;
  default: return NULL;
  }
}


static Scheme_Object *align_wxBASE_sym = NULL;
static Scheme_Object *align_wxALIGN_TOP_sym = NULL;
static Scheme_Object *align_wxALIGN_BOTTOM_sym = NULL;
static Scheme_Object *align_wxALIGN_CENTER_sym = NULL;

static void init_symset_align(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(align_wxBASE_sym);
  align_wxBASE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("base"));
  wxREGGLOB(align_wxALIGN_TOP_sym);
  align_wxALIGN_TOP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("top"));
  wxREGGLOB(align_wxALIGN_BOTTOM_sym);
  align_wxALIGN_BOTTOM_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("bottom"));
  wxREGGLOB(align_wxALIGN_CENTER_sym);
  align_wxALIGN_CENTER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("center"));
}

static int unbundle_symset_align(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!align_wxALIGN_CENTER_sym) WITH_VAR_STACK(init_symset_align());
  if (0) { }
  else if (v == align_wxBASE_sym) { READY_TO_RETURN; return wxBASE; }
  else if (v == align_wxALIGN_TOP_sym) { READY_TO_RETURN; return wxALIGN_TOP; }
  else if (v == align_wxALIGN_BOTTOM_sym) { READY_TO_RETURN; return wxALIGN_BOTTOM; }
  else if (v == align_wxALIGN_CENTER_sym) { READY_TO_RETURN; return wxALIGN_CENTER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "align symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *bundle_symset_align(int v) {
  if (!align_wxALIGN_CENTER_sym) init_symset_align();
  switch (v) {
  case wxBASE: return align_wxBASE_sym;
  case wxALIGN_TOP: return align_wxALIGN_TOP_sym;
  case wxALIGN_BOTTOM: return align_wxALIGN_BOTTOM_sym;
  case wxALIGN_CENTER: return align_wxALIGN_CENTER_sym;
  default: return NULL;
  }
}


static Scheme_Object *changeNoArg_wxCHANGE_NOTHING_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_NORMAL_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_BOLD_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_ITALIC_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_TOGGLE_SIP_sym = NULL;
static Scheme_Object *changeNoArg_wxCHANGE_NORMAL_COLOUR_sym = NULL;

static void init_symset_changeNoArg(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeNoArg_wxCHANGE_NOTHING_sym);
  changeNoArg_wxCHANGE_NOTHING_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-nothing"));
  wxREGGLOB(changeNoArg_wxCHANGE_NORMAL_sym);
  changeNoArg_wxCHANGE_NORMAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-normal"));
  wxREGGLOB(changeNoArg_wxCHANGE_BOLD_sym);
  changeNoArg_wxCHANGE_BOLD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-bold"));
  wxREGGLOB(changeNoArg_wxCHANGE_ITALIC_sym);
  changeNoArg_wxCHANGE_ITALIC_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-italic"));
  wxREGGLOB(changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym);
  changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-underline"));
  wxREGGLOB(changeNoArg_wxCHANGE_TOGGLE_SIP_sym);
  changeNoArg_wxCHANGE_TOGGLE_SIP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-size-in-pixels"));
  wxREGGLOB(changeNoArg_wxCHANGE_NORMAL_COLOUR_sym);
  changeNoArg_wxCHANGE_NORMAL_COLOUR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-normal-color"));
}

static int unbundle_symset_changeNoArg(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeNoArg_wxCHANGE_NORMAL_COLOUR_sym) WITH_VAR_STACK(init_symset_changeNoArg());
  if (0) { }
  else if (v == changeNoArg_wxCHANGE_NOTHING_sym) { READY_TO_RETURN; return wxCHANGE_NOTHING; }
  else if (v == changeNoArg_wxCHANGE_NORMAL_sym) { READY_TO_RETURN; return wxCHANGE_NORMAL; }
  else if (v == changeNoArg_wxCHANGE_BOLD_sym) { READY_TO_RETURN; return wxCHANGE_BOLD; }
  else if (v == changeNoArg_wxCHANGE_ITALIC_sym) { READY_TO_RETURN; return wxCHANGE_ITALIC; }
  else if (v == changeNoArg_wxCHANGE_TOGGLE_UNDERLINE_sym) { READY_TO_RETURN; return wxCHANGE_TOGGLE_UNDERLINE; }
  else if (v == changeNoArg_wxCHANGE_TOGGLE_SIP_sym) { READY_TO_RETURN; return wxCHANGE_TOGGLE_SIP; }
  else if (v == changeNoArg_wxCHANGE_NORMAL_COLOUR_sym) { READY_TO_RETURN; return wxCHANGE_NORMAL_COLOUR; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeNoArg symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeFam_wxCHANGE_FAMILY_sym = NULL;

static void init_symset_changeFam(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeFam_wxCHANGE_FAMILY_sym);
  changeFam_wxCHANGE_FAMILY_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-family"));
}

static int unbundle_symset_changeFam(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeFam_wxCHANGE_FAMILY_sym) WITH_VAR_STACK(init_symset_changeFam());
  if (0) { }
  else if (v == changeFam_wxCHANGE_FAMILY_sym) { READY_TO_RETURN; return wxCHANGE_FAMILY; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeFam symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeFam(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeFam_wxCHANGE_FAMILY_sym) WITH_VAR_STACK(init_symset_changeFam());
  if (0) { }
  else if (v == changeFam_wxCHANGE_FAMILY_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeFam symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeStyle_wxCHANGE_STYLE_sym = NULL;
static Scheme_Object *changeStyle_wxCHANGE_TOGGLE_STYLE_sym = NULL;

static void init_symset_changeStyle(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeStyle_wxCHANGE_STYLE_sym);
  changeStyle_wxCHANGE_STYLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-style"));
  wxREGGLOB(changeStyle_wxCHANGE_TOGGLE_STYLE_sym);
  changeStyle_wxCHANGE_TOGGLE_STYLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-style"));
}

static int unbundle_symset_changeStyle(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeStyle_wxCHANGE_TOGGLE_STYLE_sym) WITH_VAR_STACK(init_symset_changeStyle());
  if (0) { }
  else if (v == changeStyle_wxCHANGE_STYLE_sym) { READY_TO_RETURN; return wxCHANGE_STYLE; }
  else if (v == changeStyle_wxCHANGE_TOGGLE_STYLE_sym) { READY_TO_RETURN; return wxCHANGE_TOGGLE_STYLE; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeStyle symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeStyle(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeStyle_wxCHANGE_TOGGLE_STYLE_sym) WITH_VAR_STACK(init_symset_changeStyle());
  if (0) { }
  else if (v == changeStyle_wxCHANGE_STYLE_sym) { READY_TO_RETURN; return 1; }
  else if (v == changeStyle_wxCHANGE_TOGGLE_STYLE_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeStyle symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeWeight_wxCHANGE_WEIGHT_sym = NULL;
static Scheme_Object *changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym = NULL;

static void init_symset_changeWeight(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeWeight_wxCHANGE_WEIGHT_sym);
  changeWeight_wxCHANGE_WEIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-weight"));
  wxREGGLOB(changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym);
  changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-weight"));
}

static int unbundle_symset_changeWeight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) WITH_VAR_STACK(init_symset_changeWeight());
  if (0) { }
  else if (v == changeWeight_wxCHANGE_WEIGHT_sym) { READY_TO_RETURN; return wxCHANGE_WEIGHT; }
  else if (v == changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) { READY_TO_RETURN; return wxCHANGE_TOGGLE_WEIGHT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeWeight symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeWeight(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) WITH_VAR_STACK(init_symset_changeWeight());
  if (0) { }
  else if (v == changeWeight_wxCHANGE_WEIGHT_sym) { READY_TO_RETURN; return 1; }
  else if (v == changeWeight_wxCHANGE_TOGGLE_WEIGHT_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeWeight symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeSmoothing_wxCHANGE_SMOOTHING_sym = NULL;
static Scheme_Object *changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym = NULL;

static void init_symset_changeSmoothing(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeSmoothing_wxCHANGE_SMOOTHING_sym);
  changeSmoothing_wxCHANGE_SMOOTHING_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-smoothing"));
  wxREGGLOB(changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym);
  changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-toggle-smoothing"));
}

static int unbundle_symset_changeSmoothing(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym) WITH_VAR_STACK(init_symset_changeSmoothing());
  if (0) { }
  else if (v == changeSmoothing_wxCHANGE_SMOOTHING_sym) { READY_TO_RETURN; return wxCHANGE_SMOOTHING; }
  else if (v == changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym) { READY_TO_RETURN; return wxCHANGE_TOGGLE_SMOOTHING; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSmoothing symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeSmoothing(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym) WITH_VAR_STACK(init_symset_changeSmoothing());
  if (0) { }
  else if (v == changeSmoothing_wxCHANGE_SMOOTHING_sym) { READY_TO_RETURN; return 1; }
  else if (v == changeSmoothing_wxCHANGE_TOGGLE_SMOOTHING_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSmoothing symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeUnderline_wxCHANGE_UNDERLINE_sym = NULL;

static void init_symset_changeUnderline(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeUnderline_wxCHANGE_UNDERLINE_sym);
  changeUnderline_wxCHANGE_UNDERLINE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-underline"));
}

static int unbundle_symset_changeUnderline(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeUnderline_wxCHANGE_UNDERLINE_sym) WITH_VAR_STACK(init_symset_changeUnderline());
  if (0) { }
  else if (v == changeUnderline_wxCHANGE_UNDERLINE_sym) { READY_TO_RETURN; return wxCHANGE_UNDERLINE; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeUnderline symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeUnderline(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeUnderline_wxCHANGE_UNDERLINE_sym) WITH_VAR_STACK(init_symset_changeUnderline());
  if (0) { }
  else if (v == changeUnderline_wxCHANGE_UNDERLINE_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeUnderline symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeSizeInPixels_wxCHANGE_SIP_sym = NULL;

static void init_symset_changeSizeInPixels(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeSizeInPixels_wxCHANGE_SIP_sym);
  changeSizeInPixels_wxCHANGE_SIP_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-size-in-pixels"));
}

static int unbundle_symset_changeSizeInPixels(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSizeInPixels_wxCHANGE_SIP_sym) WITH_VAR_STACK(init_symset_changeSizeInPixels());
  if (0) { }
  else if (v == changeSizeInPixels_wxCHANGE_SIP_sym) { READY_TO_RETURN; return wxCHANGE_SIP; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSizeInPixels symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeSizeInPixels(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSizeInPixels_wxCHANGE_SIP_sym) WITH_VAR_STACK(init_symset_changeSizeInPixels());
  if (0) { }
  else if (v == changeSizeInPixels_wxCHANGE_SIP_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSizeInPixels symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeSize_wxCHANGE_SIZE_sym = NULL;
static Scheme_Object *changeSize_wxCHANGE_BIGGER_sym = NULL;
static Scheme_Object *changeSize_wxCHANGE_SMALLER_sym = NULL;

static void init_symset_changeSize(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeSize_wxCHANGE_SIZE_sym);
  changeSize_wxCHANGE_SIZE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-size"));
  wxREGGLOB(changeSize_wxCHANGE_BIGGER_sym);
  changeSize_wxCHANGE_BIGGER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-bigger"));
  wxREGGLOB(changeSize_wxCHANGE_SMALLER_sym);
  changeSize_wxCHANGE_SMALLER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-smaller"));
}

static int unbundle_symset_changeSize(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSize_wxCHANGE_SMALLER_sym) WITH_VAR_STACK(init_symset_changeSize());
  if (0) { }
  else if (v == changeSize_wxCHANGE_SIZE_sym) { READY_TO_RETURN; return wxCHANGE_SIZE; }
  else if (v == changeSize_wxCHANGE_BIGGER_sym) { READY_TO_RETURN; return wxCHANGE_BIGGER; }
  else if (v == changeSize_wxCHANGE_SMALLER_sym) { READY_TO_RETURN; return wxCHANGE_SMALLER; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSize symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeSize(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeSize_wxCHANGE_SMALLER_sym) WITH_VAR_STACK(init_symset_changeSize());
  if (0) { }
  else if (v == changeSize_wxCHANGE_SIZE_sym) { READY_TO_RETURN; return 1; }
  else if (v == changeSize_wxCHANGE_BIGGER_sym) { READY_TO_RETURN; return 1; }
  else if (v == changeSize_wxCHANGE_SMALLER_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeSize symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static Scheme_Object *changeAlign_wxCHANGE_ALIGNMENT_sym = NULL;

static void init_symset_changeAlign(void) {
  REMEMBER_VAR_STACK();
  wxREGGLOB(changeAlign_wxCHANGE_ALIGNMENT_sym);
  changeAlign_wxCHANGE_ALIGNMENT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("change-alignment"));
}

static int unbundle_symset_changeAlign(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeAlign_wxCHANGE_ALIGNMENT_sym) WITH_VAR_STACK(init_symset_changeAlign());
  if (0) { }
  else if (v == changeAlign_wxCHANGE_ALIGNMENT_sym) { READY_TO_RETURN; return wxCHANGE_ALIGNMENT; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeAlign symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}

static int istype_symset_changeAlign(Scheme_Object *v, const char *where) {
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, v);
  if (!changeAlign_wxCHANGE_ALIGNMENT_sym) WITH_VAR_STACK(init_symset_changeAlign());
  if (0) { }
  else if (v == changeAlign_wxCHANGE_ALIGNMENT_sym) { READY_TO_RETURN; return 1; }
  if (where) WITH_VAR_STACK(scheme_wrong_type(where, "changeAlign symbol", -1, 0, &v));
  READY_TO_RETURN;
  return 0;
}



  






class os_wxStyleDelta : public wxStyleDelta {
 public:

  os_wxStyleDelta CONSTRUCTOR_ARGS((int x0 = wxCHANGE_NOTHING, int x1 = 0));
  ~os_wxStyleDelta();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxStyleDelta::gcMark() {
  wxStyleDelta::gcMark();
}
void os_wxStyleDelta::gcFixup() {
  wxStyleDelta::gcFixup();
}
#endif

static Scheme_Object *os_wxStyleDelta_class;

os_wxStyleDelta::os_wxStyleDelta CONSTRUCTOR_ARGS((int x0, int x1))
CONSTRUCTOR_INIT(: wxStyleDelta(x0, x1))
{
}

os_wxStyleDelta::~os_wxStyleDelta()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxStyleDeltaCopy(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyleDelta_class, "copy in style-delta%", n, p);
  class wxStyleDelta* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "copy in style-delta%", 0));

  
  WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->Copy(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleDeltaCollapse(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyleDelta_class, "collapse in style-delta%", n, p);
  class wxStyleDelta* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "collapse in style-delta%", 0));

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->Collapse(x0));

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

static Scheme_Object *os_wxStyleDeltaEqual(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyleDelta_class, "equal? in style-delta%", n, p);
  class wxStyleDelta* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "equal? in style-delta%", 0));

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->Equal(x0));

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

static Scheme_Object *os_wxStyleDeltaSetDeltaForeground(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxStyleDelta_class, "set-delta-foreground in style-delta%", n, p);
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[POFFSET+0], NULL))) {
    string x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);
    VAR_STACK_PUSH(2, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta-foreground in style-delta% (color name case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-delta-foreground in style-delta% (color name case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDeltaForeground(x0));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    class wxColour* x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);
    VAR_STACK_PUSH(2, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta-foreground in style-delta% (colour% case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxColour(p[POFFSET+0], "set-delta-foreground in style-delta% (colour% case)", 0));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDeltaForeground(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *os_wxStyleDeltaSetDeltaBackground(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxStyleDelta_class, "set-delta-background in style-delta%", n, p);
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_string(p[POFFSET+0], NULL))) {
    string x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);
    VAR_STACK_PUSH(2, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta-background in style-delta% (color name case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-delta-background in style-delta% (color name case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDeltaBackground(x0));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    class wxColour* x0 INIT_NULLED_OUT;

    SETUP_VAR_STACK_PRE_REMEMBERED(3);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);
    VAR_STACK_PUSH(2, x0);

    
    if (n != (POFFSET+1)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta-background in style-delta% (colour% case)", POFFSET+1, POFFSET+1, n, p, 1));
    x0 = WITH_VAR_STACK(objscheme_unbundle_wxColour(p[POFFSET+0], "set-delta-background in style-delta% (colour% case)", 0));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDeltaBackground(x0));

    
    
    READY_TO_PRE_RETURN;
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *os_wxStyleDeltaSetDeltaFace(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r;
  objscheme_check_valid(os_wxStyleDelta_class, "set-delta-face in style-delta%", n, p);
  string x0 INIT_NULLED_OUT;
  int x1;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-delta-face in style-delta%"));
  if (n > (POFFSET+1)) {
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[POFFSET+1], "set-delta-face in style-delta%"));
  } else
    x1 = wxDEFAULT;

  
  r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDeltaFace(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *os_wxStyleDeltaSetDelta(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  REMEMBER_VAR_STACK();
  class wxStyleDelta* r INIT_NULLED_OUT;
  objscheme_check_valid(os_wxStyleDelta_class, "set-delta in style-delta%", n, p);
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeFam(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (family case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeFam(p[POFFSET+0], "set-delta in style-delta% (family case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[POFFSET+1], "set-delta in style-delta% (family case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeStyle(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (style case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeStyle(p[POFFSET+0], "set-delta in style-delta% (style case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_style(p[POFFSET+1], "set-delta in style-delta% (style case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeWeight(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (weight case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeWeight(p[POFFSET+0], "set-delta in style-delta% (weight case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_weight(p[POFFSET+1], "set-delta in style-delta% (weight case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSmoothing(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (smoothing case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSmoothing(p[POFFSET+0], "set-delta in style-delta% (smoothing case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_smoothing(p[POFFSET+1], "set-delta in style-delta% (smoothing case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeUnderline(p[POFFSET+0], NULL))) {
    int x0;
    Bool x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (underline case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeUnderline(p[POFFSET+0], "set-delta in style-delta% (underline case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "set-delta in style-delta% (underline case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSizeInPixels(p[POFFSET+0], NULL))) {
    int x0;
    Bool x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (size in pixels case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSizeInPixels(p[POFFSET+0], "set-delta in style-delta% (size in pixels case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "set-delta in style-delta% (size in pixels case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSize(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (size case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSize(p[POFFSET+0], "set-delta in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+1], 0, 255, "set-delta in style-delta% (size case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeAlign(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (size case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeAlign(p[POFFSET+0], "set-delta in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_align(p[POFFSET+1], "set-delta in style-delta% (size case)"));

    
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  } else  {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, r);

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("set-delta in style-delta% (no change argument case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(unbundle_symset_changeNoArg(p[POFFSET+0], "set-delta in style-delta% (no change argument case)"));
    } else
      x0 = wxCHANGE_NOTHING;

    x1 = 0;
    r = WITH_VAR_STACK(((wxStyleDelta *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0, x1));

    
    
    READY_TO_PRE_RETURN;
  }

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleDelta(r));
}

static Scheme_Object *objscheme_wxStyleDelta_Getfamily(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-family in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-family in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::family;
  else
    v = ((wxStyleDelta *)cobj->primdata)->family;

  return WITH_REMEMBERED_STACK(bundle_symset_family(v));
}

static Scheme_Object *objscheme_wxStyleDelta_Setfamily(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-family in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-family in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_family(p[POFFSET], "set-family in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->family = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_Getface(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  nstring v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-face in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-face in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::face;
  else
    v = ((wxStyleDelta *)cobj->primdata)->face;

  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)v));
}

static Scheme_Object *objscheme_wxStyleDelta_Setface(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  nstring v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-face in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-face in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET], "set-face in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->face = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsizeMult(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  double v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-size-mult in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-size-mult in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sizeMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sizeMult;

  return WITH_REMEMBERED_STACK(scheme_make_double(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetsizeMult(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  double v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-size-mult in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-size-mult in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_double(p[POFFSET], "set-size-mult in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sizeMult = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsizeAdd(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-size-add in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-size-add in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sizeAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sizeAdd;

  return scheme_make_integer(v);
}

static Scheme_Object *objscheme_wxStyleDelta_SetsizeAdd(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-size-add in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-size-add in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET], 0, 255, "set-size-add in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sizeAdd = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetweightOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-weight-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-weight-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::weightOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->weightOn;

  return WITH_REMEMBERED_STACK(bundle_symset_weight(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetweightOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-weight-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-weight-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_weight(p[POFFSET], "set-weight-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->weightOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetweightOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-weight-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-weight-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::weightOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->weightOff;

  return WITH_REMEMBERED_STACK(bundle_symset_weight(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetweightOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-weight-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-weight-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_weight(p[POFFSET], "set-weight-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->weightOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsmoothingOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-smoothing-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-smoothing-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::smoothingOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->smoothingOn;

  return WITH_REMEMBERED_STACK(bundle_symset_smoothing(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetsmoothingOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-smoothing-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-smoothing-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_smoothing(p[POFFSET], "set-smoothing-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->smoothingOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsmoothingOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-smoothing-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-smoothing-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::smoothingOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->smoothingOff;

  return WITH_REMEMBERED_STACK(bundle_symset_smoothing(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetsmoothingOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-smoothing-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-smoothing-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_smoothing(p[POFFSET], "set-smoothing-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->smoothingOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetstyleOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-style-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-style-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::styleOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->styleOn;

  return WITH_REMEMBERED_STACK(bundle_symset_style(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetstyleOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-style-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-style-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_style(p[POFFSET], "set-style-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->styleOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetstyleOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-style-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-style-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::styleOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->styleOff;

  return WITH_REMEMBERED_STACK(bundle_symset_style(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetstyleOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-style-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-style-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_style(p[POFFSET], "set-style-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->styleOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetunderlinedOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-underlined-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-underlined-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::underlinedOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->underlinedOn;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SetunderlinedOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-underlined-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-underlined-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-underlined-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->underlinedOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetunderlinedOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-underlined-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-underlined-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::underlinedOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->underlinedOff;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SetunderlinedOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-underlined-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-underlined-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-underlined-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->underlinedOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsipOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-size-in-pixels-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-size-in-pixels-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sipOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sipOn;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SetsipOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-size-in-pixels-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-size-in-pixels-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-size-in-pixels-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sipOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetsipOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-size-in-pixels-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-size-in-pixels-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::sipOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->sipOff;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SetsipOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-size-in-pixels-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-size-in-pixels-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-size-in-pixels-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->sipOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GettransparentTextBackingOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-transparent-text-backing-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-transparent-text-backing-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::transparentTextBackingOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOn;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SettransparentTextBackingOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-transparent-text-backing-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-transparent-text-backing-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-transparent-text-backing-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GettransparentTextBackingOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  Bool v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-transparent-text-backing-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-transparent-text-backing-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::transparentTextBackingOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOff;

  return (v ? scheme_true : scheme_false);
}

static Scheme_Object *objscheme_wxStyleDelta_SettransparentTextBackingOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  Bool v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-transparent-text-backing-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-transparent-text-backing-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET], "set-transparent-text-backing-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->transparentTextBackingOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetforegroundMult(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxMultColour* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-foreground-mult in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-foreground-mult in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::foregroundMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->foregroundMult;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMultColour(v));
}

static Scheme_Object *objscheme_wxStyleDelta_GetbackgroundMult(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxMultColour* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-background-mult in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-background-mult in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::backgroundMult;
  else
    v = ((wxStyleDelta *)cobj->primdata)->backgroundMult;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxMultColour(v));
}

static Scheme_Object *objscheme_wxStyleDelta_GetforegroundAdd(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxAddColour* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-foreground-add in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-foreground-add in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::foregroundAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->foregroundAdd;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxAddColour(v));
}

static Scheme_Object *objscheme_wxStyleDelta_GetbackgroundAdd(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  class wxAddColour* v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-background-add in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-background-add in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::backgroundAdd;
  else
    v = ((wxStyleDelta *)cobj->primdata)->backgroundAdd;

  return WITH_REMEMBERED_STACK(objscheme_bundle_wxAddColour(v));
}

static Scheme_Object *objscheme_wxStyleDelta_GetalignmentOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-alignment-on in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-alignment-on in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::alignmentOn;
  else
    v = ((wxStyleDelta *)cobj->primdata)->alignmentOn;

  return WITH_REMEMBERED_STACK(bundle_symset_align(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetalignmentOn(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-alignment-on in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-alignment-on in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_align(p[POFFSET], "set-alignment-on in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->alignmentOn = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *objscheme_wxStyleDelta_GetalignmentOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj INIT_NULLED_OUT;
  int v;
  REMEMBER_VAR_STACK();

  objscheme_check_valid(os_wxStyleDelta_class, "get-alignment-off in style-delta%", n, p);
  if (n > POFFSET) WITH_REMEMBERED_STACK(scheme_wrong_count_m("get-alignment-off in style-delta%", POFFSET, POFFSET, n, p, 1));
  cobj = (Scheme_Class_Object *)p[0];
  if (cobj->primflag)
    v = ((os_wxStyleDelta *)cobj->primdata)->wxStyleDelta::alignmentOff;
  else
    v = ((wxStyleDelta *)cobj->primdata)->alignmentOff;

  return WITH_REMEMBERED_STACK(bundle_symset_align(v));
}

static Scheme_Object *objscheme_wxStyleDelta_SetalignmentOff(int n,  Scheme_Object *p[])
{
  Scheme_Class_Object *cobj = (Scheme_Class_Object *)p[0];
  int v;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, cobj);

  WITH_VAR_STACK(objscheme_check_valid(os_wxStyleDelta_class, "set-alignment-off in style-delta%", n, p));
  if (n != (POFFSET+1)) WITH_VAR_STACK(scheme_wrong_count_m("set-alignment-off in style-delta%", POFFSET+1, POFFSET+1, n, p, 1));

  v = WITH_VAR_STACK(unbundle_symset_align(p[POFFSET], "set-alignment-off in style-delta%"));
  ((wxStyleDelta *)cobj->primdata)->alignmentOff = v;

  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleDelta_ConstructScheme(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxStyleDelta *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();
  if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeAlign(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (size case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeAlign(p[POFFSET+0], "initialization in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_align(p[POFFSET+1], "initialization in style-delta% (size case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSize(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (size case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSize(p[POFFSET+0], "initialization in style-delta% (size case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_integer_in(p[POFFSET+1], 0, 255, "initialization in style-delta% (size case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSizeInPixels(p[POFFSET+0], NULL))) {
    int x0;
    Bool x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (size in pixels case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSizeInPixels(p[POFFSET+0], "initialization in style-delta% (size in pixels case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "initialization in style-delta% (size in pixels case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeUnderline(p[POFFSET+0], NULL))) {
    int x0;
    Bool x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (underline case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeUnderline(p[POFFSET+0], "initialization in style-delta% (underline case)"));
    x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "initialization in style-delta% (underline case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeSmoothing(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (smoothing case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeSmoothing(p[POFFSET+0], "initialization in style-delta% (smoothing case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_smoothing(p[POFFSET+1], "initialization in style-delta% (smoothing case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeWeight(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (weight case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeWeight(p[POFFSET+0], "initialization in style-delta% (weight case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_weight(p[POFFSET+1], "initialization in style-delta% (weight case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeStyle(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (style case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeStyle(p[POFFSET+0], "initialization in style-delta% (style case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_style(p[POFFSET+1], "initialization in style-delta% (style case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(istype_symset_changeFam(p[POFFSET+0], NULL))) {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if (n != (POFFSET+2)) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (family case)", POFFSET+2, POFFSET+2, n, p, 1));
    x0 = WITH_VAR_STACK(unbundle_symset_changeFam(p[POFFSET+0], "initialization in style-delta% (family case)"));
    x1 = WITH_VAR_STACK(unbundle_symset_family(p[POFFSET+1], "initialization in style-delta% (family case)"));

    
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  } else  {
    int x0;
    int x1;

    SETUP_VAR_STACK_PRE_REMEMBERED(2);
    VAR_STACK_PUSH(0, p);
    VAR_STACK_PUSH(1, realobj);

    
    if ((n > (POFFSET+1))) 
      WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-delta% (no change argument case)", POFFSET+POFFSET, POFFSET+1, n, p, 1));
    if (n > (POFFSET+0)) {
      x0 = WITH_VAR_STACK(unbundle_symset_changeNoArg(p[POFFSET+0], "initialization in style-delta% (no change argument case)"));
    } else
      x0 = wxCHANGE_NOTHING;

    x1 = 0;
    realobj = WITH_VAR_STACK(new os_wxStyleDelta CONSTRUCTOR_ARGS((x0, x1)));
#ifdef MZ_PRECISE_GC
    WITH_VAR_STACK(realobj->gcInit_wxStyleDelta(x0, x1));
#endif
    realobj->__gc_external = (void *)p[0];
    
    
    READY_TO_PRE_RETURN;
  }

  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxStyleDelta(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxStyleDelta_class);

  os_wxStyleDelta_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style-delta%", "object%", (Scheme_Method_Prim *)os_wxStyleDelta_ConstructScheme, 47));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "copy" " method", (Scheme_Method_Prim *)os_wxStyleDeltaCopy, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "collapse" " method", (Scheme_Method_Prim *)os_wxStyleDeltaCollapse, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "equal?" " method", (Scheme_Method_Prim *)os_wxStyleDeltaEqual, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-foreground" " method", (Scheme_Method_Prim *)os_wxStyleDeltaSetDeltaForeground, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-background" " method", (Scheme_Method_Prim *)os_wxStyleDeltaSetDeltaBackground, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta-face" " method", (Scheme_Method_Prim *)os_wxStyleDeltaSetDeltaFace, 1, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class, "set-delta" " method", (Scheme_Method_Prim *)os_wxStyleDeltaSetDelta, 0, 2));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-family" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_Getfamily, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-family" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_Setfamily, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-face" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_Getface, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-face" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_Setface, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-mult" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsizeMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-mult" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsizeMult, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-add" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsizeAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-add" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsizeAdd, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-weight-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetweightOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-weight-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetweightOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-weight-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetweightOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-weight-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetweightOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-smoothing-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsmoothingOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-smoothing-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsmoothingOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-smoothing-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsmoothingOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-smoothing-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsmoothingOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-style-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetstyleOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-style-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetstyleOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-style-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetstyleOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-style-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetstyleOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-underlined-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetunderlinedOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-underlined-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetunderlinedOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-underlined-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetunderlinedOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-underlined-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetunderlinedOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-in-pixels-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsipOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-in-pixels-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsipOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-size-in-pixels-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetsipOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-size-in-pixels-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetsipOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-transparent-text-backing-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GettransparentTextBackingOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-transparent-text-backing-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SettransparentTextBackingOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-transparent-text-backing-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GettransparentTextBackingOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-transparent-text-backing-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SettransparentTextBackingOff, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-foreground-mult" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetforegroundMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-background-mult" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetbackgroundMult, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-foreground-add" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetforegroundAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-background-add" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetbackgroundAdd, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-alignment-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetalignmentOn, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-alignment-on" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetalignmentOn, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"get-alignment-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_GetalignmentOff, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleDelta_class,"set-alignment-off" " method", (Scheme_Method_Prim *)objscheme_wxStyleDelta_SetalignmentOff, 1, 1));

  WITH_VAR_STACK(scheme_made_class(os_wxStyleDelta_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyleDelta, wxTYPE_STYLE_DELTA));

  READY_TO_RETURN;
}

int objscheme_istype_wxStyleDelta(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxStyleDelta_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style-delta% object or " XC_NULL_STR: "style-delta% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyleDelta(class wxStyleDelta *realobj)
{
  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 ((realobj->__type != wxTYPE_STYLE_DELTA) && (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_wxStyleDelta_class));

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

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

class wxStyleDelta *objscheme_unbundle_wxStyleDelta(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyleDelta(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_wxStyleDelta *)o->primdata;
  else
    return (wxStyleDelta *)o->primdata;
}












class os_wxStyle : public wxStyle {
 public:

  ~os_wxStyle();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxStyle::gcMark() {
  wxStyle::gcMark();
}
void os_wxStyle::gcFixup() {
  wxStyle::gcFixup();
}
#endif

static Scheme_Object *os_wxStyle_class;
static Scheme_Object *os_wxStyle_interface;

os_wxStyle::~os_wxStyle()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxStyleSwitchTo(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyle_class, "switch-to in style<%>", n, p);
  class wxDC* x0 INIT_NULLED_OUT;
  class wxStyle* 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_wxDC(p[POFFSET+0], "switch-to in style<%>", 0));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+1], "switch-to in style<%>", 1));

  if (x0 && !x0->Ok()) WITH_VAR_STACK(scheme_arg_mismatch(METHODNAME("style%","switch-to"), "bad device context: ", p[POFFSET+0]));
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->SwitchTo(x0, x1));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleSetShiftStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyle_class, "set-shift-style in style<%>", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "set-shift-style in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->SetShiftStyle(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleGetShiftStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyle_class, "get-shift-style in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetShiftStyle());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleIsJoin(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyle_class, "is-join? in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->IsJoin());

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

static Scheme_Object *os_wxStyleSetDelta(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyle_class, "set-delta in style<%>", n, p);
  class wxStyleDelta* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "set-delta in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->SetDelta(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleGetDelta(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyle_class, "get-delta in style<%>", n, p);
  class wxStyleDelta* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+0], "get-delta in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetDelta(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleSetBaseStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyle_class, "set-base-style in style<%>", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "set-base-style in style<%>", 0));

  
  WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->SetBaseStyle(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleGetBaseStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyle_class, "get-base-style in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetBaseStyle());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleGetTextWidth(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxStyle_class, "get-text-width in style<%>", n, p);
  class wxDC* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-text-width in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetTextWidth(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxStyleGetTextSpace(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxStyle_class, "get-text-space in style<%>", n, p);
  class wxDC* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-text-space in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetTextSpace(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxStyleGetTextDescent(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxStyle_class, "get-text-descent in style<%>", n, p);
  class wxDC* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-text-descent in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetTextDescent(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxStyleGetTextHeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  double r;
  objscheme_check_valid(os_wxStyle_class, "get-text-height in style<%>", n, p);
  class wxDC* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxDC(p[POFFSET+0], "get-text-height in style<%>", 0));

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetTextHeight(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(scheme_make_double(r));
}

static Scheme_Object *os_wxStyleGetTransparentTextBacking(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyle_class, "get-transparent-text-backing in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetTransparentTextBacking());

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

static Scheme_Object *os_wxStyleGetAlignment(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-alignment in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetAlignment());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_align(r));
}

static Scheme_Object *os_wxStyleGetBackground(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxColour* r;
  objscheme_check_valid(os_wxStyle_class, "get-background in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetBackground());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxColour(r));
}

static Scheme_Object *os_wxStyleGetForeground(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxColour* r;
  objscheme_check_valid(os_wxStyle_class, "get-foreground in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetForeground());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxColour(r));
}

static Scheme_Object *os_wxStyleGetFont(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxFont* r;
  objscheme_check_valid(os_wxStyle_class, "get-font in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetFont());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxFont(r));
}

static Scheme_Object *os_wxStyleGetSizeInPixels(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyle_class, "get-size-in-pixels in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetSizeInPixels());

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

static Scheme_Object *os_wxStyleGetUnderlined(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  Bool r;
  objscheme_check_valid(os_wxStyle_class, "get-underlined in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetUnderlined());

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

static Scheme_Object *os_wxStyleGetSmoothing(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-smoothing in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetSmoothing());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_smoothing(r));
}

static Scheme_Object *os_wxStyleGetStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-style in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetStyle());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_style(r));
}

static Scheme_Object *os_wxStyleGetWeight(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-weight in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetWeight());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_weight(r));
}

static Scheme_Object *os_wxStyleGetSize(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-size in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetSize());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxStyleGetFace(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  nstring r;
  objscheme_check_valid(os_wxStyle_class, "get-face in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetFace());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

static Scheme_Object *os_wxStyleGetFamily(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyle_class, "get-family in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetFamily());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(bundle_symset_family(r));
}

static Scheme_Object *os_wxStyleGetName(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  string r;
  objscheme_check_valid(os_wxStyle_class, "get-name in style<%>", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyle *)((Scheme_Class_Object *)p[0])->primdata)->GetName());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_string((char *)r));
}

void objscheme_setup_wxStyle(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxStyle_class);
  wxREGGLOB(os_wxStyle_interface);

  os_wxStyle_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style%", "object%", NULL, 26));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "switch-to" " method", (Scheme_Method_Prim *)os_wxStyleSwitchTo, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-shift-style" " method", (Scheme_Method_Prim *)os_wxStyleSetShiftStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-shift-style" " method", (Scheme_Method_Prim *)os_wxStyleGetShiftStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "is-join?" " method", (Scheme_Method_Prim *)os_wxStyleIsJoin, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-delta" " method", (Scheme_Method_Prim *)os_wxStyleSetDelta, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-delta" " method", (Scheme_Method_Prim *)os_wxStyleGetDelta, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "set-base-style" " method", (Scheme_Method_Prim *)os_wxStyleSetBaseStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-base-style" " method", (Scheme_Method_Prim *)os_wxStyleGetBaseStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-width" " method", (Scheme_Method_Prim *)os_wxStyleGetTextWidth, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-space" " method", (Scheme_Method_Prim *)os_wxStyleGetTextSpace, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-descent" " method", (Scheme_Method_Prim *)os_wxStyleGetTextDescent, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-text-height" " method", (Scheme_Method_Prim *)os_wxStyleGetTextHeight, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-transparent-text-backing" " method", (Scheme_Method_Prim *)os_wxStyleGetTransparentTextBacking, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-alignment" " method", (Scheme_Method_Prim *)os_wxStyleGetAlignment, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-background" " method", (Scheme_Method_Prim *)os_wxStyleGetBackground, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-foreground" " method", (Scheme_Method_Prim *)os_wxStyleGetForeground, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-font" " method", (Scheme_Method_Prim *)os_wxStyleGetFont, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-size-in-pixels" " method", (Scheme_Method_Prim *)os_wxStyleGetSizeInPixels, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-underlined" " method", (Scheme_Method_Prim *)os_wxStyleGetUnderlined, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-smoothing" " method", (Scheme_Method_Prim *)os_wxStyleGetSmoothing, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-style" " method", (Scheme_Method_Prim *)os_wxStyleGetStyle, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-weight" " method", (Scheme_Method_Prim *)os_wxStyleGetWeight, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-size" " method", (Scheme_Method_Prim *)os_wxStyleGetSize, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-face" " method", (Scheme_Method_Prim *)os_wxStyleGetFace, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-family" " method", (Scheme_Method_Prim *)os_wxStyleGetFamily, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyle_class, "get-name" " method", (Scheme_Method_Prim *)os_wxStyleGetName, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxStyle_class));

  os_wxStyle_interface = WITH_VAR_STACK(scheme_class_to_interface(os_wxStyle_class, "style" "<%>"));

  WITH_VAR_STACK(objscheme_add_global_interface(os_wxStyle_interface, "style" "<%>", env));
  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyle, wxTYPE_STYLE));

  READY_TO_RETURN;
}

int objscheme_istype_wxStyle(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxStyle_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style% object or " XC_NULL_STR: "style% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyle(class wxStyle *realobj)
{
  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 ((realobj->__type != wxTYPE_STYLE) && (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_wxStyle_class));

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

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

class wxStyle *objscheme_unbundle_wxStyle(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyle(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_wxStyle *)o->primdata;
  else
    return (wxStyle *)o->primdata;
}






// @ "clear" : void Clear();
// @ "copy" : void Copy(wxStyleList!);







static void NotifyCallbackToScheme(wxStyle *, Scheme_Object *f);




class os_wxStyleList : public wxStyleList {
 public:

  os_wxStyleList CONSTRUCTOR_ARGS(());
  ~os_wxStyleList();
#ifdef MZ_PRECISE_GC
  void gcMark();
  void gcFixup();
#endif
};

#ifdef MZ_PRECISE_GC
void os_wxStyleList::gcMark() {
  wxStyleList::gcMark();
}
void os_wxStyleList::gcFixup() {
  wxStyleList::gcFixup();
}
#endif

static Scheme_Object *os_wxStyleList_class;

os_wxStyleList::os_wxStyleList CONSTRUCTOR_ARGS(())
CONSTRUCTOR_INIT(: wxStyleList())
{
}

os_wxStyleList::~os_wxStyleList()
{
    objscheme_destroy(this, (Scheme_Object *) __gc_external);
}

static Scheme_Object *os_wxStyleListForgetNotification(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  objscheme_check_valid(os_wxStyleList_class, "forget-notification in style-list%", n, p);
  void* x0 INIT_NULLED_OUT;

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

  
  x0 = ((void *)p[POFFSET+0]);

  
  WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->ForgetNotification(x0));

  
  
  READY_TO_RETURN;
  return scheme_void;
}

static Scheme_Object *os_wxStyleListNotifyOnChange(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  void* r;
  objscheme_check_valid(os_wxStyleList_class, "notify-on-change in style-list%", n, p);
  wxStyleNotifyFunc x0;
  void* x1 INIT_NULLED_OUT;

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

  
  x0 = (wxStyleNotifyFunc)NotifyCallbackToScheme;
  x1 = (scheme_check_proc_arity(METHODNAME("style-list%","notify-on-change"), 1, POFFSET, 0, p), p[POFFSET]);

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->NotifyOnChange(x0, x1));

  
  
  READY_TO_RETURN;
  return ((Scheme_Object *)r);
}

static Scheme_Object *os_wxStyleListStyleToIndex(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyleList_class, "style-to-index in style-list%", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "style-to-index in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->StyleToIndex(x0));

  
  
  READY_TO_RETURN;
  return ((r < 0) ? scheme_false : scheme_make_integer(r));
}

static Scheme_Object *os_wxStyleListIndexToStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "index-to-style in style-list%", n, p);
  nnint x0;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_nonnegative_integer(p[POFFSET+0], "index-to-style in style-list%"));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->IndexToStyle(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListConvert(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "convert in style-list%", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;

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

  
  x0 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+0], "convert in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->Convert(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListReplaceNamedStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "replace-named-style in style-list%", n, p);
  string x0 INIT_NULLED_OUT;
  class wxStyle* 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 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "replace-named-style in style-list%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+1], "replace-named-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->ReplaceNamedStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListNewNamedStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "new-named-style in style-list%", n, p);
  string x0 INIT_NULLED_OUT;
  class wxStyle* 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 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "new-named-style in style-list%"));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+1], "new-named-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->NewNamedStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListFindNamedStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "find-named-style in style-list%", n, p);
  string x0 INIT_NULLED_OUT;

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

  
  x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "find-named-style in style-list%"));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->FindNamedStyle(x0));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListFindOrCreateJoinStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "find-or-create-join-style in style-list%", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;
  class wxStyle* 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_wxStyle(p[POFFSET+0], "find-or-create-join-style in style-list%", 1));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyle(p[POFFSET+1], "find-or-create-join-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->FindOrCreateJoinStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListFindOrCreateStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "find-or-create-style in style-list%", n, p);
  class wxStyle* x0 INIT_NULLED_OUT;
  class wxStyleDelta* 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_wxStyle(p[POFFSET+0], "find-or-create-style in style-list%", 1));
  x1 = WITH_VAR_STACK(objscheme_unbundle_wxStyleDelta(p[POFFSET+1], "find-or-create-style in style-list%", 0));

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->FindOrCreateStyle(x0, x1));

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleListNumber(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  int r;
  objscheme_check_valid(os_wxStyleList_class, "number in style-list%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->Number());

  
  
  READY_TO_RETURN;
  return scheme_make_integer(r);
}

static Scheme_Object *os_wxStyleListBasicStyle(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyle* r;
  objscheme_check_valid(os_wxStyleList_class, "basic-style in style-list%", n, p);

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

  

  
  r = WITH_VAR_STACK(((wxStyleList *)((Scheme_Class_Object *)p[0])->primdata)->BasicStyle());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyle(r));
}

static Scheme_Object *os_wxStyleList_ConstructScheme(int n,  Scheme_Object *p[])
{
  SETUP_PRE_VAR_STACK(1);
  PRE_VAR_STACK_PUSH(0, p);
  os_wxStyleList *realobj INIT_NULLED_OUT;
  REMEMBER_VAR_STACK();

  SETUP_VAR_STACK_PRE_REMEMBERED(2);
  VAR_STACK_PUSH(0, p);
  VAR_STACK_PUSH(1, realobj);

  
  if (n != (POFFSET+0)) 
    WITH_VAR_STACK(scheme_wrong_count_m("initialization in style-list%", POFFSET+0, POFFSET+0, n, p, 1));

  
  realobj = WITH_VAR_STACK(new os_wxStyleList CONSTRUCTOR_ARGS(()));
#ifdef MZ_PRECISE_GC
  WITH_VAR_STACK(realobj->gcInit_wxStyleList());
#endif
  realobj->__gc_external = (void *)p[0];
  
  
  READY_TO_RETURN;
  ((Scheme_Class_Object *)p[0])->primdata = realobj;
  ((Scheme_Class_Object *)p[0])->primflag = 1;
  return scheme_void;
}

void objscheme_setup_wxStyleList(Scheme_Env *env)
{
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);

  wxREGGLOB(os_wxStyleList_class);

  os_wxStyleList_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "style-list%", "object%", (Scheme_Method_Prim *)os_wxStyleList_ConstructScheme, 12));

  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "forget-notification" " method", (Scheme_Method_Prim *)os_wxStyleListForgetNotification, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "notify-on-change" " method", (Scheme_Method_Prim *)os_wxStyleListNotifyOnChange, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "style-to-index" " method", (Scheme_Method_Prim *)os_wxStyleListStyleToIndex, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "index-to-style" " method", (Scheme_Method_Prim *)os_wxStyleListIndexToStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "convert" " method", (Scheme_Method_Prim *)os_wxStyleListConvert, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "replace-named-style" " method", (Scheme_Method_Prim *)os_wxStyleListReplaceNamedStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "new-named-style" " method", (Scheme_Method_Prim *)os_wxStyleListNewNamedStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-named-style" " method", (Scheme_Method_Prim *)os_wxStyleListFindNamedStyle, 1, 1));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-or-create-join-style" " method", (Scheme_Method_Prim *)os_wxStyleListFindOrCreateJoinStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "find-or-create-style" " method", (Scheme_Method_Prim *)os_wxStyleListFindOrCreateStyle, 2, 2));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "number" " method", (Scheme_Method_Prim *)os_wxStyleListNumber, 0, 0));
  WITH_VAR_STACK(scheme_add_method_w_arity(os_wxStyleList_class, "basic-style" " method", (Scheme_Method_Prim *)os_wxStyleListBasicStyle, 0, 0));


  WITH_VAR_STACK(scheme_made_class(os_wxStyleList_class));

  WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxStyleList, wxTYPE_STYLE_LIST));

  READY_TO_RETURN;
}

int objscheme_istype_wxStyleList(Scheme_Object *obj, const char *stop, int nullOK)
{
  REMEMBER_VAR_STACK();
  if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
  if (objscheme_is_a(obj,  os_wxStyleList_class))
    return 1;
  else {
    if (!stop)
       return 0;
    WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "style-list% object or " XC_NULL_STR: "style-list% object", -1, 0, &obj));
    return 0;
  }
}

Scheme_Object *objscheme_bundle_wxStyleList(class wxStyleList *realobj)
{
  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 ((realobj->__type != wxTYPE_STYLE_LIST) && (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_wxStyleList_class));

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

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

class wxStyleList *objscheme_unbundle_wxStyleList(Scheme_Object *obj, const char *where, int nullOK)
{
  if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;

  REMEMBER_VAR_STACK();

  (void)objscheme_istype_wxStyleList(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_wxStyleList *)o->primdata;
  else
    return (wxStyleList *)o->primdata;
}


static void NotifyCallbackToScheme(wxStyle *s, Scheme_Object *f)
{
  Scheme_Object *p[1];
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, f);

  p[0] = NULL;

  p[0] = s ? WITH_VAR_STACK(objscheme_bundle_wxStyle(s)) : scheme_false;

  WITH_VAR_STACK(scheme_apply_multi(f, 1, p));

  READY_TO_RETURN;
}

static wxStyleList* wxGetTheStyleList()
{
  return wxTheStyleList;
}

static Scheme_Object *wxGlobalStyleListwxGetTheStyleList(int n,  Scheme_Object *p[])
{
  WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
  REMEMBER_VAR_STACK();
  class wxStyleList* r;

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

  

  
  r = WITH_VAR_STACK(wxGetTheStyleList());

  
  
  READY_TO_RETURN;
  return WITH_REMEMBERED_STACK(objscheme_bundle_wxStyleList(r));
}

void objscheme_setup_wxGlobalStyleList(Scheme_Env *env)
{
  Scheme_Object *functmp INIT_NULLED_OUT;
  SETUP_VAR_STACK(1);
  VAR_STACK_PUSH(0, env);
  functmp = WITH_VAR_STACK(scheme_make_prim_w_arity((Scheme_Prim *)wxGlobalStyleListwxGetTheStyleList, "get-the-style-list", 0, 0));
  WITH_VAR_STACK(scheme_install_xc_global("get-the-style-list", functmp, env));
  READY_TO_RETURN;
}

