Back to index

plt-scheme  4.2.1
wxs_fram.cxx
Go to the documentation of this file.
00001 /* DO NOT EDIT THIS FILE. */
00002 /* This file was generated by xctocc from "wxs_fram.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_frame.h"
00013 #include "wx_gdi.h"
00014 
00015 
00016 
00017 
00018 #ifdef wx_x
00019 # define BM_SELECTED(map) ((map)->selectedTo)
00020 #endif
00021 #if defined(wx_mac) || defined(wx_msw)
00022 # define BM_SELECTED(map) ((map)->selectedInto)
00023 #endif
00024 # define BM_IN_USE(map) ((map)->selectedIntoDC)
00025 
00026 
00027 
00028 
00029 #define ESCAPE_NO_RET_VAL /*empty*/
00030 
00031 
00032 #include "wxscheme.h"
00033 #include "wxs_fram.h"
00034 
00035 #ifdef MZ_PRECISE_GC
00036 START_XFORM_SKIP;
00037 #endif
00038 
00039 #ifdef wx_xt
00040 #define GET_THE_MENU_BAR(f) (f)->GetMenuBar()
00041 #else
00042 #define GET_THE_MENU_BAR(f) (f)->wx_menu_bar
00043 #endif
00044 
00045 #ifdef wx_motif
00046 #define wxALLOW_AUTO_RESIZE wxPUSH_PIN
00047 #else
00048 #define wxALLOW_AUTO_RESIZE 0
00049 #endif
00050 
00051 
00052 
00053 extern void *wxsCheckEventspace(char *);
00054 
00055 static wxMenuBar *GetTheMenuBar(wxFrame *f)
00056 {
00057   return GET_THE_MENU_BAR(f);
00058 }
00059 
00060 #ifndef wxTOOLBAR_BUTTON
00061 # define wxTOOLBAR_BUTTON 0
00062 #endif
00063 #ifndef wxHIDE_MENUBAR
00064 # define wxHIDE_MENUBAR 0
00065 #endif
00066 #ifndef wxMETAL
00067 # define wxMETAL 0
00068 #endif
00069 
00070 static Scheme_Object *frameStyle_wxNO_CAPTION_sym = NULL;
00071 static Scheme_Object *frameStyle_wxMDI_PARENT_sym = NULL;
00072 static Scheme_Object *frameStyle_wxMDI_CHILD_sym = NULL;
00073 static Scheme_Object *frameStyle_wxNO_SYSTEM_MENU_sym = NULL;
00074 static Scheme_Object *frameStyle_wxNO_RESIZE_BORDER_sym = NULL;
00075 static Scheme_Object *frameStyle_wxTOOLBAR_BUTTON_sym = NULL;
00076 static Scheme_Object *frameStyle_wxHIDE_MENUBAR_sym = NULL;
00077 static Scheme_Object *frameStyle_wxMETAL_sym = NULL;
00078 static Scheme_Object *frameStyle_wxFLOAT_FRAME_sym = NULL;
00079 
00080 static void init_symset_frameStyle(void) {
00081   REMEMBER_VAR_STACK();
00082   wxREGGLOB(frameStyle_wxNO_CAPTION_sym);
00083   frameStyle_wxNO_CAPTION_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-caption"));
00084   wxREGGLOB(frameStyle_wxMDI_PARENT_sym);
00085   frameStyle_wxMDI_PARENT_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("mdi-parent"));
00086   wxREGGLOB(frameStyle_wxMDI_CHILD_sym);
00087   frameStyle_wxMDI_CHILD_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("mdi-child"));
00088   wxREGGLOB(frameStyle_wxNO_SYSTEM_MENU_sym);
00089   frameStyle_wxNO_SYSTEM_MENU_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-system-menu"));
00090   wxREGGLOB(frameStyle_wxNO_RESIZE_BORDER_sym);
00091   frameStyle_wxNO_RESIZE_BORDER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-resize-border"));
00092   wxREGGLOB(frameStyle_wxTOOLBAR_BUTTON_sym);
00093   frameStyle_wxTOOLBAR_BUTTON_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("toolbar-button"));
00094   wxREGGLOB(frameStyle_wxHIDE_MENUBAR_sym);
00095   frameStyle_wxHIDE_MENUBAR_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("hide-menu-bar"));
00096   wxREGGLOB(frameStyle_wxMETAL_sym);
00097   frameStyle_wxMETAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("metal"));
00098   wxREGGLOB(frameStyle_wxFLOAT_FRAME_sym);
00099   frameStyle_wxFLOAT_FRAME_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("float"));
00100 }
00101 
00102 static int unbundle_symset_frameStyle(Scheme_Object *v, const char *where) {
00103   SETUP_VAR_STACK(1);
00104   VAR_STACK_PUSH(0, v);
00105   if (!frameStyle_wxFLOAT_FRAME_sym) WITH_VAR_STACK(init_symset_frameStyle());
00106   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00107   long result = 0;
00108   while (SCHEME_PAIRP(l)) {
00109   i = SCHEME_CAR(l);
00110   if (0) { }
00111   else if (i == frameStyle_wxNO_CAPTION_sym) { result = result | wxNO_CAPTION; }
00112   else if (i == frameStyle_wxMDI_PARENT_sym) { result = result | wxMDI_PARENT; }
00113   else if (i == frameStyle_wxMDI_CHILD_sym) { result = result | wxMDI_CHILD; }
00114   else if (i == frameStyle_wxNO_SYSTEM_MENU_sym) { result = result | wxNO_SYSTEM_MENU; }
00115   else if (i == frameStyle_wxNO_RESIZE_BORDER_sym) { result = result | wxNO_RESIZE_BORDER; }
00116   else if (i == frameStyle_wxTOOLBAR_BUTTON_sym) { result = result | wxTOOLBAR_BUTTON; }
00117   else if (i == frameStyle_wxHIDE_MENUBAR_sym) { result = result | wxHIDE_MENUBAR; }
00118   else if (i == frameStyle_wxMETAL_sym) { result = result | wxMETAL; }
00119   else if (i == frameStyle_wxFLOAT_FRAME_sym) { result = result | wxFLOAT_FRAME; }
00120   else { break; } 
00121   l = SCHEME_CDR(l);
00122   }
00123   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00124   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "frameStyle symbol list", -1, 0, &v));
00125   READY_TO_RETURN;
00126   return 0;
00127 }
00128 
00129 
00130 static Scheme_Object *iconKind_0_sym = NULL;
00131 static Scheme_Object *iconKind_1_sym = NULL;
00132 static Scheme_Object *iconKind_2_sym = NULL;
00133 
00134 static void init_symset_iconKind(void) {
00135   REMEMBER_VAR_STACK();
00136   wxREGGLOB(iconKind_0_sym);
00137   iconKind_0_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("both"));
00138   wxREGGLOB(iconKind_1_sym);
00139   iconKind_1_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("small"));
00140   wxREGGLOB(iconKind_2_sym);
00141   iconKind_2_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("large"));
00142 }
00143 
00144 static int unbundle_symset_iconKind(Scheme_Object *v, const char *where) {
00145   SETUP_VAR_STACK(1);
00146   VAR_STACK_PUSH(0, v);
00147   if (!iconKind_2_sym) WITH_VAR_STACK(init_symset_iconKind());
00148   if (0) { }
00149   else if (v == iconKind_0_sym) { READY_TO_RETURN; return 0; }
00150   else if (v == iconKind_1_sym) { READY_TO_RETURN; return 1; }
00151   else if (v == iconKind_2_sym) { READY_TO_RETURN; return 2; }
00152   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "iconKind symbol", -1, 0, &v));
00153   READY_TO_RETURN;
00154   return 0;
00155 }
00156 
00157 
00158 #ifdef wx_msw
00159 # define XTMAC_UNUSED(x) x
00160 #else
00161 # define XTMAC_UNUSED(x) 
00162 #endif
00163 
00164 static void frameMenu(wxFrame *XTMAC_UNUSED(f))
00165 {
00166 #ifdef wx_msw
00167   f->SystemMenu();
00168 #endif
00169 }
00170 
00171 static void DesignateRootFrame(wxFrame *f)
00172 {
00173 #ifdef wx_mac
00174   f->DesignateRootFrame();
00175 #endif
00176 }
00177 
00178 
00179 
00180 
00181 
00182 
00183 
00184 
00185 
00186 
00187 
00188 
00189 
00190 
00191 
00192 
00193 class os_wxFrame : public wxFrame {
00194  public:
00195 
00196   os_wxFrame CONSTRUCTOR_ARGS((class wxFrame* x0, string x1, int x2 = -1, int x3 = -1, int x4 = -1, int x5 = -1, int x6 = 0, string x7 = "frame"));
00197   ~os_wxFrame();
00198   void OnDropFile(epathname x0);
00199   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
00200   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
00201   void OnSize(int x0, int x1);
00202   void OnSetFocus();
00203   void OnKillFocus();
00204   void OnToolbarButton();
00205   void OnMenuClick();
00206   void OnMenuCommand(ExactLong x0);
00207   void OnMDIActivate(Bool x0);
00208   Bool OnClose();
00209   void OnActivate(Bool x0);
00210 #ifdef MZ_PRECISE_GC
00211   void gcMark();
00212   void gcFixup();
00213 #endif
00214 };
00215 
00216 #ifdef MZ_PRECISE_GC
00217 void os_wxFrame::gcMark() {
00218   wxFrame::gcMark();
00219 }
00220 void os_wxFrame::gcFixup() {
00221   wxFrame::gcFixup();
00222 }
00223 #endif
00224 
00225 static Scheme_Object *os_wxFrame_class;
00226 
00227 os_wxFrame::os_wxFrame CONSTRUCTOR_ARGS((class wxFrame* x0, string x1, int x2, int x3, int x4, int x5, int x6, string x7))
00228 CONSTRUCTOR_INIT(: wxFrame(x0, x1, x2, x3, x4, x5, x6, x7))
00229 {
00230 }
00231 
00232 os_wxFrame::~os_wxFrame()
00233 {
00234     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00235 }
00236 
00237 static Scheme_Object *os_wxFrameOnDropFile(int n, Scheme_Object *p[]);
00238 
00239 void os_wxFrame::OnDropFile(epathname x0)
00240 {
00241   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00242   Scheme_Object *v;
00243   Scheme_Object *method INIT_NULLED_OUT;
00244 #ifdef MZ_PRECISE_GC
00245   os_wxFrame *sElF = this;
00246 #endif
00247   static void *mcache = 0;
00248 
00249   SETUP_VAR_STACK(6);
00250   VAR_STACK_PUSH(0, method);
00251   VAR_STACK_PUSH(1, sElF);
00252   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00253   VAR_STACK_PUSH(5, x0);
00254   SET_VAR_STACK();
00255 
00256   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-drop-file", &mcache);
00257   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnDropFile)) {
00258     SET_VAR_STACK();
00259     READY_TO_RETURN; ASSELF wxFrame::OnDropFile(x0);
00260   } else {
00261   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00262   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
00263   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00264   p[0] = (Scheme_Object *) ASSELF __gc_external;
00265 
00266   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00267   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00268   
00269      READY_TO_RETURN;
00270   }
00271 }
00272 
00273 static Scheme_Object *os_wxFramePreOnEvent(int n, Scheme_Object *p[]);
00274 
00275 Bool os_wxFrame::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
00276 {
00277   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00278   Scheme_Object *v;
00279   Scheme_Object *method INIT_NULLED_OUT;
00280 #ifdef MZ_PRECISE_GC
00281   os_wxFrame *sElF = this;
00282 #endif
00283   static void *mcache = 0;
00284 
00285   SETUP_VAR_STACK(7);
00286   VAR_STACK_PUSH(0, method);
00287   VAR_STACK_PUSH(1, sElF);
00288   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00289   VAR_STACK_PUSH(5, x0);
00290   VAR_STACK_PUSH(6, x1);
00291   SET_VAR_STACK();
00292 
00293   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "pre-on-event", &mcache);
00294   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFramePreOnEvent)) {
00295     SET_VAR_STACK();
00296     return FALSE;
00297   } else {
00298   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00299   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00300   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
00301   ESCAPE_BLOCK(1)
00302   p[0] = (Scheme_Object *) ASSELF __gc_external;
00303 
00304   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00305   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00306   
00307   {
00308      Bool resval;
00309      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in frame%"", extracting return value"));
00310      READY_TO_RETURN;
00311      return resval;
00312   }
00313   }
00314 }
00315 
00316 static Scheme_Object *os_wxFramePreOnChar(int n, Scheme_Object *p[]);
00317 
00318 Bool os_wxFrame::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
00319 {
00320   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00321   Scheme_Object *v;
00322   Scheme_Object *method INIT_NULLED_OUT;
00323 #ifdef MZ_PRECISE_GC
00324   os_wxFrame *sElF = this;
00325 #endif
00326   static void *mcache = 0;
00327 
00328   SETUP_VAR_STACK(7);
00329   VAR_STACK_PUSH(0, method);
00330   VAR_STACK_PUSH(1, sElF);
00331   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00332   VAR_STACK_PUSH(5, x0);
00333   VAR_STACK_PUSH(6, x1);
00334   SET_VAR_STACK();
00335 
00336   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "pre-on-char", &mcache);
00337   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFramePreOnChar)) {
00338     SET_VAR_STACK();
00339     return FALSE;
00340   } else {
00341   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00342   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00343   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
00344   ESCAPE_BLOCK(1)
00345   p[0] = (Scheme_Object *) ASSELF __gc_external;
00346 
00347   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00348   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00349   
00350   {
00351      Bool resval;
00352      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in frame%"", extracting return value"));
00353      READY_TO_RETURN;
00354      return resval;
00355   }
00356   }
00357 }
00358 
00359 static Scheme_Object *os_wxFrameOnSize(int n, Scheme_Object *p[]);
00360 
00361 void os_wxFrame::OnSize(int x0, int x1)
00362 {
00363   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00364   Scheme_Object *v;
00365   Scheme_Object *method INIT_NULLED_OUT;
00366 #ifdef MZ_PRECISE_GC
00367   os_wxFrame *sElF = this;
00368 #endif
00369   static void *mcache = 0;
00370 
00371   SETUP_VAR_STACK(5);
00372   VAR_STACK_PUSH(0, method);
00373   VAR_STACK_PUSH(1, sElF);
00374   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00375   SET_VAR_STACK();
00376 
00377   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-size", &mcache);
00378   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnSize)) {
00379     SET_VAR_STACK();
00380     READY_TO_RETURN; ASSELF wxFrame::OnSize(x0, x1);
00381   } else {
00382   
00383   p[POFFSET+0] = scheme_make_integer(x0);
00384   p[POFFSET+1] = scheme_make_integer(x1);
00385   
00386   p[0] = (Scheme_Object *) ASSELF __gc_external;
00387 
00388   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00389   
00390   
00391      READY_TO_RETURN;
00392   }
00393 }
00394 
00395 static Scheme_Object *os_wxFrameOnSetFocus(int n, Scheme_Object *p[]);
00396 
00397 void os_wxFrame::OnSetFocus()
00398 {
00399   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00400   Scheme_Object *v;
00401   Scheme_Object *method INIT_NULLED_OUT;
00402 #ifdef MZ_PRECISE_GC
00403   os_wxFrame *sElF = this;
00404 #endif
00405   static void *mcache = 0;
00406 
00407   SETUP_VAR_STACK(5);
00408   VAR_STACK_PUSH(0, method);
00409   VAR_STACK_PUSH(1, sElF);
00410   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00411   SET_VAR_STACK();
00412 
00413   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-set-focus", &mcache);
00414   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnSetFocus)) {
00415     SET_VAR_STACK();
00416     READY_TO_RETURN; ASSELF wxFrame::OnSetFocus();
00417   } else {
00418   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00419   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00420   p[0] = (Scheme_Object *) ASSELF __gc_external;
00421 
00422   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00423   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00424   
00425      READY_TO_RETURN;
00426   }
00427 }
00428 
00429 static Scheme_Object *os_wxFrameOnKillFocus(int n, Scheme_Object *p[]);
00430 
00431 void os_wxFrame::OnKillFocus()
00432 {
00433   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00434   Scheme_Object *v;
00435   Scheme_Object *method INIT_NULLED_OUT;
00436 #ifdef MZ_PRECISE_GC
00437   os_wxFrame *sElF = this;
00438 #endif
00439   static void *mcache = 0;
00440 
00441   SETUP_VAR_STACK(5);
00442   VAR_STACK_PUSH(0, method);
00443   VAR_STACK_PUSH(1, sElF);
00444   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00445   SET_VAR_STACK();
00446 
00447   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-kill-focus", &mcache);
00448   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnKillFocus)) {
00449     SET_VAR_STACK();
00450     READY_TO_RETURN; ASSELF wxFrame::OnKillFocus();
00451   } else {
00452   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00453   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00454   p[0] = (Scheme_Object *) ASSELF __gc_external;
00455 
00456   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00457   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00458   
00459      READY_TO_RETURN;
00460   }
00461 }
00462 
00463 static Scheme_Object *os_wxFrameOnToolbarButton(int n, Scheme_Object *p[]);
00464 
00465 void os_wxFrame::OnToolbarButton()
00466 {
00467   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00468   Scheme_Object *v;
00469   Scheme_Object *method INIT_NULLED_OUT;
00470 #ifdef MZ_PRECISE_GC
00471   os_wxFrame *sElF = this;
00472 #endif
00473   static void *mcache = 0;
00474 
00475   SETUP_VAR_STACK(5);
00476   VAR_STACK_PUSH(0, method);
00477   VAR_STACK_PUSH(1, sElF);
00478   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00479   SET_VAR_STACK();
00480 
00481   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-toolbar-click", &mcache);
00482   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnToolbarButton)) {
00483     SET_VAR_STACK();
00484     READY_TO_RETURN; ASSELF wxFrame::OnToolbarButton();
00485   } else {
00486   
00487   
00488   p[0] = (Scheme_Object *) ASSELF __gc_external;
00489 
00490   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00491   
00492   
00493      READY_TO_RETURN;
00494   }
00495 }
00496 
00497 static Scheme_Object *os_wxFrameOnMenuClick(int n, Scheme_Object *p[]);
00498 
00499 void os_wxFrame::OnMenuClick()
00500 {
00501   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00502   Scheme_Object *v;
00503   Scheme_Object *method INIT_NULLED_OUT;
00504 #ifdef MZ_PRECISE_GC
00505   os_wxFrame *sElF = this;
00506 #endif
00507   static void *mcache = 0;
00508 
00509   SETUP_VAR_STACK(5);
00510   VAR_STACK_PUSH(0, method);
00511   VAR_STACK_PUSH(1, sElF);
00512   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00513   SET_VAR_STACK();
00514 
00515   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-menu-click", &mcache);
00516   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnMenuClick)) {
00517     SET_VAR_STACK();
00518     READY_TO_RETURN; ASSELF wxFrame::OnMenuClick();
00519   } else {
00520   
00521   
00522   p[0] = (Scheme_Object *) ASSELF __gc_external;
00523 
00524   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00525   
00526   
00527      READY_TO_RETURN;
00528   }
00529 }
00530 
00531 static Scheme_Object *os_wxFrameOnMenuCommand(int n, Scheme_Object *p[]);
00532 
00533 void os_wxFrame::OnMenuCommand(ExactLong x0)
00534 {
00535   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00536   Scheme_Object *v;
00537   Scheme_Object *method INIT_NULLED_OUT;
00538 #ifdef MZ_PRECISE_GC
00539   os_wxFrame *sElF = this;
00540 #endif
00541   static void *mcache = 0;
00542 
00543   SETUP_VAR_STACK(5);
00544   VAR_STACK_PUSH(0, method);
00545   VAR_STACK_PUSH(1, sElF);
00546   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00547   SET_VAR_STACK();
00548 
00549   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-menu-command", &mcache);
00550   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnMenuCommand)) {
00551     SET_VAR_STACK();
00552     READY_TO_RETURN; ASSELF wxFrame::OnMenuCommand(x0);
00553   } else {
00554   
00555   p[POFFSET+0] = WITH_VAR_STACK(scheme_make_integer_value(x0));
00556   
00557   p[0] = (Scheme_Object *) ASSELF __gc_external;
00558 
00559   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00560   
00561   
00562      READY_TO_RETURN;
00563   }
00564 }
00565 
00566 static Scheme_Object *os_wxFrameOnMDIActivate(int n, Scheme_Object *p[]);
00567 
00568 void os_wxFrame::OnMDIActivate(Bool x0)
00569 {
00570   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00571   Scheme_Object *v;
00572   Scheme_Object *method INIT_NULLED_OUT;
00573 #ifdef MZ_PRECISE_GC
00574   os_wxFrame *sElF = this;
00575 #endif
00576   static void *mcache = 0;
00577 
00578   SETUP_VAR_STACK(5);
00579   VAR_STACK_PUSH(0, method);
00580   VAR_STACK_PUSH(1, sElF);
00581   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00582   SET_VAR_STACK();
00583 
00584   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-mdi-activate", &mcache);
00585   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnMDIActivate)) {
00586     SET_VAR_STACK();
00587     READY_TO_RETURN; ASSELF wxFrame::OnMDIActivate(x0);
00588   } else {
00589   
00590   p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
00591   
00592   p[0] = (Scheme_Object *) ASSELF __gc_external;
00593 
00594   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00595   
00596   
00597      READY_TO_RETURN;
00598   }
00599 }
00600 
00601 static Scheme_Object *os_wxFrameOnClose(int n, Scheme_Object *p[]);
00602 
00603 Bool os_wxFrame::OnClose()
00604 {
00605   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00606   Scheme_Object *v;
00607   Scheme_Object *method INIT_NULLED_OUT;
00608 #ifdef MZ_PRECISE_GC
00609   os_wxFrame *sElF = this;
00610 #endif
00611   static void *mcache = 0;
00612 
00613   SETUP_VAR_STACK(5);
00614   VAR_STACK_PUSH(0, method);
00615   VAR_STACK_PUSH(1, sElF);
00616   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00617   SET_VAR_STACK();
00618 
00619   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-close", &mcache);
00620   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnClose)) {
00621     SET_VAR_STACK();
00622     READY_TO_RETURN; return ASSELF wxFrame::OnClose();
00623   } else {
00624   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00625   ESCAPE_BLOCK(0)
00626   p[0] = (Scheme_Object *) ASSELF __gc_external;
00627 
00628   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00629   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00630   
00631   {
00632      Bool resval;
00633      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "on-close in frame%"", extracting return value"));
00634      READY_TO_RETURN;
00635      return resval;
00636   }
00637   }
00638 }
00639 
00640 static Scheme_Object *os_wxFrameOnActivate(int n, Scheme_Object *p[]);
00641 
00642 void os_wxFrame::OnActivate(Bool x0)
00643 {
00644   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00645   Scheme_Object *v;
00646   Scheme_Object *method INIT_NULLED_OUT;
00647 #ifdef MZ_PRECISE_GC
00648   os_wxFrame *sElF = this;
00649 #endif
00650   static void *mcache = 0;
00651 
00652   SETUP_VAR_STACK(5);
00653   VAR_STACK_PUSH(0, method);
00654   VAR_STACK_PUSH(1, sElF);
00655   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00656   SET_VAR_STACK();
00657 
00658   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxFrame_class, "on-activate", &mcache);
00659   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxFrameOnActivate)) {
00660     SET_VAR_STACK();
00661     READY_TO_RETURN; ASSELF wxFrame::OnActivate(x0);
00662   } else {
00663   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00664   p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
00665   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00666   p[0] = (Scheme_Object *) ASSELF __gc_external;
00667 
00668   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00669   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00670   
00671      READY_TO_RETURN;
00672   }
00673 }
00674 
00675 static Scheme_Object *os_wxFrameOnDropFile(int n,  Scheme_Object *p[])
00676 {
00677   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00678   REMEMBER_VAR_STACK();
00679   objscheme_check_valid(os_wxFrame_class, "on-drop-file in frame%", n, p);
00680   epathname x0 INIT_NULLED_OUT;
00681 
00682   SETUP_VAR_STACK_REMEMBERED(2);
00683   VAR_STACK_PUSH(0, p);
00684   VAR_STACK_PUSH(1, x0);
00685 
00686   
00687   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in frame%"));
00688 
00689   
00690   if (((Scheme_Class_Object *)p[0])->primflag)
00691     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnDropFile(x0));
00692   else
00693     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
00694 
00695   
00696   
00697   READY_TO_RETURN;
00698   return scheme_void;
00699 }
00700 
00701 static Scheme_Object *os_wxFramePreOnEvent(int n,  Scheme_Object *p[])
00702 {
00703   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00704   REMEMBER_VAR_STACK();
00705   Bool r;
00706   objscheme_check_valid(os_wxFrame_class, "pre-on-event in frame%", n, p);
00707   class wxWindow* x0 INIT_NULLED_OUT;
00708   class wxMouseEvent* x1 INIT_NULLED_OUT;
00709 
00710   SETUP_VAR_STACK_REMEMBERED(3);
00711   VAR_STACK_PUSH(0, p);
00712   VAR_STACK_PUSH(1, x0);
00713   VAR_STACK_PUSH(2, x1);
00714 
00715   
00716   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in frame%", 0));
00717   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in frame%", 0));
00718 
00719   
00720   if (((Scheme_Class_Object *)p[0])->primflag)
00721     r = WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
00722   else
00723     r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
00724 
00725   
00726   
00727   READY_TO_RETURN;
00728   return (r ? scheme_true : scheme_false);
00729 }
00730 
00731 static Scheme_Object *os_wxFramePreOnChar(int n,  Scheme_Object *p[])
00732 {
00733   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00734   REMEMBER_VAR_STACK();
00735   Bool r;
00736   objscheme_check_valid(os_wxFrame_class, "pre-on-char in frame%", n, p);
00737   class wxWindow* x0 INIT_NULLED_OUT;
00738   class wxKeyEvent* x1 INIT_NULLED_OUT;
00739 
00740   SETUP_VAR_STACK_REMEMBERED(3);
00741   VAR_STACK_PUSH(0, p);
00742   VAR_STACK_PUSH(1, x0);
00743   VAR_STACK_PUSH(2, x1);
00744 
00745   
00746   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in frame%", 0));
00747   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in frame%", 0));
00748 
00749   
00750   if (((Scheme_Class_Object *)p[0])->primflag)
00751     r = WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
00752   else
00753     r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
00754 
00755   
00756   
00757   READY_TO_RETURN;
00758   return (r ? scheme_true : scheme_false);
00759 }
00760 
00761 static Scheme_Object *os_wxFrameOnSize(int n,  Scheme_Object *p[])
00762 {
00763   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00764   REMEMBER_VAR_STACK();
00765   objscheme_check_valid(os_wxFrame_class, "on-size in frame%", n, p);
00766   int x0;
00767   int x1;
00768 
00769   SETUP_VAR_STACK_REMEMBERED(1);
00770   VAR_STACK_PUSH(0, p);
00771 
00772   
00773   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in frame%"));
00774   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in frame%"));
00775 
00776   
00777   if (((Scheme_Class_Object *)p[0])->primflag)
00778     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnSize(x0, x1));
00779   else
00780     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
00781 
00782   
00783   
00784   READY_TO_RETURN;
00785   return scheme_void;
00786 }
00787 
00788 static Scheme_Object *os_wxFrameOnSetFocus(int n,  Scheme_Object *p[])
00789 {
00790   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00791   REMEMBER_VAR_STACK();
00792   objscheme_check_valid(os_wxFrame_class, "on-set-focus in frame%", n, p);
00793 
00794   SETUP_VAR_STACK_REMEMBERED(1);
00795   VAR_STACK_PUSH(0, p);
00796 
00797   
00798 
00799   
00800   if (((Scheme_Class_Object *)p[0])->primflag)
00801     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnSetFocus());
00802   else
00803     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
00804 
00805   
00806   
00807   READY_TO_RETURN;
00808   return scheme_void;
00809 }
00810 
00811 static Scheme_Object *os_wxFrameOnKillFocus(int n,  Scheme_Object *p[])
00812 {
00813   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00814   REMEMBER_VAR_STACK();
00815   objscheme_check_valid(os_wxFrame_class, "on-kill-focus in frame%", n, p);
00816 
00817   SETUP_VAR_STACK_REMEMBERED(1);
00818   VAR_STACK_PUSH(0, p);
00819 
00820   
00821 
00822   
00823   if (((Scheme_Class_Object *)p[0])->primflag)
00824     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnKillFocus());
00825   else
00826     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
00827 
00828   
00829   
00830   READY_TO_RETURN;
00831   return scheme_void;
00832 }
00833 
00834 static Scheme_Object *os_wxFrameOnToolbarButton(int n,  Scheme_Object *p[])
00835 {
00836   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00837   REMEMBER_VAR_STACK();
00838   objscheme_check_valid(os_wxFrame_class, "on-toolbar-click in frame%", n, p);
00839 
00840   SETUP_VAR_STACK_REMEMBERED(1);
00841   VAR_STACK_PUSH(0, p);
00842 
00843   
00844 
00845   
00846   if (((Scheme_Class_Object *)p[0])->primflag)
00847     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnToolbarButton());
00848   else
00849     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnToolbarButton());
00850 
00851   
00852   
00853   READY_TO_RETURN;
00854   return scheme_void;
00855 }
00856 
00857 static Scheme_Object *os_wxFrameOnMenuClick(int n,  Scheme_Object *p[])
00858 {
00859   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00860   REMEMBER_VAR_STACK();
00861   objscheme_check_valid(os_wxFrame_class, "on-menu-click in frame%", n, p);
00862 
00863   SETUP_VAR_STACK_REMEMBERED(1);
00864   VAR_STACK_PUSH(0, p);
00865 
00866   
00867 
00868   
00869   if (((Scheme_Class_Object *)p[0])->primflag)
00870     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnMenuClick());
00871   else
00872     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnMenuClick());
00873 
00874   
00875   
00876   READY_TO_RETURN;
00877   return scheme_void;
00878 }
00879 
00880 static Scheme_Object *os_wxFrameOnMenuCommand(int n,  Scheme_Object *p[])
00881 {
00882   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00883   REMEMBER_VAR_STACK();
00884   objscheme_check_valid(os_wxFrame_class, "on-menu-command in frame%", n, p);
00885   ExactLong x0;
00886 
00887   SETUP_VAR_STACK_REMEMBERED(1);
00888   VAR_STACK_PUSH(0, p);
00889 
00890   
00891   x0 = WITH_VAR_STACK(objscheme_unbundle_ExactLong(p[POFFSET+0], "on-menu-command in frame%"));
00892 
00893   
00894   if (((Scheme_Class_Object *)p[0])->primflag)
00895     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnMenuCommand(x0));
00896   else
00897     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnMenuCommand(x0));
00898 
00899   
00900   
00901   READY_TO_RETURN;
00902   return scheme_void;
00903 }
00904 
00905 static Scheme_Object *os_wxFrameOnMDIActivate(int n,  Scheme_Object *p[])
00906 {
00907   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00908   REMEMBER_VAR_STACK();
00909   objscheme_check_valid(os_wxFrame_class, "on-mdi-activate in frame%", n, p);
00910   Bool x0;
00911 
00912   SETUP_VAR_STACK_REMEMBERED(1);
00913   VAR_STACK_PUSH(0, p);
00914 
00915   
00916   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "on-mdi-activate in frame%"));
00917 
00918   
00919   if (((Scheme_Class_Object *)p[0])->primflag)
00920     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnMDIActivate(x0));
00921   else
00922     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnMDIActivate(x0));
00923 
00924   
00925   
00926   READY_TO_RETURN;
00927   return scheme_void;
00928 }
00929 
00930 static Scheme_Object *os_wxFrameEnforceSize(int n,  Scheme_Object *p[])
00931 {
00932   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00933   REMEMBER_VAR_STACK();
00934   objscheme_check_valid(os_wxFrame_class, "enforce-size in frame%", n, p);
00935   int x0;
00936   int x1;
00937   int x2;
00938   int x3;
00939   int x4;
00940   int x5;
00941 
00942   SETUP_VAR_STACK_REMEMBERED(1);
00943   VAR_STACK_PUSH(0, p);
00944 
00945   
00946   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "enforce-size in frame%"));
00947   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "enforce-size in frame%"));
00948   x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "enforce-size in frame%"));
00949   x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "enforce-size in frame%"));
00950   x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "enforce-size in frame%"));
00951   x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "enforce-size in frame%"));
00952 
00953   
00954   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->EnforceSize(x0, x1, x2, x3, x4, x5));
00955 
00956   
00957   
00958   READY_TO_RETURN;
00959   return scheme_void;
00960 }
00961 
00962 static Scheme_Object *os_wxFrameOnClose(int n,  Scheme_Object *p[])
00963 {
00964   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00965   REMEMBER_VAR_STACK();
00966   Bool r;
00967   objscheme_check_valid(os_wxFrame_class, "on-close in frame%", n, p);
00968 
00969   SETUP_VAR_STACK_REMEMBERED(1);
00970   VAR_STACK_PUSH(0, p);
00971 
00972   
00973 
00974   
00975   if (((Scheme_Class_Object *)p[0])->primflag)
00976     r = WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnClose());
00977   else
00978     r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnClose());
00979 
00980   
00981   
00982   READY_TO_RETURN;
00983   return (r ? scheme_true : scheme_false);
00984 }
00985 
00986 static Scheme_Object *os_wxFrameOnActivate(int n,  Scheme_Object *p[])
00987 {
00988   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00989   REMEMBER_VAR_STACK();
00990   objscheme_check_valid(os_wxFrame_class, "on-activate in frame%", n, p);
00991   Bool x0;
00992 
00993   SETUP_VAR_STACK_REMEMBERED(1);
00994   VAR_STACK_PUSH(0, p);
00995 
00996   
00997   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "on-activate in frame%"));
00998 
00999   
01000   if (((Scheme_Class_Object *)p[0])->primflag)
01001     WITH_VAR_STACK(((os_wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->wxFrame::OnActivate(x0));
01002   else
01003     WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->OnActivate(x0));
01004 
01005   
01006   
01007   READY_TO_RETURN;
01008   return scheme_void;
01009 }
01010 
01011 static Scheme_Object *os_wxFrameDesignateRootFrame(int n,  Scheme_Object *p[])
01012 {
01013   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01014   REMEMBER_VAR_STACK();
01015   objscheme_check_valid(os_wxFrame_class, "designate-root-frame in frame%", n, p);
01016 
01017   SETUP_VAR_STACK_REMEMBERED(1);
01018   VAR_STACK_PUSH(0, p);
01019 
01020   
01021 
01022   
01023   WITH_VAR_STACK(DesignateRootFrame(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)));
01024 
01025   
01026   
01027   READY_TO_RETURN;
01028   return scheme_void;
01029 }
01030 
01031 static Scheme_Object *os_wxFrameframeMenu(int n,  Scheme_Object *p[])
01032 {
01033   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01034   REMEMBER_VAR_STACK();
01035   objscheme_check_valid(os_wxFrame_class, "system-menu in frame%", n, p);
01036 
01037   SETUP_VAR_STACK_REMEMBERED(1);
01038   VAR_STACK_PUSH(0, p);
01039 
01040   
01041 
01042   
01043   WITH_VAR_STACK(frameMenu(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)));
01044 
01045   
01046   
01047   READY_TO_RETURN;
01048   return scheme_void;
01049 }
01050 
01051 static Scheme_Object *os_wxFrameSetFrameModified(int n,  Scheme_Object *p[])
01052 {
01053   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01054   REMEMBER_VAR_STACK();
01055   objscheme_check_valid(os_wxFrame_class, "set-modified in frame%", n, p);
01056   Bool x0;
01057 
01058   SETUP_VAR_STACK_REMEMBERED(1);
01059   VAR_STACK_PUSH(0, p);
01060 
01061   
01062   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "set-modified in frame%"));
01063 
01064   
01065   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->SetFrameModified(x0));
01066 
01067   
01068   
01069   READY_TO_RETURN;
01070   return scheme_void;
01071 }
01072 
01073 static Scheme_Object *os_wxFrameCreateStatusLine(int n,  Scheme_Object *p[])
01074 {
01075   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01076   REMEMBER_VAR_STACK();
01077   objscheme_check_valid(os_wxFrame_class, "create-status-line in frame%", n, p);
01078   int x0;
01079   string x1 INIT_NULLED_OUT;
01080 
01081   SETUP_VAR_STACK_REMEMBERED(2);
01082   VAR_STACK_PUSH(0, p);
01083   VAR_STACK_PUSH(1, x1);
01084 
01085   
01086   if (n > (POFFSET+0)) {
01087     x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "create-status-line in frame%"));
01088   } else
01089     x0 = 1;
01090   if (n > (POFFSET+1)) {
01091     x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "create-status-line in frame%"));
01092   } else
01093     x1 = "status_line";
01094 
01095   
01096   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->CreateStatusLine(x0, x1));
01097 
01098   
01099   
01100   READY_TO_RETURN;
01101   return scheme_void;
01102 }
01103 
01104 static Scheme_Object *os_wxFrameIsMaximized(int n,  Scheme_Object *p[])
01105 {
01106   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01107   REMEMBER_VAR_STACK();
01108   Bool r;
01109   objscheme_check_valid(os_wxFrame_class, "is-maximized? in frame%", n, p);
01110 
01111   SETUP_VAR_STACK_REMEMBERED(1);
01112   VAR_STACK_PUSH(0, p);
01113 
01114   
01115 
01116   
01117   r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->IsMaximized());
01118 
01119   
01120   
01121   READY_TO_RETURN;
01122   return (r ? scheme_true : scheme_false);
01123 }
01124 
01125 static Scheme_Object *os_wxFrameMaximize(int n,  Scheme_Object *p[])
01126 {
01127   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01128   REMEMBER_VAR_STACK();
01129   objscheme_check_valid(os_wxFrame_class, "maximize in frame%", n, p);
01130   Bool x0;
01131 
01132   SETUP_VAR_STACK_REMEMBERED(1);
01133   VAR_STACK_PUSH(0, p);
01134 
01135   
01136   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "maximize in frame%"));
01137 
01138   
01139   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->Maximize(x0));
01140 
01141   
01142   
01143   READY_TO_RETURN;
01144   return scheme_void;
01145 }
01146 
01147 static Scheme_Object *os_wxFrameStatusLineExists(int n,  Scheme_Object *p[])
01148 {
01149   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01150   REMEMBER_VAR_STACK();
01151   Bool r;
01152   objscheme_check_valid(os_wxFrame_class, "status-line-exists? in frame%", n, p);
01153 
01154   SETUP_VAR_STACK_REMEMBERED(1);
01155   VAR_STACK_PUSH(0, p);
01156 
01157   
01158 
01159   
01160   r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->StatusLineExists());
01161 
01162   
01163   
01164   READY_TO_RETURN;
01165   return (r ? scheme_true : scheme_false);
01166 }
01167 
01168 static Scheme_Object *os_wxFrameIconized(int n,  Scheme_Object *p[])
01169 {
01170   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01171   REMEMBER_VAR_STACK();
01172   Bool r;
01173   objscheme_check_valid(os_wxFrame_class, "iconized? in frame%", n, p);
01174 
01175   SETUP_VAR_STACK_REMEMBERED(1);
01176   VAR_STACK_PUSH(0, p);
01177 
01178   
01179 
01180   
01181   r = WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->Iconized());
01182 
01183   
01184   
01185   READY_TO_RETURN;
01186   return (r ? scheme_true : scheme_false);
01187 }
01188 
01189 static Scheme_Object *os_wxFrameSetStatusText(int n,  Scheme_Object *p[])
01190 {
01191   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01192   REMEMBER_VAR_STACK();
01193   objscheme_check_valid(os_wxFrame_class, "set-status-text in frame%", n, p);
01194   string x0 INIT_NULLED_OUT;
01195 
01196   SETUP_VAR_STACK_REMEMBERED(2);
01197   VAR_STACK_PUSH(0, p);
01198   VAR_STACK_PUSH(1, x0);
01199 
01200   
01201   x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-status-text in frame%"));
01202 
01203   
01204   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->SetStatusText(x0));
01205 
01206   
01207   
01208   READY_TO_RETURN;
01209   return scheme_void;
01210 }
01211 
01212 static Scheme_Object *os_wxFrameGetTheMenuBar(int n,  Scheme_Object *p[])
01213 {
01214   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01215   REMEMBER_VAR_STACK();
01216   class wxMenuBar* r;
01217   objscheme_check_valid(os_wxFrame_class, "get-menu-bar in frame%", n, p);
01218 
01219   SETUP_VAR_STACK_REMEMBERED(1);
01220   VAR_STACK_PUSH(0, p);
01221 
01222   
01223 
01224   
01225   r = WITH_VAR_STACK(GetTheMenuBar(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)));
01226 
01227   
01228   
01229   READY_TO_RETURN;
01230   return WITH_REMEMBERED_STACK(objscheme_bundle_wxMenuBar(r));
01231 }
01232 
01233 static Scheme_Object *os_wxFrameSetMenuBar(int n,  Scheme_Object *p[])
01234 {
01235   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01236   REMEMBER_VAR_STACK();
01237   objscheme_check_valid(os_wxFrame_class, "set-menu-bar in frame%", n, p);
01238   class wxMenuBar* x0 INIT_NULLED_OUT;
01239 
01240   SETUP_VAR_STACK_REMEMBERED(2);
01241   VAR_STACK_PUSH(0, p);
01242   VAR_STACK_PUSH(1, x0);
01243 
01244   
01245   x0 = WITH_VAR_STACK(objscheme_unbundle_wxMenuBar(p[POFFSET+0], "set-menu-bar in frame%", 0));
01246 
01247   if (GET_THE_MENU_BAR(((wxFrame *)((Scheme_Class_Object *)THEOBJ)->primdata))) return scheme_void;
01248   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->SetMenuBar(x0));
01249 
01250   
01251   
01252   READY_TO_RETURN;
01253   return scheme_void;
01254 }
01255 
01256 static Scheme_Object *os_wxFrameSetIcon(int n,  Scheme_Object *p[])
01257 {
01258   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01259   REMEMBER_VAR_STACK();
01260   objscheme_check_valid(os_wxFrame_class, "set-icon in frame%", n, p);
01261   class wxBitmap* x0 INIT_NULLED_OUT;
01262   class wxBitmap* x1 INIT_NULLED_OUT;
01263   int x2;
01264 
01265   SETUP_VAR_STACK_REMEMBERED(3);
01266   VAR_STACK_PUSH(0, p);
01267   VAR_STACK_PUSH(1, x0);
01268   VAR_STACK_PUSH(2, x1);
01269 
01270   
01271   x0 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+0], "set-icon in frame%", 0));
01272   if (n > (POFFSET+1)) {
01273     x1 = WITH_VAR_STACK(objscheme_unbundle_wxBitmap(p[POFFSET+1], "set-icon in frame%", 1));
01274   } else
01275     x1 = NULL;
01276   if (n > (POFFSET+2)) {
01277     x2 = WITH_VAR_STACK(unbundle_symset_iconKind(p[POFFSET+2], "set-icon in frame%"));
01278   } else
01279     x2 = 0;
01280 
01281   if (x0 && !x0->Ok()) scheme_arg_mismatch(METHODNAME("frame%","set-icon"), "bad bitmap: ", p[POFFSET+0]);if (x1 && !x1->Ok()) scheme_arg_mismatch(METHODNAME("frame%","set-icon"), "bad bitmap: ", p[POFFSET+1]);if (x1 && (x1->GetDepth() != 1)) scheme_arg_mismatch(METHODNAME("frame%","set-icon"), "mask bitmap is not monochrome: ", p[POFFSET+1]);
01282   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->SetIcon(x0, x1, x2));
01283 
01284   
01285   
01286   READY_TO_RETURN;
01287   return scheme_void;
01288 }
01289 
01290 static Scheme_Object *os_wxFrameIconize(int n,  Scheme_Object *p[])
01291 {
01292   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01293   REMEMBER_VAR_STACK();
01294   objscheme_check_valid(os_wxFrame_class, "iconize in frame%", n, p);
01295   Bool x0;
01296 
01297   SETUP_VAR_STACK_REMEMBERED(1);
01298   VAR_STACK_PUSH(0, p);
01299 
01300   
01301   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "iconize in frame%"));
01302 
01303   
01304   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->Iconize(x0));
01305 
01306   
01307   
01308   READY_TO_RETURN;
01309   return scheme_void;
01310 }
01311 
01312 static Scheme_Object *os_wxFrameSetTitle(int n,  Scheme_Object *p[])
01313 {
01314   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01315   REMEMBER_VAR_STACK();
01316   objscheme_check_valid(os_wxFrame_class, "set-title in frame%", n, p);
01317   string x0 INIT_NULLED_OUT;
01318 
01319   SETUP_VAR_STACK_REMEMBERED(2);
01320   VAR_STACK_PUSH(0, p);
01321   VAR_STACK_PUSH(1, x0);
01322 
01323   
01324   x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-title in frame%"));
01325 
01326   
01327   WITH_VAR_STACK(((wxFrame *)((Scheme_Class_Object *)p[0])->primdata)->SetTitle(x0));
01328 
01329   
01330   
01331   READY_TO_RETURN;
01332   return scheme_void;
01333 }
01334 
01335 static Scheme_Object *os_wxFrame_ConstructScheme(int n,  Scheme_Object *p[])
01336 {
01337   SETUP_PRE_VAR_STACK(1);
01338   PRE_VAR_STACK_PUSH(0, p);
01339   os_wxFrame *realobj INIT_NULLED_OUT;
01340   REMEMBER_VAR_STACK();
01341   class wxFrame* x0 INIT_NULLED_OUT;
01342   string x1 INIT_NULLED_OUT;
01343   int x2;
01344   int x3;
01345   int x4;
01346   int x5;
01347   int x6;
01348   string x7 INIT_NULLED_OUT;
01349 
01350   SETUP_VAR_STACK_PRE_REMEMBERED(5);
01351   VAR_STACK_PUSH(0, p);
01352   VAR_STACK_PUSH(1, realobj);
01353   VAR_STACK_PUSH(2, x0);
01354   VAR_STACK_PUSH(3, x1);
01355   VAR_STACK_PUSH(4, x7);
01356 
01357   
01358   if ((n < (POFFSET+2)) || (n > (POFFSET+8))) 
01359     WITH_VAR_STACK(scheme_wrong_count_m("initialization in frame%", POFFSET+2, POFFSET+8, n, p, 1));
01360   x0 = WITH_VAR_STACK(objscheme_unbundle_wxFrame(p[POFFSET+0], "initialization in frame%", 1));
01361   x1 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+1], "initialization in frame%"));
01362   if (n > (POFFSET+2)) {
01363     x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in frame%"));
01364   } else
01365     x2 = -1;
01366   if (n > (POFFSET+3)) {
01367     x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in frame%"));
01368   } else
01369     x3 = -1;
01370   if (n > (POFFSET+4)) {
01371     x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in frame%"));
01372   } else
01373     x4 = -1;
01374   if (n > (POFFSET+5)) {
01375     x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "initialization in frame%"));
01376   } else
01377     x5 = -1;
01378   if (n > (POFFSET+6)) {
01379     x6 = WITH_VAR_STACK(unbundle_symset_frameStyle(p[POFFSET+6], "initialization in frame%"));
01380   } else
01381     x6 = 0;
01382   if (n > (POFFSET+7)) {
01383     x7 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+7], "initialization in frame%"));
01384   } else
01385     x7 = "frame";
01386 
01387   WITH_VAR_STACK(wxsCheckEventspace(METHODNAME("frame%","initialization")));if (!x4) x4 = -1;if (!x5) x5 = -1;
01388   realobj = WITH_VAR_STACK(new os_wxFrame CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7)));
01389 #ifdef MZ_PRECISE_GC
01390   WITH_VAR_STACK(realobj->gcInit_wxFrame(x0, x1, x2, x3, x4, x5, x6, x7));
01391 #endif
01392   realobj->__gc_external = (void *)p[0];
01393   
01394   
01395   READY_TO_RETURN;
01396   ((Scheme_Class_Object *)p[0])->primdata = realobj;
01397   ((Scheme_Class_Object *)p[0])->primflag = 1;
01398   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
01399   return scheme_void;
01400 }
01401 
01402 void objscheme_setup_wxFrame(Scheme_Env *env)
01403 {
01404   SETUP_VAR_STACK(1);
01405   VAR_STACK_PUSH(0, env);
01406 
01407   wxREGGLOB(os_wxFrame_class);
01408 
01409   os_wxFrame_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "frame%", "window%", (Scheme_Method_Prim *)os_wxFrame_ConstructScheme, 27));
01410 
01411   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxFrameOnDropFile, 1, 1));
01412   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxFramePreOnEvent, 2, 2));
01413   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxFramePreOnChar, 2, 2));
01414   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-size" " method", (Scheme_Method_Prim *)os_wxFrameOnSize, 2, 2));
01415   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxFrameOnSetFocus, 0, 0));
01416   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxFrameOnKillFocus, 0, 0));
01417   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-toolbar-click" " method", (Scheme_Method_Prim *)os_wxFrameOnToolbarButton, 0, 0));
01418   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-menu-click" " method", (Scheme_Method_Prim *)os_wxFrameOnMenuClick, 0, 0));
01419   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-menu-command" " method", (Scheme_Method_Prim *)os_wxFrameOnMenuCommand, 1, 1));
01420   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-mdi-activate" " method", (Scheme_Method_Prim *)os_wxFrameOnMDIActivate, 1, 1));
01421   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "enforce-size" " method", (Scheme_Method_Prim *)os_wxFrameEnforceSize, 6, 6));
01422   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-close" " method", (Scheme_Method_Prim *)os_wxFrameOnClose, 0, 0));
01423   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "on-activate" " method", (Scheme_Method_Prim *)os_wxFrameOnActivate, 1, 1));
01424   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "designate-root-frame" " method", (Scheme_Method_Prim *)os_wxFrameDesignateRootFrame, 0, 0));
01425   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "system-menu" " method", (Scheme_Method_Prim *)os_wxFrameframeMenu, 0, 0));
01426   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "set-modified" " method", (Scheme_Method_Prim *)os_wxFrameSetFrameModified, 1, 1));
01427   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "create-status-line" " method", (Scheme_Method_Prim *)os_wxFrameCreateStatusLine, 0, 2));
01428   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "is-maximized?" " method", (Scheme_Method_Prim *)os_wxFrameIsMaximized, 0, 0));
01429   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "maximize" " method", (Scheme_Method_Prim *)os_wxFrameMaximize, 1, 1));
01430   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "status-line-exists?" " method", (Scheme_Method_Prim *)os_wxFrameStatusLineExists, 0, 0));
01431   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "iconized?" " method", (Scheme_Method_Prim *)os_wxFrameIconized, 0, 0));
01432   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "set-status-text" " method", (Scheme_Method_Prim *)os_wxFrameSetStatusText, 1, 1));
01433   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "get-menu-bar" " method", (Scheme_Method_Prim *)os_wxFrameGetTheMenuBar, 0, 0));
01434   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "set-menu-bar" " method", (Scheme_Method_Prim *)os_wxFrameSetMenuBar, 1, 1));
01435   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "set-icon" " method", (Scheme_Method_Prim *)os_wxFrameSetIcon, 1, 3));
01436   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "iconize" " method", (Scheme_Method_Prim *)os_wxFrameIconize, 1, 1));
01437   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxFrame_class, "set-title" " method", (Scheme_Method_Prim *)os_wxFrameSetTitle, 1, 1));
01438 
01439 
01440   WITH_VAR_STACK(scheme_made_class(os_wxFrame_class));
01441 
01442   WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxFrame, wxTYPE_FRAME));
01443 
01444   READY_TO_RETURN;
01445 }
01446 
01447 int objscheme_istype_wxFrame(Scheme_Object *obj, const char *stop, int nullOK)
01448 {
01449   REMEMBER_VAR_STACK();
01450   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01451   if (objscheme_is_a(obj,  os_wxFrame_class))
01452     return 1;
01453   else {
01454     if (!stop)
01455        return 0;
01456     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "frame% object or " XC_NULL_STR: "frame% object", -1, 0, &obj));
01457     return 0;
01458   }
01459 }
01460 
01461 Scheme_Object *objscheme_bundle_wxFrame(class wxFrame *realobj)
01462 {
01463   Scheme_Class_Object *obj INIT_NULLED_OUT;
01464   Scheme_Object *sobj INIT_NULLED_OUT;
01465 
01466   if (!realobj) return XC_SCHEME_NULL;
01467 
01468   if (realobj->__gc_external)
01469     return (Scheme_Object *)realobj->__gc_external;
01470 
01471   SETUP_VAR_STACK(2);
01472   VAR_STACK_PUSH(0, obj);
01473   VAR_STACK_PUSH(1, realobj);
01474 
01475   if ((realobj->__type != wxTYPE_FRAME) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01476     { READY_TO_RETURN; return sobj; }
01477   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxFrame_class));
01478 
01479   obj->primdata = realobj;
01480   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01481   obj->primflag = 0;
01482 
01483   realobj->__gc_external = (void *)obj;
01484   READY_TO_RETURN;
01485   return (Scheme_Object *)obj;
01486 }
01487 
01488 class wxFrame *objscheme_unbundle_wxFrame(Scheme_Object *obj, const char *where, int nullOK)
01489 {
01490   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01491 
01492   REMEMBER_VAR_STACK();
01493 
01494   (void)objscheme_istype_wxFrame(obj, where, nullOK);
01495   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01496   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01497   if (o->primflag)
01498     return (os_wxFrame *)o->primdata;
01499   else
01500     return (wxFrame *)o->primdata;
01501 }
01502