Back to index

plt-scheme  4.2.1
wxs_rado.cxx
Go to the documentation of this file.
00001 /* DO NOT EDIT THIS FILE. */
00002 /* This file was generated by xctocc from "wxs_rado.xc". */
00003 
00004 
00005 #if defined(_MSC_VER)
00006 # include "wx.h"
00007 #endif
00008 #if defined(OS_X)
00009 # include "common.h"
00010 #endif
00011 
00012 #include "wx_rbox.h"
00013 
00014 
00015 
00016 
00017 #ifdef wx_x
00018 # define BM_SELECTED(map) ((map)->selectedTo)
00019 #endif
00020 #if defined(wx_mac) || defined(wx_msw)
00021 # define BM_SELECTED(map) ((map)->selectedInto)
00022 #endif
00023 # define BM_IN_USE(map) ((map)->selectedIntoDC)
00024 
00025 
00026 
00027 
00028 #define ESCAPE_NO_RET_VAL /*empty*/
00029 
00030 
00031 #include "wxscheme.h"
00032 #include "wxs_rado.h"
00033 
00034 #ifdef MZ_PRECISE_GC
00035 START_XFORM_SKIP;
00036 #endif
00037 
00038 static Scheme_Object *radioboxStyle_wxVERTICAL_sym = NULL;
00039 static Scheme_Object *radioboxStyle_wxHORIZONTAL_sym = NULL;
00040 static Scheme_Object *radioboxStyle_wxINVISIBLE_sym = NULL;
00041 static Scheme_Object *radioboxStyle_wxVERTICAL_LABEL_sym = NULL;
00042 static Scheme_Object *radioboxStyle_wxHORIZONTAL_LABEL_sym = NULL;
00043 
00044 static void init_symset_radioboxStyle(void) {
00045   REMEMBER_VAR_STACK();
00046   wxREGGLOB(radioboxStyle_wxVERTICAL_sym);
00047   radioboxStyle_wxVERTICAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("vertical"));
00048   wxREGGLOB(radioboxStyle_wxHORIZONTAL_sym);
00049   radioboxStyle_wxHORIZONTAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("horizontal"));
00050   wxREGGLOB(radioboxStyle_wxINVISIBLE_sym);
00051   radioboxStyle_wxINVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("deleted"));
00052   wxREGGLOB(radioboxStyle_wxVERTICAL_LABEL_sym);
00053   radioboxStyle_wxVERTICAL_LABEL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("vertical-label"));
00054   wxREGGLOB(radioboxStyle_wxHORIZONTAL_LABEL_sym);
00055   radioboxStyle_wxHORIZONTAL_LABEL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("horizontal-label"));
00056 }
00057 
00058 static int unbundle_symset_radioboxStyle(Scheme_Object *v, const char *where) {
00059   SETUP_VAR_STACK(1);
00060   VAR_STACK_PUSH(0, v);
00061   if (!radioboxStyle_wxHORIZONTAL_LABEL_sym) WITH_VAR_STACK(init_symset_radioboxStyle());
00062   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00063   long result = 0;
00064   while (SCHEME_PAIRP(l)) {
00065   i = SCHEME_CAR(l);
00066   if (0) { }
00067   else if (i == radioboxStyle_wxVERTICAL_sym) { result = result | wxVERTICAL; }
00068   else if (i == radioboxStyle_wxHORIZONTAL_sym) { result = result | wxHORIZONTAL; }
00069   else if (i == radioboxStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
00070   else if (i == radioboxStyle_wxVERTICAL_LABEL_sym) { result = result | wxVERTICAL_LABEL; }
00071   else if (i == radioboxStyle_wxHORIZONTAL_LABEL_sym) { result = result | wxHORIZONTAL_LABEL; }
00072   else { break; } 
00073   l = SCHEME_CDR(l);
00074   }
00075   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00076   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "radioboxStyle symbol list", -1, 0, &v));
00077   READY_TO_RETURN;
00078   return 0;
00079 }
00080 
00081 
00082 
00083 
00084 #define CB_FUNCTYPE wxFunction 
00085 
00086 
00087 #undef CALLBACKCLASS
00088 #undef CB_REALCLASS
00089 #undef CB_UNBUNDLE
00090 #undef CB_USER
00091 
00092 #define CALLBACKCLASS os_wxRadioBox
00093 #define CB_REALCLASS wxRadioBox
00094 #define CB_UNBUNDLE objscheme_unbundle_wxRadioBox
00095 #define CB_USER METHODNAME("radio-box%", "initialization")
00096 
00097 #undef CB_TOSCHEME
00098 #undef CB_TOC
00099 #define CB_TOSCHEME wxRadioBoxCallbackToScheme
00100 #define CB_TOC wxRadioBoxCallbackToC
00101 
00102 
00103 class CALLBACKCLASS;
00104 
00105 
00106 
00107 
00108 
00109 extern wxCommandEvent *objscheme_unbundle_wxCommandEvent(Scheme_Object *,const char *,int);
00110 extern Scheme_Object *objscheme_bundle_wxCommandEvent(wxCommandEvent *);
00111 
00112 static void CB_TOSCHEME(CB_REALCLASS *obj, wxCommandEvent *event);
00113 
00114 #include "wxs_bmap.h"
00115 
00116 #undef l_ADDRESS
00117 #undef l_DEREF
00118 #undef l_TEST
00119 #undef l_POINT
00120 #undef l_TYPE
00121 #undef l_LIST_ITEM_BUNDLE
00122 #undef l_LIST_ITEM_UNBUNDLE
00123 #undef l_MAKE_LIST
00124 #undef l_MAKE_ARRAY
00125 #undef l_EXTRA
00126 #undef l_TERMINATE
00127 #undef l_COPY
00128 #undef l_OKTEST
00129 #undef l_INTTYPE
00130 
00131 #define l_ADDRESS 
00132 #define l_DEREF 
00133 #define l_NEWATOMIC (UseGC)
00134 #define l_NULLOK 0
00135 #define l_TEST 
00136 #define l_POINT 
00137 #define l_EXTRA 0
00138 #define l_TERMINATE 
00139 #define l_COPY l_COPYDEST=l_COPYSRC;
00140 #define l_OKTEST 
00141 #define l_INTTYPE int
00142 #define l_DIRECTMALLOC 0
00143 
00144 #define l_TYPE string
00145 #define l_LIST_ITEM_BUNDLE objscheme_bundle_string
00146 #define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_string
00147 #define l_MAKE_LIST __MakestringList
00148 #define l_MAKE_ARRAY __MakestringArray
00149 
00150 
00151 
00152 
00153 
00154 static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
00155 {
00156   Scheme_Object *cdr = scheme_null, *obj = NULL;
00157   SETUP_VAR_STACK(1);
00158   VAR_STACK_PUSH(0, cdr);
00159 
00160   while (c--) {
00161     obj = WITH_VAR_STACK(l_LIST_ITEM_BUNDLE(l_ADDRESS f[c]));
00162     cdr = WITH_VAR_STACK(scheme_make_pair(obj, cdr));
00163   }
00164   
00165   READY_TO_RETURN;
00166 
00167   return cdr;
00168 }
00169 
00170 static l_TYPE l_POINT *l_MAKE_ARRAY(Scheme_Object *l, l_INTTYPE *c, char *who)
00171 {
00172   Scheme_Object *orig_l = l;
00173   int i = 0;
00174   long len;
00175   l_TYPE l_POINT *f = NULL;
00176 
00177   SETUP_VAR_STACK(3);
00178   VAR_STACK_PUSH(0, l);
00179   VAR_STACK_PUSH(1, orig_l);
00180   VAR_STACK_PUSH(2, f);
00181 
00182   len = WITH_VAR_STACK(scheme_proper_list_length(l));
00183   if (len < 0) WITH_VAR_STACK(scheme_wrong_type(who, "proper-list", -1, 0, &l));
00184   if (c) *c = len;
00185 
00186   if (!(len + l_EXTRA)) {
00187     READY_TO_RETURN;
00188     return NULL;
00189   }
00190 
00191 #if l_DIRECTMALLOC
00192   f = (l_TYPE l_POINT *)WITH_VAR_STACK(GC_malloc_atomic(sizeof(l_TYPE l_POINT) * (len + l_EXTRA)));
00193 #else
00194   f = WITH_VAR_STACK(new l_NEWATOMIC l_TYPE l_POINT[len + l_EXTRA]);
00195 #endif
00196 
00197   while (!SCHEME_NULLP(l)) {
00198     if (!SCHEME_LISTP(l)) {
00199       WITH_VAR_STACK(scheme_arg_mismatch(who, "expected a proper list: ", orig_l));
00200       READY_TO_RETURN;
00201       return NULL;
00202     }
00203 
00204 #define l_COPYDEST f[i]
00205 #define l_COPYSRC (l_DEREF WITH_VAR_STACK(l_LIST_ITEM_UNBUNDLE(SCHEME_CAR(l), who l_TEST)))
00206 
00207     l_COPY
00208 
00209     l_OKTEST
00210 
00211     i++;
00212 
00213     l = SCHEME_CDR(l);
00214   }
00215   l_TERMINATE
00216 
00217   READY_TO_RETURN;
00218 
00219   return f;
00220 }
00221 
00222 
00223 #define OKTESTWHERE METHODNAME("radio-box%", "initialization") 
00224 #undef l_ADDRESS
00225 #undef l_DEREF
00226 #undef l_TEST
00227 #undef l_POINT
00228 #undef l_TYPE
00229 #undef l_LIST_ITEM_BUNDLE
00230 #undef l_LIST_ITEM_UNBUNDLE
00231 #undef l_MAKE_LIST
00232 #undef l_MAKE_ARRAY
00233 #undef l_EXTRA
00234 #undef l_TERMINATE
00235 #undef l_COPY
00236 #undef l_OKTEST
00237 #undef l_INTTYPE
00238 
00239 #define l_ADDRESS 
00240 #define l_DEREF 
00241 #define l_NEWATOMIC (UseGC)
00242 #define l_NULLOK 0
00243 #define l_TEST , l_NULLOK
00244 #define l_POINT *
00245 #define l_EXTRA 0
00246 #define l_TERMINATE 
00247 #define l_COPY l_COPYDEST=l_COPYSRC;
00248 #define l_OKTEST { if (!((l_COPYDEST)->Ok())) WITH_VAR_STACK(scheme_arg_mismatch(OKTESTWHERE, "bad bitmap: ", SCHEME_CAR(l))); if (BM_SELECTED(l_COPYDEST)) WITH_VAR_STACK(scheme_arg_mismatch(OKTESTWHERE, "bitmap is currently installed into a bitmap-dc%: ", SCHEME_CAR(l))); }
00249 #define l_INTTYPE int
00250 #define l_DIRECTMALLOC 0
00251 
00252 #define l_TYPE wxBitmap
00253 #define l_LIST_ITEM_BUNDLE objscheme_bundle_wxBitmap
00254 #define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_wxBitmap
00255 #define l_MAKE_LIST __MakewxBitmapList
00256 #define l_MAKE_ARRAY __MakewxBitmapArray
00257 
00258 
00259 
00260 
00261 
00262 static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
00263 {
00264   Scheme_Object *cdr = scheme_null, *obj = NULL;
00265   SETUP_VAR_STACK(1);
00266   VAR_STACK_PUSH(0, cdr);
00267 
00268   while (c--) {
00269     obj = WITH_VAR_STACK(l_LIST_ITEM_BUNDLE(l_ADDRESS f[c]));
00270     cdr = WITH_VAR_STACK(scheme_make_pair(obj, cdr));
00271   }
00272   
00273   READY_TO_RETURN;
00274 
00275   return cdr;
00276 }
00277 
00278 static l_TYPE l_POINT *l_MAKE_ARRAY(Scheme_Object *l, l_INTTYPE *c, char *who)
00279 {
00280   Scheme_Object *orig_l = l;
00281   int i = 0;
00282   long len;
00283   l_TYPE l_POINT *f = NULL;
00284 
00285   SETUP_VAR_STACK(3);
00286   VAR_STACK_PUSH(0, l);
00287   VAR_STACK_PUSH(1, orig_l);
00288   VAR_STACK_PUSH(2, f);
00289 
00290   len = WITH_VAR_STACK(scheme_proper_list_length(l));
00291   if (len < 0) WITH_VAR_STACK(scheme_wrong_type(who, "proper-list", -1, 0, &l));
00292   if (c) *c = len;
00293 
00294   if (!(len + l_EXTRA)) {
00295     READY_TO_RETURN;
00296     return NULL;
00297   }
00298 
00299 #if l_DIRECTMALLOC
00300   f = (l_TYPE l_POINT *)WITH_VAR_STACK(GC_malloc_atomic(sizeof(l_TYPE l_POINT) * (len + l_EXTRA)));
00301 #else
00302   f = WITH_VAR_STACK(new l_NEWATOMIC l_TYPE l_POINT[len + l_EXTRA]);
00303 #endif
00304 
00305   while (!SCHEME_NULLP(l)) {
00306     if (!SCHEME_LISTP(l)) {
00307       WITH_VAR_STACK(scheme_arg_mismatch(who, "expected a proper list: ", orig_l));
00308       READY_TO_RETURN;
00309       return NULL;
00310     }
00311 
00312 #define l_COPYDEST f[i]
00313 #define l_COPYSRC (l_DEREF WITH_VAR_STACK(l_LIST_ITEM_UNBUNDLE(SCHEME_CAR(l), who l_TEST)))
00314 
00315     l_COPY
00316 
00317     l_OKTEST
00318 
00319     i++;
00320 
00321     l = SCHEME_CDR(l);
00322   }
00323   l_TERMINATE
00324 
00325   READY_TO_RETURN;
00326 
00327   return f;
00328 }
00329 
00330 
00331 
00332 
00333 
00334 
00335 
00336 
00337 
00338 
00339 
00340 #define RANGECLASS wxRadioBox
00341 
00342 #define THISOBJECT ((RANGECLASS *)((Scheme_Class_Object *)THEOBJ)->primdata)
00343 
00344 
00345 
00346 
00347 
00348 class os_wxRadioBox : public wxRadioBox {
00349  public:
00350   Scheme_Object *callback_closure;
00351 
00352   os_wxRadioBox CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3 = -1, int x4 = -1, int x5 = -1, int x6 = -1, int x7 = 0, string* x8 = NULL, int x9 = 0, int x10 = wxVERTICAL, class wxFont* x11 = NULL, string x12 = "radioBox"));
00353 #ifndef MZ_PRECISE_GC
00354   os_wxRadioBox CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3, int x4, int x5, int x6, int x7, wxBitmap** x8, int x9 = 0, int x10 = wxVERTICAL, class wxFont* x11 = NULL, string x12 = "radioBox"));
00355 #endif
00356   ~os_wxRadioBox();
00357   void OnDropFile(epathname x0);
00358   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
00359   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
00360   void OnSize(int x0, int x1);
00361   void OnSetFocus();
00362   void OnKillFocus();
00363 #ifdef MZ_PRECISE_GC
00364   void gcMark();
00365   void gcFixup();
00366 #endif
00367 };
00368 
00369 #ifdef MZ_PRECISE_GC
00370 void os_wxRadioBox::gcMark() {
00371   wxRadioBox::gcMark();
00372   gcMARK_TYPED(Scheme_Object *, callback_closure);
00373 }
00374 void os_wxRadioBox::gcFixup() {
00375   wxRadioBox::gcFixup();
00376   gcFIXUP_TYPED(Scheme_Object *, callback_closure);
00377 }
00378 #endif
00379 
00380 static Scheme_Object *os_wxRadioBox_class;
00381 
00382 os_wxRadioBox::os_wxRadioBox CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3, int x4, int x5, int x6, int x7, string* x8, int x9, int x10, class wxFont* x11, string x12))
00383 CONSTRUCTOR_INIT(: wxRadioBox(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12))
00384 {
00385 }
00386 
00387 #ifndef MZ_PRECISE_GC
00388 os_wxRadioBox::os_wxRadioBox CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3, int x4, int x5, int x6, int x7, wxBitmap** x8, int x9, int x10, class wxFont* x11, string x12))
00389 CONSTRUCTOR_INIT(: wxRadioBox(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12))
00390 {
00391 }
00392 #endif
00393 
00394 os_wxRadioBox::~os_wxRadioBox()
00395 {
00396     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00397 }
00398 
00399 static Scheme_Object *os_wxRadioBoxOnDropFile(int n, Scheme_Object *p[]);
00400 
00401 void os_wxRadioBox::OnDropFile(epathname x0)
00402 {
00403   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00404   Scheme_Object *v;
00405   Scheme_Object *method INIT_NULLED_OUT;
00406 #ifdef MZ_PRECISE_GC
00407   os_wxRadioBox *sElF = this;
00408 #endif
00409   static void *mcache = 0;
00410 
00411   SETUP_VAR_STACK(6);
00412   VAR_STACK_PUSH(0, method);
00413   VAR_STACK_PUSH(1, sElF);
00414   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00415   VAR_STACK_PUSH(5, x0);
00416   SET_VAR_STACK();
00417 
00418   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "on-drop-file", &mcache);
00419   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxOnDropFile)) {
00420     SET_VAR_STACK();
00421     READY_TO_RETURN; ASSELF wxRadioBox::OnDropFile(x0);
00422   } else {
00423   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00424   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
00425   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00426   p[0] = (Scheme_Object *) ASSELF __gc_external;
00427 
00428   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00429   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00430   
00431      READY_TO_RETURN;
00432   }
00433 }
00434 
00435 static Scheme_Object *os_wxRadioBoxPreOnEvent(int n, Scheme_Object *p[]);
00436 
00437 Bool os_wxRadioBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
00438 {
00439   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00440   Scheme_Object *v;
00441   Scheme_Object *method INIT_NULLED_OUT;
00442 #ifdef MZ_PRECISE_GC
00443   os_wxRadioBox *sElF = this;
00444 #endif
00445   static void *mcache = 0;
00446 
00447   SETUP_VAR_STACK(7);
00448   VAR_STACK_PUSH(0, method);
00449   VAR_STACK_PUSH(1, sElF);
00450   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00451   VAR_STACK_PUSH(5, x0);
00452   VAR_STACK_PUSH(6, x1);
00453   SET_VAR_STACK();
00454 
00455   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "pre-on-event", &mcache);
00456   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxPreOnEvent)) {
00457     SET_VAR_STACK();
00458     return FALSE;
00459   } else {
00460   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00461   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00462   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
00463   ESCAPE_BLOCK(1)
00464   p[0] = (Scheme_Object *) ASSELF __gc_external;
00465 
00466   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00467   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00468   
00469   {
00470      Bool resval;
00471      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in radio-box%"", extracting return value"));
00472      READY_TO_RETURN;
00473      return resval;
00474   }
00475   }
00476 }
00477 
00478 static Scheme_Object *os_wxRadioBoxPreOnChar(int n, Scheme_Object *p[]);
00479 
00480 Bool os_wxRadioBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
00481 {
00482   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00483   Scheme_Object *v;
00484   Scheme_Object *method INIT_NULLED_OUT;
00485 #ifdef MZ_PRECISE_GC
00486   os_wxRadioBox *sElF = this;
00487 #endif
00488   static void *mcache = 0;
00489 
00490   SETUP_VAR_STACK(7);
00491   VAR_STACK_PUSH(0, method);
00492   VAR_STACK_PUSH(1, sElF);
00493   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00494   VAR_STACK_PUSH(5, x0);
00495   VAR_STACK_PUSH(6, x1);
00496   SET_VAR_STACK();
00497 
00498   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "pre-on-char", &mcache);
00499   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxPreOnChar)) {
00500     SET_VAR_STACK();
00501     return FALSE;
00502   } else {
00503   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00504   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00505   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
00506   ESCAPE_BLOCK(1)
00507   p[0] = (Scheme_Object *) ASSELF __gc_external;
00508 
00509   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00510   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00511   
00512   {
00513      Bool resval;
00514      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in radio-box%"", extracting return value"));
00515      READY_TO_RETURN;
00516      return resval;
00517   }
00518   }
00519 }
00520 
00521 static Scheme_Object *os_wxRadioBoxOnSize(int n, Scheme_Object *p[]);
00522 
00523 void os_wxRadioBox::OnSize(int x0, int x1)
00524 {
00525   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00526   Scheme_Object *v;
00527   Scheme_Object *method INIT_NULLED_OUT;
00528 #ifdef MZ_PRECISE_GC
00529   os_wxRadioBox *sElF = this;
00530 #endif
00531   static void *mcache = 0;
00532 
00533   SETUP_VAR_STACK(5);
00534   VAR_STACK_PUSH(0, method);
00535   VAR_STACK_PUSH(1, sElF);
00536   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00537   SET_VAR_STACK();
00538 
00539   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "on-size", &mcache);
00540   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxOnSize)) {
00541     SET_VAR_STACK();
00542     READY_TO_RETURN; ASSELF wxRadioBox::OnSize(x0, x1);
00543   } else {
00544   
00545   p[POFFSET+0] = scheme_make_integer(x0);
00546   p[POFFSET+1] = scheme_make_integer(x1);
00547   
00548   p[0] = (Scheme_Object *) ASSELF __gc_external;
00549 
00550   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00551   
00552   
00553      READY_TO_RETURN;
00554   }
00555 }
00556 
00557 static Scheme_Object *os_wxRadioBoxOnSetFocus(int n, Scheme_Object *p[]);
00558 
00559 void os_wxRadioBox::OnSetFocus()
00560 {
00561   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00562   Scheme_Object *v;
00563   Scheme_Object *method INIT_NULLED_OUT;
00564 #ifdef MZ_PRECISE_GC
00565   os_wxRadioBox *sElF = this;
00566 #endif
00567   static void *mcache = 0;
00568 
00569   SETUP_VAR_STACK(5);
00570   VAR_STACK_PUSH(0, method);
00571   VAR_STACK_PUSH(1, sElF);
00572   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00573   SET_VAR_STACK();
00574 
00575   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "on-set-focus", &mcache);
00576   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxOnSetFocus)) {
00577     SET_VAR_STACK();
00578     READY_TO_RETURN; ASSELF wxRadioBox::OnSetFocus();
00579   } else {
00580   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00581   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00582   p[0] = (Scheme_Object *) ASSELF __gc_external;
00583 
00584   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00585   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00586   
00587      READY_TO_RETURN;
00588   }
00589 }
00590 
00591 static Scheme_Object *os_wxRadioBoxOnKillFocus(int n, Scheme_Object *p[]);
00592 
00593 void os_wxRadioBox::OnKillFocus()
00594 {
00595   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00596   Scheme_Object *v;
00597   Scheme_Object *method INIT_NULLED_OUT;
00598 #ifdef MZ_PRECISE_GC
00599   os_wxRadioBox *sElF = this;
00600 #endif
00601   static void *mcache = 0;
00602 
00603   SETUP_VAR_STACK(5);
00604   VAR_STACK_PUSH(0, method);
00605   VAR_STACK_PUSH(1, sElF);
00606   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00607   SET_VAR_STACK();
00608 
00609   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxRadioBox_class, "on-kill-focus", &mcache);
00610   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxRadioBoxOnKillFocus)) {
00611     SET_VAR_STACK();
00612     READY_TO_RETURN; ASSELF wxRadioBox::OnKillFocus();
00613   } else {
00614   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00615   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00616   p[0] = (Scheme_Object *) ASSELF __gc_external;
00617 
00618   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00619   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00620   
00621      READY_TO_RETURN;
00622   }
00623 }
00624 
00625 static Scheme_Object *os_wxRadioBoxButtonFocus(int n,  Scheme_Object *p[])
00626 {
00627   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00628   REMEMBER_VAR_STACK();
00629   int r;
00630   objscheme_check_valid(os_wxRadioBox_class, "button-focus in radio-box%", n, p);
00631   int x0;
00632 
00633   SETUP_VAR_STACK_REMEMBERED(1);
00634   VAR_STACK_PUSH(0, p);
00635 
00636   
00637   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "button-focus in radio-box%"));
00638 
00639   
00640   r = WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->ButtonFocus(x0));
00641 
00642   
00643   
00644   READY_TO_RETURN;
00645   return scheme_make_integer(r);
00646 }
00647 
00648 static Scheme_Object *os_wxRadioBoxEnable(int n,  Scheme_Object *p[])
00649 {
00650   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00651   SETUP_PRE_VAR_STACK(1);
00652   PRE_VAR_STACK_PUSH(0, p);
00653   REMEMBER_VAR_STACK();
00654   objscheme_check_valid(os_wxRadioBox_class, "enable in radio-box%", n, p);
00655   if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+0], NULL))) {
00656     int x0;
00657     Bool x1;
00658 
00659     SETUP_VAR_STACK_PRE_REMEMBERED(1);
00660     VAR_STACK_PUSH(0, p);
00661 
00662     
00663     if (n != (POFFSET+2)) 
00664       WITH_VAR_STACK(scheme_wrong_count_m("enable in radio-box% (single-button case)", POFFSET+2, POFFSET+2, n, p, 1));
00665     x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "enable in radio-box% (single-button case)"));
00666     x1 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+1], "enable in radio-box% (single-button case)"));
00667 
00668     if ((x0 < 0) || (x0 >= THISOBJECT->Number())) { READY_TO_RETURN; return scheme_void; }
00669     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->Enable(x0, x1));
00670 
00671     
00672     
00673     READY_TO_PRE_RETURN;
00674   } else  {
00675     Bool x0;
00676 
00677     SETUP_VAR_STACK_PRE_REMEMBERED(1);
00678     VAR_STACK_PUSH(0, p);
00679 
00680     
00681     if (n != (POFFSET+1)) 
00682       WITH_VAR_STACK(scheme_wrong_count_m("enable in radio-box% (all-buttons case)", POFFSET+1, POFFSET+1, n, p, 1));
00683     x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "enable in radio-box% (all-buttons case)"));
00684 
00685     
00686     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->Enable(x0));
00687 
00688     
00689     
00690     READY_TO_PRE_RETURN;
00691   }
00692 
00693   return scheme_void;
00694 }
00695 
00696 static Scheme_Object *os_wxRadioBoxSetSelection(int n,  Scheme_Object *p[])
00697 {
00698   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00699   REMEMBER_VAR_STACK();
00700   objscheme_check_valid(os_wxRadioBox_class, "set-selection in radio-box%", n, p);
00701   int x0;
00702 
00703   SETUP_VAR_STACK_REMEMBERED(1);
00704   VAR_STACK_PUSH(0, p);
00705 
00706   
00707   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "set-selection in radio-box%"));
00708 
00709   if ((x0 < 0) || (x0 >= THISOBJECT->Number())) { READY_TO_RETURN; return scheme_void; }
00710   WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->SetSelection(x0));
00711 
00712   
00713   
00714   READY_TO_RETURN;
00715   return scheme_void;
00716 }
00717 
00718 static Scheme_Object *os_wxRadioBoxNumber(int n,  Scheme_Object *p[])
00719 {
00720   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00721   REMEMBER_VAR_STACK();
00722   int r;
00723   objscheme_check_valid(os_wxRadioBox_class, "number in radio-box%", n, p);
00724 
00725   SETUP_VAR_STACK_REMEMBERED(1);
00726   VAR_STACK_PUSH(0, p);
00727 
00728   
00729 
00730   
00731   r = WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->Number());
00732 
00733   
00734   
00735   READY_TO_RETURN;
00736   return scheme_make_integer(r);
00737 }
00738 
00739 static Scheme_Object *os_wxRadioBoxGetSelection(int n,  Scheme_Object *p[])
00740 {
00741   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00742   REMEMBER_VAR_STACK();
00743   int r;
00744   objscheme_check_valid(os_wxRadioBox_class, "get-selection in radio-box%", n, p);
00745 
00746   SETUP_VAR_STACK_REMEMBERED(1);
00747   VAR_STACK_PUSH(0, p);
00748 
00749   
00750 
00751   
00752   r = WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->GetSelection());
00753 
00754   
00755   
00756   READY_TO_RETURN;
00757   return scheme_make_integer(r);
00758 }
00759 
00760 static Scheme_Object *os_wxRadioBoxOnDropFile(int n,  Scheme_Object *p[])
00761 {
00762   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00763   REMEMBER_VAR_STACK();
00764   objscheme_check_valid(os_wxRadioBox_class, "on-drop-file in radio-box%", n, p);
00765   epathname x0 INIT_NULLED_OUT;
00766 
00767   SETUP_VAR_STACK_REMEMBERED(2);
00768   VAR_STACK_PUSH(0, p);
00769   VAR_STACK_PUSH(1, x0);
00770 
00771   
00772   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in radio-box%"));
00773 
00774   
00775   if (((Scheme_Class_Object *)p[0])->primflag)
00776     WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->wxRadioBox::OnDropFile(x0));
00777   else
00778     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
00779 
00780   
00781   
00782   READY_TO_RETURN;
00783   return scheme_void;
00784 }
00785 
00786 static Scheme_Object *os_wxRadioBoxPreOnEvent(int n,  Scheme_Object *p[])
00787 {
00788   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00789   REMEMBER_VAR_STACK();
00790   Bool r;
00791   objscheme_check_valid(os_wxRadioBox_class, "pre-on-event in radio-box%", n, p);
00792   class wxWindow* x0 INIT_NULLED_OUT;
00793   class wxMouseEvent* x1 INIT_NULLED_OUT;
00794 
00795   SETUP_VAR_STACK_REMEMBERED(3);
00796   VAR_STACK_PUSH(0, p);
00797   VAR_STACK_PUSH(1, x0);
00798   VAR_STACK_PUSH(2, x1);
00799 
00800   
00801   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in radio-box%", 0));
00802   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in radio-box%", 0));
00803 
00804   
00805   if (((Scheme_Class_Object *)p[0])->primflag)
00806     r = WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
00807   else
00808     r = WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
00809 
00810   
00811   
00812   READY_TO_RETURN;
00813   return (r ? scheme_true : scheme_false);
00814 }
00815 
00816 static Scheme_Object *os_wxRadioBoxPreOnChar(int n,  Scheme_Object *p[])
00817 {
00818   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00819   REMEMBER_VAR_STACK();
00820   Bool r;
00821   objscheme_check_valid(os_wxRadioBox_class, "pre-on-char in radio-box%", n, p);
00822   class wxWindow* x0 INIT_NULLED_OUT;
00823   class wxKeyEvent* x1 INIT_NULLED_OUT;
00824 
00825   SETUP_VAR_STACK_REMEMBERED(3);
00826   VAR_STACK_PUSH(0, p);
00827   VAR_STACK_PUSH(1, x0);
00828   VAR_STACK_PUSH(2, x1);
00829 
00830   
00831   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in radio-box%", 0));
00832   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in radio-box%", 0));
00833 
00834   
00835   if (((Scheme_Class_Object *)p[0])->primflag)
00836     r = WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
00837   else
00838     r = WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
00839 
00840   
00841   
00842   READY_TO_RETURN;
00843   return (r ? scheme_true : scheme_false);
00844 }
00845 
00846 static Scheme_Object *os_wxRadioBoxOnSize(int n,  Scheme_Object *p[])
00847 {
00848   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00849   REMEMBER_VAR_STACK();
00850   objscheme_check_valid(os_wxRadioBox_class, "on-size in radio-box%", n, p);
00851   int x0;
00852   int x1;
00853 
00854   SETUP_VAR_STACK_REMEMBERED(1);
00855   VAR_STACK_PUSH(0, p);
00856 
00857   
00858   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in radio-box%"));
00859   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in radio-box%"));
00860 
00861   
00862   if (((Scheme_Class_Object *)p[0])->primflag)
00863     WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->wxRadioBox::OnSize(x0, x1));
00864   else
00865     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
00866 
00867   
00868   
00869   READY_TO_RETURN;
00870   return scheme_void;
00871 }
00872 
00873 static Scheme_Object *os_wxRadioBoxOnSetFocus(int n,  Scheme_Object *p[])
00874 {
00875   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00876   REMEMBER_VAR_STACK();
00877   objscheme_check_valid(os_wxRadioBox_class, "on-set-focus in radio-box%", n, p);
00878 
00879   SETUP_VAR_STACK_REMEMBERED(1);
00880   VAR_STACK_PUSH(0, p);
00881 
00882   
00883 
00884   
00885   if (((Scheme_Class_Object *)p[0])->primflag)
00886     WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->wxRadioBox::OnSetFocus());
00887   else
00888     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
00889 
00890   
00891   
00892   READY_TO_RETURN;
00893   return scheme_void;
00894 }
00895 
00896 static Scheme_Object *os_wxRadioBoxOnKillFocus(int n,  Scheme_Object *p[])
00897 {
00898   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00899   REMEMBER_VAR_STACK();
00900   objscheme_check_valid(os_wxRadioBox_class, "on-kill-focus in radio-box%", n, p);
00901 
00902   SETUP_VAR_STACK_REMEMBERED(1);
00903   VAR_STACK_PUSH(0, p);
00904 
00905   
00906 
00907   
00908   if (((Scheme_Class_Object *)p[0])->primflag)
00909     WITH_VAR_STACK(((os_wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->wxRadioBox::OnKillFocus());
00910   else
00911     WITH_VAR_STACK(((wxRadioBox *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
00912 
00913   
00914   
00915   READY_TO_RETURN;
00916   return scheme_void;
00917 }
00918 
00919 static Scheme_Object *os_wxRadioBox_ConstructScheme(int n,  Scheme_Object *p[])
00920 {
00921   SETUP_PRE_VAR_STACK(1);
00922   PRE_VAR_STACK_PUSH(0, p);
00923   os_wxRadioBox *realobj INIT_NULLED_OUT;
00924   REMEMBER_VAR_STACK();
00925   if ((n >= (POFFSET+8)) && WITH_REMEMBERED_STACK(objscheme_istype_wxPanel(p[POFFSET+0], NULL, 0)) && (SCHEME_NULLP(p[POFFSET+1]) || WITH_REMEMBERED_STACK(objscheme_istype_proc2(p[POFFSET+1], NULL))) && (XC_SCHEME_NULLP(p[POFFSET+2]) || WITH_REMEMBERED_STACK(objscheme_istype_string(p[POFFSET+2], NULL))) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+3], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+4], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+5], NULL)) && WITH_REMEMBERED_STACK(objscheme_istype_number(p[POFFSET+6], NULL)) && (SCHEME_LISTP(p[POFFSET+7]) && (XC_SCHEME_NULLP(p[POFFSET+7]) || WITH_REMEMBERED_STACK(objscheme_istype_wxBitmap((SCHEME_CAR(p[POFFSET+7])), NULL, 0))))) {
00926     class wxPanel* x0 INIT_NULLED_OUT;
00927     wxFunction x1;
00928     nstring x2 INIT_NULLED_OUT;
00929     int x3;
00930     int x4;
00931     int x5;
00932     int x6;
00933     int x7;
00934     wxBitmap** x8 INIT_NULLED_OUT;
00935     int x9;
00936     int x10;
00937     class wxFont* x11 INIT_NULLED_OUT;
00938     string x12 INIT_NULLED_OUT;
00939 
00940     SETUP_VAR_STACK_PRE_REMEMBERED(7);
00941     VAR_STACK_PUSH(0, p);
00942     VAR_STACK_PUSH(1, realobj);
00943     VAR_STACK_PUSH(2, x0);
00944     VAR_STACK_PUSH(3, x2);
00945     VAR_STACK_PUSH(4, x8);
00946     VAR_STACK_PUSH(5, x11);
00947     VAR_STACK_PUSH(6, x12);
00948 
00949     int cb_pos = 0;
00950     if ((n < (POFFSET+8)) || (n > (POFFSET+12))) 
00951       WITH_VAR_STACK(scheme_wrong_count_m("initialization in radio-box% (bitmap list case)", POFFSET+8, POFFSET+12, n, p, 1));
00952     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in radio-box% (bitmap list case)", 0));
00953     x1 = (SCHEME_NULLP(p[POFFSET+1]) ? NULL : (WITH_REMEMBERED_STACK(objscheme_istype_proc2(p[POFFSET+1], CB_USER)), cb_pos = 1, (CB_FUNCTYPE)CB_TOSCHEME));
00954     x2 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+2], "initialization in radio-box% (bitmap list case)"));
00955     x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in radio-box% (bitmap list case)"));
00956     x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in radio-box% (bitmap list case)"));
00957     x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "initialization in radio-box% (bitmap list case)"));
00958     x6 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+6], "initialization in radio-box% (bitmap list case)"));
00959     x8 = NULL;
00960     if (n > (POFFSET+8)) {
00961       x9 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+8], "initialization in radio-box% (bitmap list case)"));
00962     } else
00963       x9 = 0;
00964     if (n > (POFFSET+9)) {
00965       x10 = WITH_VAR_STACK(unbundle_symset_radioboxStyle(p[POFFSET+9], "initialization in radio-box% (bitmap list case)"));
00966     } else
00967       x10 = wxVERTICAL;
00968     if (n > (POFFSET+10)) {
00969       x11 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+10], "initialization in radio-box% (bitmap list case)", 1));
00970     } else
00971       x11 = NULL;
00972     if (n > (POFFSET+11)) {
00973       x12 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+11], "initialization in radio-box% (bitmap list case)"));
00974     } else
00975       x12 = "radioBox";
00976 
00977     if (!x5) x5 = -1;if (!x6) x6 = -1;x8 = WITH_VAR_STACK(__MakewxBitmapArray((7+POFFSET < n) ? p[POFFSET+7] : scheme_null, &x7, METHODNAME("radio-box%","initialization")));
00978     realobj = WITH_VAR_STACK(new os_wxRadioBox CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)));
00979 #ifdef MZ_PRECISE_GC
00980     WITH_VAR_STACK(realobj->gcInit_wxRadioBox(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12));
00981 #endif
00982     realobj->__gc_external = (void *)p[0];
00983     /* delete[] x8; */
00984     realobj->callback_closure = p[POFFSET+cb_pos];
00985     READY_TO_PRE_RETURN;
00986   } else  {
00987     class wxPanel* x0 INIT_NULLED_OUT;
00988     wxFunction x1;
00989     nstring x2 INIT_NULLED_OUT;
00990     int x3;
00991     int x4;
00992     int x5;
00993     int x6;
00994     int x7;
00995     string* x8 INIT_NULLED_OUT;
00996     int x9;
00997     int x10;
00998     class wxFont* x11 INIT_NULLED_OUT;
00999     string x12 INIT_NULLED_OUT;
01000 
01001     SETUP_VAR_STACK_PRE_REMEMBERED(7);
01002     VAR_STACK_PUSH(0, p);
01003     VAR_STACK_PUSH(1, realobj);
01004     VAR_STACK_PUSH(2, x0);
01005     VAR_STACK_PUSH(3, x2);
01006     VAR_STACK_PUSH(4, x8);
01007     VAR_STACK_PUSH(5, x11);
01008     VAR_STACK_PUSH(6, x12);
01009 
01010     int cb_pos = 0;
01011     if ((n < (POFFSET+3)) || (n > (POFFSET+12))) 
01012       WITH_VAR_STACK(scheme_wrong_count_m("initialization in radio-box% (string list case)", POFFSET+3, POFFSET+12, n, p, 1));
01013     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in radio-box% (string list case)", 0));
01014     x1 = (SCHEME_NULLP(p[POFFSET+1]) ? NULL : (WITH_REMEMBERED_STACK(objscheme_istype_proc2(p[POFFSET+1], CB_USER)), cb_pos = 1, (CB_FUNCTYPE)CB_TOSCHEME));
01015     x2 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+2], "initialization in radio-box% (string list case)"));
01016     if (n > (POFFSET+3)) {
01017       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in radio-box% (string list case)"));
01018     } else
01019       x3 = -1;
01020     if (n > (POFFSET+4)) {
01021       x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in radio-box% (string list case)"));
01022     } else
01023       x4 = -1;
01024     if (n > (POFFSET+5)) {
01025       x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "initialization in radio-box% (string list case)"));
01026     } else
01027       x5 = -1;
01028     if (n > (POFFSET+6)) {
01029       x6 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+6], "initialization in radio-box% (string list case)"));
01030     } else
01031       x6 = -1;
01032     if (n > (POFFSET+7)) {
01033       x8 = NULL;
01034     } else
01035       x8 = NULL;
01036     if (n > (POFFSET+8)) {
01037       x9 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+8], "initialization in radio-box% (string list case)"));
01038     } else
01039       x9 = 0;
01040     if (n > (POFFSET+9)) {
01041       x10 = WITH_VAR_STACK(unbundle_symset_radioboxStyle(p[POFFSET+9], "initialization in radio-box% (string list case)"));
01042     } else
01043       x10 = wxVERTICAL;
01044     if (n > (POFFSET+10)) {
01045       x11 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+10], "initialization in radio-box% (string list case)", 1));
01046     } else
01047       x11 = NULL;
01048     if (n > (POFFSET+11)) {
01049       x12 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+11], "initialization in radio-box% (string list case)"));
01050     } else
01051       x12 = "radioBox";
01052 
01053     if (!x5) x5 = -1;if (!x6) x6 = -1;x8 = WITH_VAR_STACK(__MakestringArray((7+POFFSET < n) ? p[POFFSET+7] : scheme_null, &x7, METHODNAME("radio-box%","initialization")));
01054     realobj = WITH_VAR_STACK(new os_wxRadioBox CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12)));
01055 #ifdef MZ_PRECISE_GC
01056     WITH_VAR_STACK(realobj->gcInit_wxRadioBox(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12));
01057 #endif
01058     realobj->__gc_external = (void *)p[0];
01059     /* delete[] x8; */
01060     realobj->callback_closure = p[POFFSET+cb_pos];
01061     READY_TO_PRE_RETURN;
01062   }
01063 
01064   ((Scheme_Class_Object *)p[0])->primdata = realobj;
01065   ((Scheme_Class_Object *)p[0])->primflag = 1;
01066   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
01067   return scheme_void;
01068 }
01069 
01070 void objscheme_setup_wxRadioBox(Scheme_Env *env)
01071 {
01072   SETUP_VAR_STACK(1);
01073   VAR_STACK_PUSH(0, env);
01074 
01075   wxREGGLOB(os_wxRadioBox_class);
01076 
01077   os_wxRadioBox_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "radio-box%", "item%", (Scheme_Method_Prim *)os_wxRadioBox_ConstructScheme, 11));
01078 
01079   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "button-focus" " method", (Scheme_Method_Prim *)os_wxRadioBoxButtonFocus, 1, 1));
01080   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "enable" " method", (Scheme_Method_Prim *)os_wxRadioBoxEnable, 1, 2));
01081   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "set-selection" " method", (Scheme_Method_Prim *)os_wxRadioBoxSetSelection, 1, 1));
01082   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "number" " method", (Scheme_Method_Prim *)os_wxRadioBoxNumber, 0, 0));
01083   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "get-selection" " method", (Scheme_Method_Prim *)os_wxRadioBoxGetSelection, 0, 0));
01084   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxRadioBoxOnDropFile, 1, 1));
01085   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxRadioBoxPreOnEvent, 2, 2));
01086   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxRadioBoxPreOnChar, 2, 2));
01087   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "on-size" " method", (Scheme_Method_Prim *)os_wxRadioBoxOnSize, 2, 2));
01088   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxRadioBoxOnSetFocus, 0, 0));
01089   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxRadioBox_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxRadioBoxOnKillFocus, 0, 0));
01090 
01091 
01092   WITH_VAR_STACK(scheme_made_class(os_wxRadioBox_class));
01093 
01094 
01095   READY_TO_RETURN;
01096 }
01097 
01098 int objscheme_istype_wxRadioBox(Scheme_Object *obj, const char *stop, int nullOK)
01099 {
01100   REMEMBER_VAR_STACK();
01101   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01102   if (objscheme_is_a(obj,  os_wxRadioBox_class))
01103     return 1;
01104   else {
01105     if (!stop)
01106        return 0;
01107     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "radio-box% object or " XC_NULL_STR: "radio-box% object", -1, 0, &obj));
01108     return 0;
01109   }
01110 }
01111 
01112 Scheme_Object *objscheme_bundle_wxRadioBox(class wxRadioBox *realobj)
01113 {
01114   Scheme_Class_Object *obj INIT_NULLED_OUT;
01115   Scheme_Object *sobj INIT_NULLED_OUT;
01116 
01117   if (!realobj) return XC_SCHEME_NULL;
01118 
01119   if (realobj->__gc_external)
01120     return (Scheme_Object *)realobj->__gc_external;
01121 
01122   SETUP_VAR_STACK(2);
01123   VAR_STACK_PUSH(0, obj);
01124   VAR_STACK_PUSH(1, realobj);
01125 
01126   if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01127     { READY_TO_RETURN; return sobj; }
01128   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxRadioBox_class));
01129 
01130   obj->primdata = realobj;
01131   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01132   obj->primflag = 0;
01133 
01134   realobj->__gc_external = (void *)obj;
01135   READY_TO_RETURN;
01136   return (Scheme_Object *)obj;
01137 }
01138 
01139 class wxRadioBox *objscheme_unbundle_wxRadioBox(Scheme_Object *obj, const char *where, int nullOK)
01140 {
01141   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01142 
01143   REMEMBER_VAR_STACK();
01144 
01145   (void)objscheme_istype_wxRadioBox(obj, where, nullOK);
01146   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01147   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01148   if (o->primflag)
01149     return (os_wxRadioBox *)o->primdata;
01150   else
01151     return (wxRadioBox *)o->primdata;
01152 }
01153 
01154 
01155 
01156 static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
01157 {
01158   Scheme_Object *p[2];
01159   Scheme_Class_Object *obj;
01160   mz_jmp_buf savebuf;
01161   Scheme_Thread *thread;
01162   SETUP_VAR_STACK(4);
01163   VAR_STACK_PUSH(0, obj);
01164   VAR_STACK_PUSH(1, event);
01165   VAR_STACK_PUSH(2, p[0]);
01166   VAR_STACK_PUSH(3, p[1]);
01167 
01168   p[0] = NULL;
01169   p[1] = NULL;
01170 
01171   obj = (Scheme_Class_Object *)realobj->__gc_external;
01172 
01173   if (!obj) {
01174     // scheme_signal_error("bad callback object");
01175     return;
01176   }
01177 
01178   p[0] = (Scheme_Object *)obj;
01179   p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
01180 
01181   thread = scheme_get_current_thread();
01182   COPY_JMPBUF(savebuf, *(thread->error_buf));
01183 
01184   if (!scheme_setjmp(*(thread->error_buf)))
01185     WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
01186 
01187   thread = scheme_get_current_thread();
01188   COPY_JMPBUF(*(thread->error_buf), savebuf);
01189 
01190   READY_TO_RETURN;
01191 }