Back to index

plt-scheme  4.2.1
wxs_tabc.cxx
Go to the documentation of this file.
00001 /* DO NOT EDIT THIS FILE. */
00002 /* This file was generated by xctocc from "wxs_tabc.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 #ifndef wx_xt
00013 # include "wx_tabc.h"
00014 # include "wx_gbox.h"
00015 #endif
00016 
00017 
00018 
00019 
00020 #ifdef wx_x
00021 # define BM_SELECTED(map) ((map)->selectedTo)
00022 #endif
00023 #if defined(wx_mac) || defined(wx_msw)
00024 # define BM_SELECTED(map) ((map)->selectedInto)
00025 #endif
00026 # define BM_IN_USE(map) ((map)->selectedIntoDC)
00027 
00028 
00029 
00030 
00031 #define ESCAPE_NO_RET_VAL /*empty*/
00032 
00033 
00034 #ifdef wx_xt
00035 /* This calls won't be instantiated, but it must compile. */
00036 #include "wx_item.h"
00037 
00038 class wxTabChoice : public wxItem {
00039 public:
00040     wxTabChoice(wxPanel *panel, wxFunction func, char *label,
00041                int n, char **choices, int style, wxFont *fnt);
00042 
00043     int   GetSelection(void);
00044     int   Number(void);
00045     void  SetSelection(int n);
00046     void  Enable(Bool enable);
00047     void  Append(char *);
00048     void  Delete(int);
00049     void  SetLabel(int, char *);
00050     void  Set(int n, char **choices);
00051     int   ButtonFocus(int);
00052 };
00053 
00054 wxTabChoice::wxTabChoice(wxPanel *panel, wxFunction func, char *label,
00055                       int n, char **choices, int style, wxFont *fnt)
00056 {
00057 }
00058 
00059 int wxTabChoice::GetSelection(void) { return 0; }
00060 int wxTabChoice::Number(void) { return 0; }
00061 void wxTabChoice::SetSelection(int n) { }
00062 void wxTabChoice::Enable(Bool enable) { }
00063 void wxTabChoice::Append(char *name) { }
00064 void wxTabChoice::Delete(int which) { }
00065 void wxTabChoice::SetLabel(int which, char *lbl) { }
00066 void wxTabChoice::Set(int n, char **choices) { }
00067 int wxTabChoice::ButtonFocus(int n) { return 0; }
00068 
00069 class wxGroupBox : public wxItem {
00070 public:
00071     wxGroupBox(wxPanel *panel, char *label, int style, wxFont *fnt);
00072 };
00073 
00074 wxGroupBox::wxGroupBox(wxPanel *panel, char *label, int style, wxFont *fnt)
00075 {
00076 }
00077 
00078 #endif
00079 
00080 #include "wxscheme.h"
00081 #include "wxs_tabc.h"
00082 
00083 #ifdef MZ_PRECISE_GC
00084 START_XFORM_SKIP;
00085 #endif
00086 
00087 
00088 
00089 #define CB_FUNCTYPE wxFunction 
00090 
00091 
00092 #undef CALLBACKCLASS
00093 #undef CB_REALCLASS
00094 #undef CB_UNBUNDLE
00095 #undef CB_USER
00096 
00097 #define CALLBACKCLASS os_wxTabChoice
00098 #define CB_REALCLASS wxTabChoice
00099 #define CB_UNBUNDLE objscheme_unbundle_wxTabChoice
00100 #define CB_USER METHODNAME("tab-group", "initialization")
00101 
00102 #undef CB_TOSCHEME
00103 #undef CB_TOC
00104 #define CB_TOSCHEME wxTabChoiceCallbackToScheme
00105 #define CB_TOC wxTabChoiceCallbackToC
00106 
00107 
00108 class CALLBACKCLASS;
00109 
00110 
00111 
00112 
00113 
00114 extern wxCommandEvent *objscheme_unbundle_wxCommandEvent(Scheme_Object *,const char *,int);
00115 extern Scheme_Object *objscheme_bundle_wxCommandEvent(wxCommandEvent *);
00116 
00117 static void CB_TOSCHEME(CB_REALCLASS *obj, wxCommandEvent *event);
00118 
00119 #undef l_ADDRESS
00120 #undef l_DEREF
00121 #undef l_TEST
00122 #undef l_POINT
00123 #undef l_TYPE
00124 #undef l_LIST_ITEM_BUNDLE
00125 #undef l_LIST_ITEM_UNBUNDLE
00126 #undef l_MAKE_LIST
00127 #undef l_MAKE_ARRAY
00128 #undef l_EXTRA
00129 #undef l_TERMINATE
00130 #undef l_COPY
00131 #undef l_OKTEST
00132 #undef l_INTTYPE
00133 
00134 #define l_ADDRESS 
00135 #define l_DEREF 
00136 #define l_NEWATOMIC (UseGC)
00137 #define l_NULLOK 0
00138 #define l_TEST 
00139 #define l_POINT 
00140 #define l_EXTRA 0
00141 #define l_TERMINATE 
00142 #define l_COPY l_COPYDEST=l_COPYSRC;
00143 #define l_OKTEST 
00144 #define l_INTTYPE int
00145 #define l_DIRECTMALLOC 0
00146 
00147 #define l_TYPE string
00148 #define l_LIST_ITEM_BUNDLE objscheme_bundle_string
00149 #define l_LIST_ITEM_UNBUNDLE objscheme_unbundle_string
00150 #define l_MAKE_LIST __MakestringList
00151 #define l_MAKE_ARRAY __MakestringArray
00152 
00153 
00154 
00155 
00156 
00157 static Scheme_Object *l_MAKE_LIST(l_TYPE l_POINT *f, l_INTTYPE c)
00158 {
00159   Scheme_Object *cdr = scheme_null, *obj = NULL;
00160   SETUP_VAR_STACK(1);
00161   VAR_STACK_PUSH(0, cdr);
00162 
00163   while (c--) {
00164     obj = WITH_VAR_STACK(l_LIST_ITEM_BUNDLE(l_ADDRESS f[c]));
00165     cdr = WITH_VAR_STACK(scheme_make_pair(obj, cdr));
00166   }
00167   
00168   READY_TO_RETURN;
00169 
00170   return cdr;
00171 }
00172 
00173 static l_TYPE l_POINT *l_MAKE_ARRAY(Scheme_Object *l, l_INTTYPE *c, char *who)
00174 {
00175   Scheme_Object *orig_l = l;
00176   int i = 0;
00177   long len;
00178   l_TYPE l_POINT *f = NULL;
00179 
00180   SETUP_VAR_STACK(3);
00181   VAR_STACK_PUSH(0, l);
00182   VAR_STACK_PUSH(1, orig_l);
00183   VAR_STACK_PUSH(2, f);
00184 
00185   len = WITH_VAR_STACK(scheme_proper_list_length(l));
00186   if (len < 0) WITH_VAR_STACK(scheme_wrong_type(who, "proper-list", -1, 0, &l));
00187   if (c) *c = len;
00188 
00189   if (!(len + l_EXTRA)) {
00190     READY_TO_RETURN;
00191     return NULL;
00192   }
00193 
00194 #if l_DIRECTMALLOC
00195   f = (l_TYPE l_POINT *)WITH_VAR_STACK(GC_malloc_atomic(sizeof(l_TYPE l_POINT) * (len + l_EXTRA)));
00196 #else
00197   f = WITH_VAR_STACK(new l_NEWATOMIC l_TYPE l_POINT[len + l_EXTRA]);
00198 #endif
00199 
00200   while (!SCHEME_NULLP(l)) {
00201     if (!SCHEME_LISTP(l)) {
00202       WITH_VAR_STACK(scheme_arg_mismatch(who, "expected a proper list: ", orig_l));
00203       READY_TO_RETURN;
00204       return NULL;
00205     }
00206 
00207 #define l_COPYDEST f[i]
00208 #define l_COPYSRC (l_DEREF WITH_VAR_STACK(l_LIST_ITEM_UNBUNDLE(SCHEME_CAR(l), who l_TEST)))
00209 
00210     l_COPY
00211 
00212     l_OKTEST
00213 
00214     i++;
00215 
00216     l = SCHEME_CDR(l);
00217   }
00218   l_TERMINATE
00219 
00220   READY_TO_RETURN;
00221 
00222   return f;
00223 }
00224 
00225 
00226 
00227 static Scheme_Object *tabStyle_wxINVISIBLE_sym = NULL;
00228 static Scheme_Object *tabStyle_wxBORDER_sym = NULL;
00229 
00230 static void init_symset_tabStyle(void) {
00231   REMEMBER_VAR_STACK();
00232   wxREGGLOB(tabStyle_wxINVISIBLE_sym);
00233   tabStyle_wxINVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("deleted"));
00234   wxREGGLOB(tabStyle_wxBORDER_sym);
00235   tabStyle_wxBORDER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("border"));
00236 }
00237 
00238 static int unbundle_symset_tabStyle(Scheme_Object *v, const char *where) {
00239   SETUP_VAR_STACK(1);
00240   VAR_STACK_PUSH(0, v);
00241   if (!tabStyle_wxBORDER_sym) WITH_VAR_STACK(init_symset_tabStyle());
00242   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00243   long result = 0;
00244   while (SCHEME_PAIRP(l)) {
00245   i = SCHEME_CAR(l);
00246   if (0) { }
00247   else if (i == tabStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
00248   else if (i == tabStyle_wxBORDER_sym) { result = result | wxBORDER; }
00249   else { break; } 
00250   l = SCHEME_CDR(l);
00251   }
00252   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00253   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "tabStyle symbol list", -1, 0, &v));
00254   READY_TO_RETURN;
00255   return 0;
00256 }
00257 
00258 
00259 #define RANGECLASS wxTabChoice
00260 
00261 #define THISOBJECT ((RANGECLASS *)((Scheme_Class_Object *)THEOBJ)->primdata)
00262 
00263 
00264 
00265 
00266 
00267 
00268 
00269 
00270 
00271 
00272 
00273 
00274 
00275 
00276 
00277 class os_wxTabChoice : public wxTabChoice {
00278  public:
00279   Scheme_Object *callback_closure;
00280 
00281   os_wxTabChoice CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3 = 0, string* x4 = NULL, int x5 = 0, class wxFont* x6 = NULL));
00282   ~os_wxTabChoice();
00283   void OnDropFile(epathname x0);
00284   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
00285   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
00286   void OnSize(int x0, int x1);
00287   void OnSetFocus();
00288   void OnKillFocus();
00289 #ifdef MZ_PRECISE_GC
00290   void gcMark();
00291   void gcFixup();
00292 #endif
00293 };
00294 
00295 #ifdef MZ_PRECISE_GC
00296 void os_wxTabChoice::gcMark() {
00297   wxTabChoice::gcMark();
00298   gcMARK_TYPED(Scheme_Object *, callback_closure);
00299 }
00300 void os_wxTabChoice::gcFixup() {
00301   wxTabChoice::gcFixup();
00302   gcFIXUP_TYPED(Scheme_Object *, callback_closure);
00303 }
00304 #endif
00305 
00306 static Scheme_Object *os_wxTabChoice_class;
00307 
00308 os_wxTabChoice::os_wxTabChoice CONSTRUCTOR_ARGS((class wxPanel* x0, wxFunction x1, nstring x2, int x3, string* x4, int x5, class wxFont* x6))
00309 CONSTRUCTOR_INIT(: wxTabChoice(x0, x1, x2, x3, x4, x5, x6))
00310 {
00311 }
00312 
00313 os_wxTabChoice::~os_wxTabChoice()
00314 {
00315     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00316 }
00317 
00318 static Scheme_Object *os_wxTabChoiceOnDropFile(int n, Scheme_Object *p[]);
00319 
00320 void os_wxTabChoice::OnDropFile(epathname x0)
00321 {
00322   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00323   Scheme_Object *v;
00324   Scheme_Object *method INIT_NULLED_OUT;
00325 #ifdef MZ_PRECISE_GC
00326   os_wxTabChoice *sElF = this;
00327 #endif
00328   static void *mcache = 0;
00329 
00330   SETUP_VAR_STACK(6);
00331   VAR_STACK_PUSH(0, method);
00332   VAR_STACK_PUSH(1, sElF);
00333   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00334   VAR_STACK_PUSH(5, x0);
00335   SET_VAR_STACK();
00336 
00337   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "on-drop-file", &mcache);
00338   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoiceOnDropFile)) {
00339     SET_VAR_STACK();
00340     READY_TO_RETURN; ASSELF wxTabChoice::OnDropFile(x0);
00341   } else {
00342   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00343   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
00344   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00345   p[0] = (Scheme_Object *) ASSELF __gc_external;
00346 
00347   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00348   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00349   
00350      READY_TO_RETURN;
00351   }
00352 }
00353 
00354 static Scheme_Object *os_wxTabChoicePreOnEvent(int n, Scheme_Object *p[]);
00355 
00356 Bool os_wxTabChoice::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
00357 {
00358   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00359   Scheme_Object *v;
00360   Scheme_Object *method INIT_NULLED_OUT;
00361 #ifdef MZ_PRECISE_GC
00362   os_wxTabChoice *sElF = this;
00363 #endif
00364   static void *mcache = 0;
00365 
00366   SETUP_VAR_STACK(7);
00367   VAR_STACK_PUSH(0, method);
00368   VAR_STACK_PUSH(1, sElF);
00369   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00370   VAR_STACK_PUSH(5, x0);
00371   VAR_STACK_PUSH(6, x1);
00372   SET_VAR_STACK();
00373 
00374   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "pre-on-event", &mcache);
00375   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoicePreOnEvent)) {
00376     SET_VAR_STACK();
00377     return FALSE;
00378   } else {
00379   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00380   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00381   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
00382   ESCAPE_BLOCK(1)
00383   p[0] = (Scheme_Object *) ASSELF __gc_external;
00384 
00385   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00386   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00387   
00388   {
00389      Bool resval;
00390      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in tab-group%"", extracting return value"));
00391      READY_TO_RETURN;
00392      return resval;
00393   }
00394   }
00395 }
00396 
00397 static Scheme_Object *os_wxTabChoicePreOnChar(int n, Scheme_Object *p[]);
00398 
00399 Bool os_wxTabChoice::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
00400 {
00401   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00402   Scheme_Object *v;
00403   Scheme_Object *method INIT_NULLED_OUT;
00404 #ifdef MZ_PRECISE_GC
00405   os_wxTabChoice *sElF = this;
00406 #endif
00407   static void *mcache = 0;
00408 
00409   SETUP_VAR_STACK(7);
00410   VAR_STACK_PUSH(0, method);
00411   VAR_STACK_PUSH(1, sElF);
00412   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00413   VAR_STACK_PUSH(5, x0);
00414   VAR_STACK_PUSH(6, x1);
00415   SET_VAR_STACK();
00416 
00417   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "pre-on-char", &mcache);
00418   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoicePreOnChar)) {
00419     SET_VAR_STACK();
00420     return FALSE;
00421   } else {
00422   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00423   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00424   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
00425   ESCAPE_BLOCK(1)
00426   p[0] = (Scheme_Object *) ASSELF __gc_external;
00427 
00428   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00429   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00430   
00431   {
00432      Bool resval;
00433      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in tab-group%"", extracting return value"));
00434      READY_TO_RETURN;
00435      return resval;
00436   }
00437   }
00438 }
00439 
00440 static Scheme_Object *os_wxTabChoiceOnSize(int n, Scheme_Object *p[]);
00441 
00442 void os_wxTabChoice::OnSize(int x0, int x1)
00443 {
00444   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00445   Scheme_Object *v;
00446   Scheme_Object *method INIT_NULLED_OUT;
00447 #ifdef MZ_PRECISE_GC
00448   os_wxTabChoice *sElF = this;
00449 #endif
00450   static void *mcache = 0;
00451 
00452   SETUP_VAR_STACK(5);
00453   VAR_STACK_PUSH(0, method);
00454   VAR_STACK_PUSH(1, sElF);
00455   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00456   SET_VAR_STACK();
00457 
00458   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "on-size", &mcache);
00459   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoiceOnSize)) {
00460     SET_VAR_STACK();
00461     READY_TO_RETURN; ASSELF wxTabChoice::OnSize(x0, x1);
00462   } else {
00463   
00464   p[POFFSET+0] = scheme_make_integer(x0);
00465   p[POFFSET+1] = scheme_make_integer(x1);
00466   
00467   p[0] = (Scheme_Object *) ASSELF __gc_external;
00468 
00469   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00470   
00471   
00472      READY_TO_RETURN;
00473   }
00474 }
00475 
00476 static Scheme_Object *os_wxTabChoiceOnSetFocus(int n, Scheme_Object *p[]);
00477 
00478 void os_wxTabChoice::OnSetFocus()
00479 {
00480   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00481   Scheme_Object *v;
00482   Scheme_Object *method INIT_NULLED_OUT;
00483 #ifdef MZ_PRECISE_GC
00484   os_wxTabChoice *sElF = this;
00485 #endif
00486   static void *mcache = 0;
00487 
00488   SETUP_VAR_STACK(5);
00489   VAR_STACK_PUSH(0, method);
00490   VAR_STACK_PUSH(1, sElF);
00491   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00492   SET_VAR_STACK();
00493 
00494   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "on-set-focus", &mcache);
00495   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoiceOnSetFocus)) {
00496     SET_VAR_STACK();
00497     READY_TO_RETURN; ASSELF wxTabChoice::OnSetFocus();
00498   } else {
00499   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00500   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00501   p[0] = (Scheme_Object *) ASSELF __gc_external;
00502 
00503   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00504   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00505   
00506      READY_TO_RETURN;
00507   }
00508 }
00509 
00510 static Scheme_Object *os_wxTabChoiceOnKillFocus(int n, Scheme_Object *p[]);
00511 
00512 void os_wxTabChoice::OnKillFocus()
00513 {
00514   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00515   Scheme_Object *v;
00516   Scheme_Object *method INIT_NULLED_OUT;
00517 #ifdef MZ_PRECISE_GC
00518   os_wxTabChoice *sElF = this;
00519 #endif
00520   static void *mcache = 0;
00521 
00522   SETUP_VAR_STACK(5);
00523   VAR_STACK_PUSH(0, method);
00524   VAR_STACK_PUSH(1, sElF);
00525   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00526   SET_VAR_STACK();
00527 
00528   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxTabChoice_class, "on-kill-focus", &mcache);
00529   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxTabChoiceOnKillFocus)) {
00530     SET_VAR_STACK();
00531     READY_TO_RETURN; ASSELF wxTabChoice::OnKillFocus();
00532   } else {
00533   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00534   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00535   p[0] = (Scheme_Object *) ASSELF __gc_external;
00536 
00537   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00538   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00539   
00540      READY_TO_RETURN;
00541   }
00542 }
00543 
00544 static Scheme_Object *os_wxTabChoiceButtonFocus(int n,  Scheme_Object *p[])
00545 {
00546   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00547   REMEMBER_VAR_STACK();
00548   int r;
00549   objscheme_check_valid(os_wxTabChoice_class, "button-focus in tab-group%", n, p);
00550   int x0;
00551 
00552   SETUP_VAR_STACK_REMEMBERED(1);
00553   VAR_STACK_PUSH(0, p);
00554 
00555   
00556   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "button-focus in tab-group%"));
00557 
00558   
00559   r = WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->ButtonFocus(x0));
00560 
00561   
00562   
00563   READY_TO_RETURN;
00564   return scheme_make_integer(r);
00565 }
00566 
00567 static Scheme_Object *os_wxTabChoiceSet(int n,  Scheme_Object *p[])
00568 {
00569   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00570   REMEMBER_VAR_STACK();
00571   objscheme_check_valid(os_wxTabChoice_class, "set in tab-group%", n, p);
00572   int x0;
00573   string* x1 INIT_NULLED_OUT;
00574 
00575   SETUP_VAR_STACK_REMEMBERED(2);
00576   VAR_STACK_PUSH(0, p);
00577   VAR_STACK_PUSH(1, x1);
00578 
00579   
00580   if (n > (POFFSET+0)) {
00581     x1 = NULL;
00582   } else
00583     x1 = NULL;
00584 
00585   x1 = WITH_VAR_STACK(__MakestringArray((0+POFFSET < n) ? p[POFFSET+0] : scheme_null, &x0, METHODNAME("tab-group","set")));
00586   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->Set(x0, x1));
00587 
00588   /* delete[] x1; */
00589   
00590   READY_TO_RETURN;
00591   return scheme_void;
00592 }
00593 
00594 static Scheme_Object *os_wxTabChoiceSetLabel(int n,  Scheme_Object *p[])
00595 {
00596   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00597   REMEMBER_VAR_STACK();
00598   objscheme_check_valid(os_wxTabChoice_class, "set-label in tab-group%", n, p);
00599   int x0;
00600   string x1 INIT_NULLED_OUT;
00601 
00602   SETUP_VAR_STACK_REMEMBERED(2);
00603   VAR_STACK_PUSH(0, p);
00604   VAR_STACK_PUSH(1, x1);
00605 
00606   
00607   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "set-label in tab-group%"));
00608   x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "set-label in tab-group%"));
00609 
00610   if ((x0 < 0) || (x0 >= THISOBJECT->Number())) { READY_TO_RETURN; return scheme_void; }
00611   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->SetLabel(x0, x1));
00612 
00613   
00614   
00615   READY_TO_RETURN;
00616   return scheme_void;
00617 }
00618 
00619 static Scheme_Object *os_wxTabChoiceDelete(int n,  Scheme_Object *p[])
00620 {
00621   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00622   REMEMBER_VAR_STACK();
00623   objscheme_check_valid(os_wxTabChoice_class, "delete in tab-group%", n, p);
00624   int x0;
00625 
00626   SETUP_VAR_STACK_REMEMBERED(1);
00627   VAR_STACK_PUSH(0, p);
00628 
00629   
00630   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "delete in tab-group%"));
00631 
00632   
00633   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->Delete(x0));
00634 
00635   
00636   
00637   READY_TO_RETURN;
00638   return scheme_void;
00639 }
00640 
00641 static Scheme_Object *os_wxTabChoiceAppend(int n,  Scheme_Object *p[])
00642 {
00643   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00644   REMEMBER_VAR_STACK();
00645   objscheme_check_valid(os_wxTabChoice_class, "append in tab-group%", n, p);
00646   string x0 INIT_NULLED_OUT;
00647 
00648   SETUP_VAR_STACK_REMEMBERED(2);
00649   VAR_STACK_PUSH(0, p);
00650   VAR_STACK_PUSH(1, x0);
00651 
00652   
00653   x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "append in tab-group%"));
00654 
00655   
00656   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->Append(x0));
00657 
00658   
00659   
00660   READY_TO_RETURN;
00661   return scheme_void;
00662 }
00663 
00664 static Scheme_Object *os_wxTabChoiceEnable(int n,  Scheme_Object *p[])
00665 {
00666   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00667   REMEMBER_VAR_STACK();
00668   objscheme_check_valid(os_wxTabChoice_class, "enable in tab-group%", n, p);
00669   Bool x0;
00670 
00671   SETUP_VAR_STACK_REMEMBERED(1);
00672   VAR_STACK_PUSH(0, p);
00673 
00674   
00675   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "enable in tab-group%"));
00676 
00677   
00678   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->Enable(x0));
00679 
00680   
00681   
00682   READY_TO_RETURN;
00683   return scheme_void;
00684 }
00685 
00686 static Scheme_Object *os_wxTabChoiceSetSelection(int n,  Scheme_Object *p[])
00687 {
00688   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00689   REMEMBER_VAR_STACK();
00690   objscheme_check_valid(os_wxTabChoice_class, "set-selection in tab-group%", n, p);
00691   int x0;
00692 
00693   SETUP_VAR_STACK_REMEMBERED(1);
00694   VAR_STACK_PUSH(0, p);
00695 
00696   
00697   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "set-selection in tab-group%"));
00698 
00699   if ((x0 < 0) || (x0 >= THISOBJECT->Number())) { READY_TO_RETURN; return scheme_void; }
00700   WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->SetSelection(x0));
00701 
00702   
00703   
00704   READY_TO_RETURN;
00705   return scheme_void;
00706 }
00707 
00708 static Scheme_Object *os_wxTabChoiceNumber(int n,  Scheme_Object *p[])
00709 {
00710   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00711   REMEMBER_VAR_STACK();
00712   int r;
00713   objscheme_check_valid(os_wxTabChoice_class, "number in tab-group%", n, p);
00714 
00715   SETUP_VAR_STACK_REMEMBERED(1);
00716   VAR_STACK_PUSH(0, p);
00717 
00718   
00719 
00720   
00721   r = WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->Number());
00722 
00723   
00724   
00725   READY_TO_RETURN;
00726   return scheme_make_integer(r);
00727 }
00728 
00729 static Scheme_Object *os_wxTabChoiceGetSelection(int n,  Scheme_Object *p[])
00730 {
00731   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00732   REMEMBER_VAR_STACK();
00733   int r;
00734   objscheme_check_valid(os_wxTabChoice_class, "get-selection in tab-group%", n, p);
00735 
00736   SETUP_VAR_STACK_REMEMBERED(1);
00737   VAR_STACK_PUSH(0, p);
00738 
00739   
00740 
00741   
00742   r = WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->GetSelection());
00743 
00744   
00745   
00746   READY_TO_RETURN;
00747   return scheme_make_integer(r);
00748 }
00749 
00750 static Scheme_Object *os_wxTabChoiceOnDropFile(int n,  Scheme_Object *p[])
00751 {
00752   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00753   REMEMBER_VAR_STACK();
00754   objscheme_check_valid(os_wxTabChoice_class, "on-drop-file in tab-group%", n, p);
00755   epathname x0 INIT_NULLED_OUT;
00756 
00757   SETUP_VAR_STACK_REMEMBERED(2);
00758   VAR_STACK_PUSH(0, p);
00759   VAR_STACK_PUSH(1, x0);
00760 
00761   
00762   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in tab-group%"));
00763 
00764   
00765   if (((Scheme_Class_Object *)p[0])->primflag)
00766     WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->wxTabChoice::OnDropFile(x0));
00767   else
00768     WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
00769 
00770   
00771   
00772   READY_TO_RETURN;
00773   return scheme_void;
00774 }
00775 
00776 static Scheme_Object *os_wxTabChoicePreOnEvent(int n,  Scheme_Object *p[])
00777 {
00778   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00779   REMEMBER_VAR_STACK();
00780   Bool r;
00781   objscheme_check_valid(os_wxTabChoice_class, "pre-on-event in tab-group%", n, p);
00782   class wxWindow* x0 INIT_NULLED_OUT;
00783   class wxMouseEvent* x1 INIT_NULLED_OUT;
00784 
00785   SETUP_VAR_STACK_REMEMBERED(3);
00786   VAR_STACK_PUSH(0, p);
00787   VAR_STACK_PUSH(1, x0);
00788   VAR_STACK_PUSH(2, x1);
00789 
00790   
00791   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in tab-group%", 0));
00792   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in tab-group%", 0));
00793 
00794   
00795   if (((Scheme_Class_Object *)p[0])->primflag)
00796     r = WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
00797   else
00798     r = WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
00799 
00800   
00801   
00802   READY_TO_RETURN;
00803   return (r ? scheme_true : scheme_false);
00804 }
00805 
00806 static Scheme_Object *os_wxTabChoicePreOnChar(int n,  Scheme_Object *p[])
00807 {
00808   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00809   REMEMBER_VAR_STACK();
00810   Bool r;
00811   objscheme_check_valid(os_wxTabChoice_class, "pre-on-char in tab-group%", n, p);
00812   class wxWindow* x0 INIT_NULLED_OUT;
00813   class wxKeyEvent* x1 INIT_NULLED_OUT;
00814 
00815   SETUP_VAR_STACK_REMEMBERED(3);
00816   VAR_STACK_PUSH(0, p);
00817   VAR_STACK_PUSH(1, x0);
00818   VAR_STACK_PUSH(2, x1);
00819 
00820   
00821   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in tab-group%", 0));
00822   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in tab-group%", 0));
00823 
00824   
00825   if (((Scheme_Class_Object *)p[0])->primflag)
00826     r = WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
00827   else
00828     r = WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
00829 
00830   
00831   
00832   READY_TO_RETURN;
00833   return (r ? scheme_true : scheme_false);
00834 }
00835 
00836 static Scheme_Object *os_wxTabChoiceOnSize(int n,  Scheme_Object *p[])
00837 {
00838   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00839   REMEMBER_VAR_STACK();
00840   objscheme_check_valid(os_wxTabChoice_class, "on-size in tab-group%", n, p);
00841   int x0;
00842   int x1;
00843 
00844   SETUP_VAR_STACK_REMEMBERED(1);
00845   VAR_STACK_PUSH(0, p);
00846 
00847   
00848   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in tab-group%"));
00849   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in tab-group%"));
00850 
00851   
00852   if (((Scheme_Class_Object *)p[0])->primflag)
00853     WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->wxTabChoice::OnSize(x0, x1));
00854   else
00855     WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
00856 
00857   
00858   
00859   READY_TO_RETURN;
00860   return scheme_void;
00861 }
00862 
00863 static Scheme_Object *os_wxTabChoiceOnSetFocus(int n,  Scheme_Object *p[])
00864 {
00865   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00866   REMEMBER_VAR_STACK();
00867   objscheme_check_valid(os_wxTabChoice_class, "on-set-focus in tab-group%", n, p);
00868 
00869   SETUP_VAR_STACK_REMEMBERED(1);
00870   VAR_STACK_PUSH(0, p);
00871 
00872   
00873 
00874   
00875   if (((Scheme_Class_Object *)p[0])->primflag)
00876     WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->wxTabChoice::OnSetFocus());
00877   else
00878     WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
00879 
00880   
00881   
00882   READY_TO_RETURN;
00883   return scheme_void;
00884 }
00885 
00886 static Scheme_Object *os_wxTabChoiceOnKillFocus(int n,  Scheme_Object *p[])
00887 {
00888   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00889   REMEMBER_VAR_STACK();
00890   objscheme_check_valid(os_wxTabChoice_class, "on-kill-focus in tab-group%", n, p);
00891 
00892   SETUP_VAR_STACK_REMEMBERED(1);
00893   VAR_STACK_PUSH(0, p);
00894 
00895   
00896 
00897   
00898   if (((Scheme_Class_Object *)p[0])->primflag)
00899     WITH_VAR_STACK(((os_wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->wxTabChoice::OnKillFocus());
00900   else
00901     WITH_VAR_STACK(((wxTabChoice *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
00902 
00903   
00904   
00905   READY_TO_RETURN;
00906   return scheme_void;
00907 }
00908 
00909 static Scheme_Object *os_wxTabChoice_ConstructScheme(int n,  Scheme_Object *p[])
00910 {
00911   SETUP_PRE_VAR_STACK(1);
00912   PRE_VAR_STACK_PUSH(0, p);
00913   os_wxTabChoice *realobj INIT_NULLED_OUT;
00914   REMEMBER_VAR_STACK();
00915   class wxPanel* x0 INIT_NULLED_OUT;
00916   wxFunction x1;
00917   nstring x2 INIT_NULLED_OUT;
00918   int x3;
00919   string* x4 INIT_NULLED_OUT;
00920   int x5;
00921   class wxFont* x6 INIT_NULLED_OUT;
00922 
00923   SETUP_VAR_STACK_PRE_REMEMBERED(6);
00924   VAR_STACK_PUSH(0, p);
00925   VAR_STACK_PUSH(1, realobj);
00926   VAR_STACK_PUSH(2, x0);
00927   VAR_STACK_PUSH(3, x2);
00928   VAR_STACK_PUSH(4, x4);
00929   VAR_STACK_PUSH(5, x6);
00930 
00931   int cb_pos = 0;
00932   if ((n < (POFFSET+3)) || (n > (POFFSET+6))) 
00933     WITH_VAR_STACK(scheme_wrong_count_m("initialization in tab-group%", POFFSET+3, POFFSET+6, n, p, 1));
00934   x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in tab-group%", 0));
00935   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));
00936   x2 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+2], "initialization in tab-group%"));
00937   if (n > (POFFSET+3)) {
00938     x4 = NULL;
00939   } else
00940     x4 = NULL;
00941   if (n > (POFFSET+4)) {
00942     x5 = WITH_VAR_STACK(unbundle_symset_tabStyle(p[POFFSET+4], "initialization in tab-group%"));
00943   } else
00944     x5 = 0;
00945   if (n > (POFFSET+5)) {
00946     x6 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+5], "initialization in tab-group%", 1));
00947   } else
00948     x6 = NULL;
00949 
00950   x4 = WITH_VAR_STACK(__MakestringArray((3+POFFSET < n) ? p[POFFSET+3] : scheme_null, &x3, METHODNAME("tab-group","initialization")));
00951   realobj = WITH_VAR_STACK(new os_wxTabChoice CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00952 #ifdef MZ_PRECISE_GC
00953   WITH_VAR_STACK(realobj->gcInit_wxTabChoice(x0, x1, x2, x3, x4, x5, x6));
00954 #endif
00955   realobj->__gc_external = (void *)p[0];
00956   /* delete[] x4; */
00957   realobj->callback_closure = p[POFFSET+cb_pos];
00958   READY_TO_RETURN;
00959   ((Scheme_Class_Object *)p[0])->primdata = realobj;
00960   ((Scheme_Class_Object *)p[0])->primflag = 1;
00961   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
00962   return scheme_void;
00963 }
00964 
00965 void objscheme_setup_wxTabChoice(Scheme_Env *env)
00966 {
00967   SETUP_VAR_STACK(1);
00968   VAR_STACK_PUSH(0, env);
00969 
00970   wxREGGLOB(os_wxTabChoice_class);
00971 
00972   os_wxTabChoice_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "tab-group%", "item%", (Scheme_Method_Prim *)os_wxTabChoice_ConstructScheme, 15));
00973 
00974   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "button-focus" " method", (Scheme_Method_Prim *)os_wxTabChoiceButtonFocus, 1, 1));
00975   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "set" " method", (Scheme_Method_Prim *)os_wxTabChoiceSet, 0, 1));
00976   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "set-label" " method", (Scheme_Method_Prim *)os_wxTabChoiceSetLabel, 2, 2));
00977   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "delete" " method", (Scheme_Method_Prim *)os_wxTabChoiceDelete, 1, 1));
00978   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "append" " method", (Scheme_Method_Prim *)os_wxTabChoiceAppend, 1, 1));
00979   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "enable" " method", (Scheme_Method_Prim *)os_wxTabChoiceEnable, 1, 1));
00980   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "set-selection" " method", (Scheme_Method_Prim *)os_wxTabChoiceSetSelection, 1, 1));
00981   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "number" " method", (Scheme_Method_Prim *)os_wxTabChoiceNumber, 0, 0));
00982   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "get-selection" " method", (Scheme_Method_Prim *)os_wxTabChoiceGetSelection, 0, 0));
00983   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxTabChoiceOnDropFile, 1, 1));
00984   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxTabChoicePreOnEvent, 2, 2));
00985   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxTabChoicePreOnChar, 2, 2));
00986   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "on-size" " method", (Scheme_Method_Prim *)os_wxTabChoiceOnSize, 2, 2));
00987   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxTabChoiceOnSetFocus, 0, 0));
00988   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxTabChoice_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxTabChoiceOnKillFocus, 0, 0));
00989 
00990 
00991   WITH_VAR_STACK(scheme_made_class(os_wxTabChoice_class));
00992 
00993 
00994   READY_TO_RETURN;
00995 }
00996 
00997 int objscheme_istype_wxTabChoice(Scheme_Object *obj, const char *stop, int nullOK)
00998 {
00999   REMEMBER_VAR_STACK();
01000   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01001   if (objscheme_is_a(obj,  os_wxTabChoice_class))
01002     return 1;
01003   else {
01004     if (!stop)
01005        return 0;
01006     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "tab-group% object or " XC_NULL_STR: "tab-group% object", -1, 0, &obj));
01007     return 0;
01008   }
01009 }
01010 
01011 Scheme_Object *objscheme_bundle_wxTabChoice(class wxTabChoice *realobj)
01012 {
01013   Scheme_Class_Object *obj INIT_NULLED_OUT;
01014   Scheme_Object *sobj INIT_NULLED_OUT;
01015 
01016   if (!realobj) return XC_SCHEME_NULL;
01017 
01018   if (realobj->__gc_external)
01019     return (Scheme_Object *)realobj->__gc_external;
01020 
01021   SETUP_VAR_STACK(2);
01022   VAR_STACK_PUSH(0, obj);
01023   VAR_STACK_PUSH(1, realobj);
01024 
01025   if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01026     { READY_TO_RETURN; return sobj; }
01027   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxTabChoice_class));
01028 
01029   obj->primdata = realobj;
01030   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01031   obj->primflag = 0;
01032 
01033   realobj->__gc_external = (void *)obj;
01034   READY_TO_RETURN;
01035   return (Scheme_Object *)obj;
01036 }
01037 
01038 class wxTabChoice *objscheme_unbundle_wxTabChoice(Scheme_Object *obj, const char *where, int nullOK)
01039 {
01040   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01041 
01042   REMEMBER_VAR_STACK();
01043 
01044   (void)objscheme_istype_wxTabChoice(obj, where, nullOK);
01045   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01046   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01047   if (o->primflag)
01048     return (os_wxTabChoice *)o->primdata;
01049   else
01050     return (wxTabChoice *)o->primdata;
01051 }
01052 
01053 
01054 
01055 static void CB_TOSCHEME(CB_REALCLASS *realobj, wxCommandEvent *event)
01056 {
01057   Scheme_Object *p[2];
01058   Scheme_Class_Object *obj;
01059   mz_jmp_buf savebuf;
01060   Scheme_Thread *thread;
01061   SETUP_VAR_STACK(4);
01062   VAR_STACK_PUSH(0, obj);
01063   VAR_STACK_PUSH(1, event);
01064   VAR_STACK_PUSH(2, p[0]);
01065   VAR_STACK_PUSH(3, p[1]);
01066 
01067   p[0] = NULL;
01068   p[1] = NULL;
01069 
01070   obj = (Scheme_Class_Object *)realobj->__gc_external;
01071 
01072   if (!obj) {
01073     // scheme_signal_error("bad callback object");
01074     return;
01075   }
01076 
01077   p[0] = (Scheme_Object *)obj;
01078   p[1] = WITH_VAR_STACK(objscheme_bundle_wxCommandEvent(event));
01079 
01080   thread = scheme_get_current_thread();
01081   COPY_JMPBUF(savebuf, *(thread->error_buf));
01082 
01083   if (!scheme_setjmp(*(thread->error_buf)))
01084     WITH_VAR_STACK(scheme_apply_multi(((CALLBACKCLASS *)obj->primdata)->callback_closure, 2, p));
01085 
01086   thread = scheme_get_current_thread();
01087   COPY_JMPBUF(*(thread->error_buf), savebuf);
01088 
01089   READY_TO_RETURN;
01090 }
01091 
01092 
01093 
01094 
01095 static Scheme_Object *groupBoxStyle_wxINVISIBLE_sym = NULL;
01096 
01097 static void init_symset_groupBoxStyle(void) {
01098   REMEMBER_VAR_STACK();
01099   wxREGGLOB(groupBoxStyle_wxINVISIBLE_sym);
01100   groupBoxStyle_wxINVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("deleted"));
01101 }
01102 
01103 static int unbundle_symset_groupBoxStyle(Scheme_Object *v, const char *where) {
01104   SETUP_VAR_STACK(1);
01105   VAR_STACK_PUSH(0, v);
01106   if (!groupBoxStyle_wxINVISIBLE_sym) WITH_VAR_STACK(init_symset_groupBoxStyle());
01107   Scheme_Object *i INIT_NULLED_OUT, *l = v;
01108   long result = 0;
01109   while (SCHEME_PAIRP(l)) {
01110   i = SCHEME_CAR(l);
01111   if (0) { }
01112   else if (i == groupBoxStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
01113   else { break; } 
01114   l = SCHEME_CDR(l);
01115   }
01116   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
01117   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "groupBoxStyle symbol list", -1, 0, &v));
01118   READY_TO_RETURN;
01119   return 0;
01120 }
01121 
01122 
01123 
01124 
01125 
01126 
01127 
01128 
01129 class os_wxGroupBox : public wxGroupBox {
01130  public:
01131 
01132   os_wxGroupBox CONSTRUCTOR_ARGS((class wxPanel* x0, nstring x1, int x2 = 0, class wxFont* x3 = NULL));
01133   ~os_wxGroupBox();
01134   void OnDropFile(epathname x0);
01135   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
01136   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
01137   void OnSize(int x0, int x1);
01138   void OnSetFocus();
01139   void OnKillFocus();
01140 #ifdef MZ_PRECISE_GC
01141   void gcMark();
01142   void gcFixup();
01143 #endif
01144 };
01145 
01146 #ifdef MZ_PRECISE_GC
01147 void os_wxGroupBox::gcMark() {
01148   wxGroupBox::gcMark();
01149 }
01150 void os_wxGroupBox::gcFixup() {
01151   wxGroupBox::gcFixup();
01152 }
01153 #endif
01154 
01155 static Scheme_Object *os_wxGroupBox_class;
01156 
01157 os_wxGroupBox::os_wxGroupBox CONSTRUCTOR_ARGS((class wxPanel* x0, nstring x1, int x2, class wxFont* x3))
01158 CONSTRUCTOR_INIT(: wxGroupBox(x0, x1, x2, x3))
01159 {
01160 }
01161 
01162 os_wxGroupBox::~os_wxGroupBox()
01163 {
01164     objscheme_destroy(this, (Scheme_Object *) __gc_external);
01165 }
01166 
01167 static Scheme_Object *os_wxGroupBoxOnDropFile(int n, Scheme_Object *p[]);
01168 
01169 void os_wxGroupBox::OnDropFile(epathname x0)
01170 {
01171   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
01172   Scheme_Object *v;
01173   Scheme_Object *method INIT_NULLED_OUT;
01174 #ifdef MZ_PRECISE_GC
01175   os_wxGroupBox *sElF = this;
01176 #endif
01177   static void *mcache = 0;
01178 
01179   SETUP_VAR_STACK(6);
01180   VAR_STACK_PUSH(0, method);
01181   VAR_STACK_PUSH(1, sElF);
01182   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
01183   VAR_STACK_PUSH(5, x0);
01184   SET_VAR_STACK();
01185 
01186   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "on-drop-file", &mcache);
01187   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxOnDropFile)) {
01188     SET_VAR_STACK();
01189     READY_TO_RETURN; ASSELF wxGroupBox::OnDropFile(x0);
01190   } else {
01191   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01192   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
01193   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01194   p[0] = (Scheme_Object *) ASSELF __gc_external;
01195 
01196   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
01197   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01198   
01199      READY_TO_RETURN;
01200   }
01201 }
01202 
01203 static Scheme_Object *os_wxGroupBoxPreOnEvent(int n, Scheme_Object *p[]);
01204 
01205 Bool os_wxGroupBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
01206 {
01207   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01208   Scheme_Object *v;
01209   Scheme_Object *method INIT_NULLED_OUT;
01210 #ifdef MZ_PRECISE_GC
01211   os_wxGroupBox *sElF = this;
01212 #endif
01213   static void *mcache = 0;
01214 
01215   SETUP_VAR_STACK(7);
01216   VAR_STACK_PUSH(0, method);
01217   VAR_STACK_PUSH(1, sElF);
01218   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01219   VAR_STACK_PUSH(5, x0);
01220   VAR_STACK_PUSH(6, x1);
01221   SET_VAR_STACK();
01222 
01223   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "pre-on-event", &mcache);
01224   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxPreOnEvent)) {
01225     SET_VAR_STACK();
01226     return FALSE;
01227   } else {
01228   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01229   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
01230   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
01231   ESCAPE_BLOCK(1)
01232   p[0] = (Scheme_Object *) ASSELF __gc_external;
01233 
01234   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01235   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01236   
01237   {
01238      Bool resval;
01239      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in group-box%"", extracting return value"));
01240      READY_TO_RETURN;
01241      return resval;
01242   }
01243   }
01244 }
01245 
01246 static Scheme_Object *os_wxGroupBoxPreOnChar(int n, Scheme_Object *p[]);
01247 
01248 Bool os_wxGroupBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
01249 {
01250   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01251   Scheme_Object *v;
01252   Scheme_Object *method INIT_NULLED_OUT;
01253 #ifdef MZ_PRECISE_GC
01254   os_wxGroupBox *sElF = this;
01255 #endif
01256   static void *mcache = 0;
01257 
01258   SETUP_VAR_STACK(7);
01259   VAR_STACK_PUSH(0, method);
01260   VAR_STACK_PUSH(1, sElF);
01261   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01262   VAR_STACK_PUSH(5, x0);
01263   VAR_STACK_PUSH(6, x1);
01264   SET_VAR_STACK();
01265 
01266   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "pre-on-char", &mcache);
01267   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxPreOnChar)) {
01268     SET_VAR_STACK();
01269     return FALSE;
01270   } else {
01271   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01272   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
01273   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
01274   ESCAPE_BLOCK(1)
01275   p[0] = (Scheme_Object *) ASSELF __gc_external;
01276 
01277   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01278   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01279   
01280   {
01281      Bool resval;
01282      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in group-box%"", extracting return value"));
01283      READY_TO_RETURN;
01284      return resval;
01285   }
01286   }
01287 }
01288 
01289 static Scheme_Object *os_wxGroupBoxOnSize(int n, Scheme_Object *p[]);
01290 
01291 void os_wxGroupBox::OnSize(int x0, int x1)
01292 {
01293   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01294   Scheme_Object *v;
01295   Scheme_Object *method INIT_NULLED_OUT;
01296 #ifdef MZ_PRECISE_GC
01297   os_wxGroupBox *sElF = this;
01298 #endif
01299   static void *mcache = 0;
01300 
01301   SETUP_VAR_STACK(5);
01302   VAR_STACK_PUSH(0, method);
01303   VAR_STACK_PUSH(1, sElF);
01304   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01305   SET_VAR_STACK();
01306 
01307   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "on-size", &mcache);
01308   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxOnSize)) {
01309     SET_VAR_STACK();
01310     READY_TO_RETURN; ASSELF wxGroupBox::OnSize(x0, x1);
01311   } else {
01312   
01313   p[POFFSET+0] = scheme_make_integer(x0);
01314   p[POFFSET+1] = scheme_make_integer(x1);
01315   
01316   p[0] = (Scheme_Object *) ASSELF __gc_external;
01317 
01318   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01319   
01320   
01321      READY_TO_RETURN;
01322   }
01323 }
01324 
01325 static Scheme_Object *os_wxGroupBoxOnSetFocus(int n, Scheme_Object *p[]);
01326 
01327 void os_wxGroupBox::OnSetFocus()
01328 {
01329   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
01330   Scheme_Object *v;
01331   Scheme_Object *method INIT_NULLED_OUT;
01332 #ifdef MZ_PRECISE_GC
01333   os_wxGroupBox *sElF = this;
01334 #endif
01335   static void *mcache = 0;
01336 
01337   SETUP_VAR_STACK(5);
01338   VAR_STACK_PUSH(0, method);
01339   VAR_STACK_PUSH(1, sElF);
01340   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
01341   SET_VAR_STACK();
01342 
01343   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "on-set-focus", &mcache);
01344   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxOnSetFocus)) {
01345     SET_VAR_STACK();
01346     READY_TO_RETURN; ASSELF wxGroupBox::OnSetFocus();
01347   } else {
01348   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01349   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01350   p[0] = (Scheme_Object *) ASSELF __gc_external;
01351 
01352   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
01353   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01354   
01355      READY_TO_RETURN;
01356   }
01357 }
01358 
01359 static Scheme_Object *os_wxGroupBoxOnKillFocus(int n, Scheme_Object *p[]);
01360 
01361 void os_wxGroupBox::OnKillFocus()
01362 {
01363   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
01364   Scheme_Object *v;
01365   Scheme_Object *method INIT_NULLED_OUT;
01366 #ifdef MZ_PRECISE_GC
01367   os_wxGroupBox *sElF = this;
01368 #endif
01369   static void *mcache = 0;
01370 
01371   SETUP_VAR_STACK(5);
01372   VAR_STACK_PUSH(0, method);
01373   VAR_STACK_PUSH(1, sElF);
01374   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
01375   SET_VAR_STACK();
01376 
01377   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxGroupBox_class, "on-kill-focus", &mcache);
01378   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxGroupBoxOnKillFocus)) {
01379     SET_VAR_STACK();
01380     READY_TO_RETURN; ASSELF wxGroupBox::OnKillFocus();
01381   } else {
01382   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01383   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01384   p[0] = (Scheme_Object *) ASSELF __gc_external;
01385 
01386   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
01387   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01388   
01389      READY_TO_RETURN;
01390   }
01391 }
01392 
01393 static Scheme_Object *os_wxGroupBoxOnDropFile(int n,  Scheme_Object *p[])
01394 {
01395   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01396   REMEMBER_VAR_STACK();
01397   objscheme_check_valid(os_wxGroupBox_class, "on-drop-file in group-box%", n, p);
01398   epathname x0 INIT_NULLED_OUT;
01399 
01400   SETUP_VAR_STACK_REMEMBERED(2);
01401   VAR_STACK_PUSH(0, p);
01402   VAR_STACK_PUSH(1, x0);
01403 
01404   
01405   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in group-box%"));
01406 
01407   
01408   if (((Scheme_Class_Object *)p[0])->primflag)
01409     WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->wxGroupBox::OnDropFile(x0));
01410   else
01411     WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
01412 
01413   
01414   
01415   READY_TO_RETURN;
01416   return scheme_void;
01417 }
01418 
01419 static Scheme_Object *os_wxGroupBoxPreOnEvent(int n,  Scheme_Object *p[])
01420 {
01421   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01422   REMEMBER_VAR_STACK();
01423   Bool r;
01424   objscheme_check_valid(os_wxGroupBox_class, "pre-on-event in group-box%", n, p);
01425   class wxWindow* x0 INIT_NULLED_OUT;
01426   class wxMouseEvent* x1 INIT_NULLED_OUT;
01427 
01428   SETUP_VAR_STACK_REMEMBERED(3);
01429   VAR_STACK_PUSH(0, p);
01430   VAR_STACK_PUSH(1, x0);
01431   VAR_STACK_PUSH(2, x1);
01432 
01433   
01434   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in group-box%", 0));
01435   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in group-box%", 0));
01436 
01437   
01438   if (((Scheme_Class_Object *)p[0])->primflag)
01439     r = WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
01440   else
01441     r = WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
01442 
01443   
01444   
01445   READY_TO_RETURN;
01446   return (r ? scheme_true : scheme_false);
01447 }
01448 
01449 static Scheme_Object *os_wxGroupBoxPreOnChar(int n,  Scheme_Object *p[])
01450 {
01451   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01452   REMEMBER_VAR_STACK();
01453   Bool r;
01454   objscheme_check_valid(os_wxGroupBox_class, "pre-on-char in group-box%", n, p);
01455   class wxWindow* x0 INIT_NULLED_OUT;
01456   class wxKeyEvent* x1 INIT_NULLED_OUT;
01457 
01458   SETUP_VAR_STACK_REMEMBERED(3);
01459   VAR_STACK_PUSH(0, p);
01460   VAR_STACK_PUSH(1, x0);
01461   VAR_STACK_PUSH(2, x1);
01462 
01463   
01464   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in group-box%", 0));
01465   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in group-box%", 0));
01466 
01467   
01468   if (((Scheme_Class_Object *)p[0])->primflag)
01469     r = WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
01470   else
01471     r = WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
01472 
01473   
01474   
01475   READY_TO_RETURN;
01476   return (r ? scheme_true : scheme_false);
01477 }
01478 
01479 static Scheme_Object *os_wxGroupBoxOnSize(int n,  Scheme_Object *p[])
01480 {
01481   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01482   REMEMBER_VAR_STACK();
01483   objscheme_check_valid(os_wxGroupBox_class, "on-size in group-box%", n, p);
01484   int x0;
01485   int x1;
01486 
01487   SETUP_VAR_STACK_REMEMBERED(1);
01488   VAR_STACK_PUSH(0, p);
01489 
01490   
01491   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in group-box%"));
01492   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in group-box%"));
01493 
01494   
01495   if (((Scheme_Class_Object *)p[0])->primflag)
01496     WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->wxGroupBox::OnSize(x0, x1));
01497   else
01498     WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
01499 
01500   
01501   
01502   READY_TO_RETURN;
01503   return scheme_void;
01504 }
01505 
01506 static Scheme_Object *os_wxGroupBoxOnSetFocus(int n,  Scheme_Object *p[])
01507 {
01508   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01509   REMEMBER_VAR_STACK();
01510   objscheme_check_valid(os_wxGroupBox_class, "on-set-focus in group-box%", n, p);
01511 
01512   SETUP_VAR_STACK_REMEMBERED(1);
01513   VAR_STACK_PUSH(0, p);
01514 
01515   
01516 
01517   
01518   if (((Scheme_Class_Object *)p[0])->primflag)
01519     WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->wxGroupBox::OnSetFocus());
01520   else
01521     WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
01522 
01523   
01524   
01525   READY_TO_RETURN;
01526   return scheme_void;
01527 }
01528 
01529 static Scheme_Object *os_wxGroupBoxOnKillFocus(int n,  Scheme_Object *p[])
01530 {
01531   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01532   REMEMBER_VAR_STACK();
01533   objscheme_check_valid(os_wxGroupBox_class, "on-kill-focus in group-box%", n, p);
01534 
01535   SETUP_VAR_STACK_REMEMBERED(1);
01536   VAR_STACK_PUSH(0, p);
01537 
01538   
01539 
01540   
01541   if (((Scheme_Class_Object *)p[0])->primflag)
01542     WITH_VAR_STACK(((os_wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->wxGroupBox::OnKillFocus());
01543   else
01544     WITH_VAR_STACK(((wxGroupBox *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
01545 
01546   
01547   
01548   READY_TO_RETURN;
01549   return scheme_void;
01550 }
01551 
01552 static Scheme_Object *os_wxGroupBox_ConstructScheme(int n,  Scheme_Object *p[])
01553 {
01554   SETUP_PRE_VAR_STACK(1);
01555   PRE_VAR_STACK_PUSH(0, p);
01556   os_wxGroupBox *realobj INIT_NULLED_OUT;
01557   REMEMBER_VAR_STACK();
01558   class wxPanel* x0 INIT_NULLED_OUT;
01559   nstring x1 INIT_NULLED_OUT;
01560   int x2;
01561   class wxFont* x3 INIT_NULLED_OUT;
01562 
01563   SETUP_VAR_STACK_PRE_REMEMBERED(5);
01564   VAR_STACK_PUSH(0, p);
01565   VAR_STACK_PUSH(1, realobj);
01566   VAR_STACK_PUSH(2, x0);
01567   VAR_STACK_PUSH(3, x1);
01568   VAR_STACK_PUSH(4, x3);
01569 
01570   
01571   if ((n < (POFFSET+2)) || (n > (POFFSET+4))) 
01572     WITH_VAR_STACK(scheme_wrong_count_m("initialization in group-box%", POFFSET+2, POFFSET+4, n, p, 1));
01573   x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in group-box%", 0));
01574   x1 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+1], "initialization in group-box%"));
01575   if (n > (POFFSET+2)) {
01576     x2 = WITH_VAR_STACK(unbundle_symset_tabStyle(p[POFFSET+2], "initialization in group-box%"));
01577   } else
01578     x2 = 0;
01579   if (n > (POFFSET+3)) {
01580     x3 = WITH_VAR_STACK(objscheme_unbundle_wxFont(p[POFFSET+3], "initialization in group-box%", 1));
01581   } else
01582     x3 = NULL;
01583 
01584   
01585   realobj = WITH_VAR_STACK(new os_wxGroupBox CONSTRUCTOR_ARGS((x0, x1, x2, x3)));
01586 #ifdef MZ_PRECISE_GC
01587   WITH_VAR_STACK(realobj->gcInit_wxGroupBox(x0, x1, x2, x3));
01588 #endif
01589   realobj->__gc_external = (void *)p[0];
01590   
01591   
01592   READY_TO_RETURN;
01593   ((Scheme_Class_Object *)p[0])->primdata = realobj;
01594   ((Scheme_Class_Object *)p[0])->primflag = 1;
01595   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
01596   return scheme_void;
01597 }
01598 
01599 void objscheme_setup_wxGroupBox(Scheme_Env *env)
01600 {
01601   SETUP_VAR_STACK(1);
01602   VAR_STACK_PUSH(0, env);
01603 
01604   wxREGGLOB(os_wxGroupBox_class);
01605 
01606   os_wxGroupBox_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "group-box%", "item%", (Scheme_Method_Prim *)os_wxGroupBox_ConstructScheme, 6));
01607 
01608   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxGroupBoxOnDropFile, 1, 1));
01609   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxGroupBoxPreOnEvent, 2, 2));
01610   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxGroupBoxPreOnChar, 2, 2));
01611   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "on-size" " method", (Scheme_Method_Prim *)os_wxGroupBoxOnSize, 2, 2));
01612   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxGroupBoxOnSetFocus, 0, 0));
01613   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxGroupBox_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxGroupBoxOnKillFocus, 0, 0));
01614 
01615 
01616   WITH_VAR_STACK(scheme_made_class(os_wxGroupBox_class));
01617 
01618 
01619   READY_TO_RETURN;
01620 }
01621 
01622 int objscheme_istype_wxGroupBox(Scheme_Object *obj, const char *stop, int nullOK)
01623 {
01624   REMEMBER_VAR_STACK();
01625   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01626   if (objscheme_is_a(obj,  os_wxGroupBox_class))
01627     return 1;
01628   else {
01629     if (!stop)
01630        return 0;
01631     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "group-box% object or " XC_NULL_STR: "group-box% object", -1, 0, &obj));
01632     return 0;
01633   }
01634 }
01635 
01636 Scheme_Object *objscheme_bundle_wxGroupBox(class wxGroupBox *realobj)
01637 {
01638   Scheme_Class_Object *obj INIT_NULLED_OUT;
01639   Scheme_Object *sobj INIT_NULLED_OUT;
01640 
01641   if (!realobj) return XC_SCHEME_NULL;
01642 
01643   if (realobj->__gc_external)
01644     return (Scheme_Object *)realobj->__gc_external;
01645 
01646   SETUP_VAR_STACK(2);
01647   VAR_STACK_PUSH(0, obj);
01648   VAR_STACK_PUSH(1, realobj);
01649 
01650   if ((sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01651     { READY_TO_RETURN; return sobj; }
01652   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxGroupBox_class));
01653 
01654   obj->primdata = realobj;
01655   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01656   obj->primflag = 0;
01657 
01658   realobj->__gc_external = (void *)obj;
01659   READY_TO_RETURN;
01660   return (Scheme_Object *)obj;
01661 }
01662 
01663 class wxGroupBox *objscheme_unbundle_wxGroupBox(Scheme_Object *obj, const char *where, int nullOK)
01664 {
01665   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01666 
01667   REMEMBER_VAR_STACK();
01668 
01669   (void)objscheme_istype_wxGroupBox(obj, where, nullOK);
01670   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01671   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01672   if (o->primflag)
01673     return (os_wxGroupBox *)o->primdata;
01674   else
01675     return (wxGroupBox *)o->primdata;
01676 }
01677