Back to index

plt-scheme  4.2.1
wxs_panl.cxx
Go to the documentation of this file.
00001 /* DO NOT EDIT THIS FILE. */
00002 /* This file was generated by xctocc from "wxs_panl.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_panel.h"
00013 #include "wx_dialg.h"
00014 #include "wx_types.h"
00015 
00016 
00017 
00018 
00019 #ifdef wx_x
00020 # define BM_SELECTED(map) ((map)->selectedTo)
00021 #endif
00022 #if defined(wx_mac) || defined(wx_msw)
00023 # define BM_SELECTED(map) ((map)->selectedInto)
00024 #endif
00025 # define BM_IN_USE(map) ((map)->selectedIntoDC)
00026 
00027 
00028 
00029 
00030 #define ESCAPE_NO_RET_VAL /*empty*/
00031 
00032 
00033 #include "wxscheme.h"
00034 #include "wxs_panl.h"
00035 
00036 #ifdef MZ_PRECISE_GC
00037 START_XFORM_SKIP;
00038 #endif
00039 
00040 #if !defined(wx_mac)
00041 #define INTERACT_METHODS 1
00042 #else
00043 #define INTERACT_METHODS 0
00044 #endif
00045 
00046 static Scheme_Object *panelStyle_wxBORDER_sym = NULL;
00047 static Scheme_Object *panelStyle_wxINVISIBLE_sym = NULL;
00048 
00049 static void init_symset_panelStyle(void) {
00050   REMEMBER_VAR_STACK();
00051   wxREGGLOB(panelStyle_wxBORDER_sym);
00052   panelStyle_wxBORDER_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("border"));
00053   wxREGGLOB(panelStyle_wxINVISIBLE_sym);
00054   panelStyle_wxINVISIBLE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("deleted"));
00055 }
00056 
00057 static int unbundle_symset_panelStyle(Scheme_Object *v, const char *where) {
00058   SETUP_VAR_STACK(1);
00059   VAR_STACK_PUSH(0, v);
00060   if (!panelStyle_wxINVISIBLE_sym) WITH_VAR_STACK(init_symset_panelStyle());
00061   Scheme_Object *i INIT_NULLED_OUT, *l = v;
00062   long result = 0;
00063   while (SCHEME_PAIRP(l)) {
00064   i = SCHEME_CAR(l);
00065   if (0) { }
00066   else if (i == panelStyle_wxBORDER_sym) { result = result | wxBORDER; }
00067   else if (i == panelStyle_wxINVISIBLE_sym) { result = result | wxINVISIBLE; }
00068   else { break; } 
00069   l = SCHEME_CDR(l);
00070   }
00071   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
00072   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "panelStyle symbol list", -1, 0, &v));
00073   READY_TO_RETURN;
00074   return 0;
00075 }
00076 
00077 
00078 
00079 static Scheme_Object *orientation_wxVERTICAL_sym = NULL;
00080 static Scheme_Object *orientation_wxHORIZONTAL_sym = NULL;
00081 
00082 static void init_symset_orientation(void) {
00083   REMEMBER_VAR_STACK();
00084   wxREGGLOB(orientation_wxVERTICAL_sym);
00085   orientation_wxVERTICAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("vertical"));
00086   wxREGGLOB(orientation_wxHORIZONTAL_sym);
00087   orientation_wxHORIZONTAL_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("horizontal"));
00088 }
00089 
00090 static int unbundle_symset_orientation(Scheme_Object *v, const char *where) {
00091   SETUP_VAR_STACK(1);
00092   VAR_STACK_PUSH(0, v);
00093   if (!orientation_wxHORIZONTAL_sym) WITH_VAR_STACK(init_symset_orientation());
00094   if (0) { }
00095   else if (v == orientation_wxVERTICAL_sym) { READY_TO_RETURN; return wxVERTICAL; }
00096   else if (v == orientation_wxHORIZONTAL_sym) { READY_TO_RETURN; return wxHORIZONTAL; }
00097   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "orientation symbol", -1, 0, &v));
00098   READY_TO_RETURN;
00099   return 0;
00100 }
00101 
00102 static Scheme_Object *bundle_symset_orientation(int v) {
00103   if (!orientation_wxHORIZONTAL_sym) init_symset_orientation();
00104   switch (v) {
00105   case wxVERTICAL: return orientation_wxVERTICAL_sym;
00106   case wxHORIZONTAL: return orientation_wxHORIZONTAL_sym;
00107   default: return NULL;
00108   }
00109 }
00110 
00111 
00112 /* The derivation panel -> canvas is a lie for Xt */
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 // @SETMARK c = d
00124 // @INCLUDE wxs_cnvs.xci
00125 
00126 // @ p "on-default-action" : void OnDefaultAction(wxItem!);
00127 
00128 // @ p "on-item-event" : void OnItemEvent(wxItem!,wxMouseEvent%); ## INTERACT_METHODS
00129 // @ p "on-item-left-click" : void OnItemLeftClick(wxItem!,int,int,int); ## INTERACT_METHODS
00130 // @ p "on-item-right-click" : void OnItemRightClick(wxItem!,int,int,int); ## INTERACT_METHODS
00131 // @ p "on-item-move" : void OnItemMove(wxItem!,int,int); ## INTERACT_METHODS
00132 // @ p "on-item-size" : void OnItemSize(wxItem!,int,int); ## INTERACT_METHODS
00133 // @ p "on-left-click" : void OnLeftClick(int,int,int); ## INTERACT_METHODS
00134 // @ p "on-right-click" : void OnRightClick(int,int,int); ## INTERACT_METHODS
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 /* No longer used */
00143 
00144 // @INCLUDE wxs_icol.xci
00145 
00146 class os_wxPanel : public wxPanel {
00147  public:
00148 
00149   os_wxPanel CONSTRUCTOR_ARGS((class wxFrame* x0, int x1 = -1, int x2 = -1, int x3 = -1, int x4 = -1, int x5 = 0, string x6 = "panel"));
00150 #ifndef MZ_PRECISE_GC
00151   os_wxPanel CONSTRUCTOR_ARGS((class wxDialogBox* x0, int x1 = -1, int x2 = -1, int x3 = -1, int x4 = -1, int x5 = 0, string x6 = "panel"));
00152 #endif
00153 #ifndef MZ_PRECISE_GC
00154   os_wxPanel CONSTRUCTOR_ARGS((class wxPanel* x0, int x1 = -1, int x2 = -1, int x3 = -1, int x4 = -1, int x5 = 0, string x6 = "panel"));
00155 #endif
00156   ~os_wxPanel();
00157   void OnDropFile(epathname x0);
00158   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
00159   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
00160   void OnSize(int x0, int x1);
00161   void OnSetFocus();
00162   void OnKillFocus();
00163 #ifdef MZ_PRECISE_GC
00164   void gcMark();
00165   void gcFixup();
00166 #endif
00167 };
00168 
00169 #ifdef MZ_PRECISE_GC
00170 void os_wxPanel::gcMark() {
00171   wxPanel::gcMark();
00172 }
00173 void os_wxPanel::gcFixup() {
00174   wxPanel::gcFixup();
00175 }
00176 #endif
00177 
00178 static Scheme_Object *os_wxPanel_class;
00179 
00180 os_wxPanel::os_wxPanel CONSTRUCTOR_ARGS((class wxFrame* x0, int x1, int x2, int x3, int x4, int x5, string x6))
00181 CONSTRUCTOR_INIT(: wxPanel(x0, x1, x2, x3, x4, x5, x6))
00182 {
00183 }
00184 
00185 #ifndef MZ_PRECISE_GC
00186 os_wxPanel::os_wxPanel CONSTRUCTOR_ARGS((class wxDialogBox* x0, int x1, int x2, int x3, int x4, int x5, string x6))
00187 CONSTRUCTOR_INIT(: wxPanel(x0, x1, x2, x3, x4, x5, x6))
00188 {
00189 }
00190 #endif
00191 
00192 #ifndef MZ_PRECISE_GC
00193 os_wxPanel::os_wxPanel CONSTRUCTOR_ARGS((class wxPanel* x0, int x1, int x2, int x3, int x4, int x5, string x6))
00194 CONSTRUCTOR_INIT(: wxPanel(x0, x1, x2, x3, x4, x5, x6))
00195 {
00196 }
00197 #endif
00198 
00199 os_wxPanel::~os_wxPanel()
00200 {
00201     objscheme_destroy(this, (Scheme_Object *) __gc_external);
00202 }
00203 
00204 static Scheme_Object *os_wxPanelOnDropFile(int n, Scheme_Object *p[]);
00205 
00206 void os_wxPanel::OnDropFile(epathname x0)
00207 {
00208   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
00209   Scheme_Object *v;
00210   Scheme_Object *method INIT_NULLED_OUT;
00211 #ifdef MZ_PRECISE_GC
00212   os_wxPanel *sElF = this;
00213 #endif
00214   static void *mcache = 0;
00215 
00216   SETUP_VAR_STACK(6);
00217   VAR_STACK_PUSH(0, method);
00218   VAR_STACK_PUSH(1, sElF);
00219   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
00220   VAR_STACK_PUSH(5, x0);
00221   SET_VAR_STACK();
00222 
00223   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "on-drop-file", &mcache);
00224   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelOnDropFile)) {
00225     SET_VAR_STACK();
00226     READY_TO_RETURN; ASSELF wxPanel::OnDropFile(x0);
00227   } else {
00228   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00229   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
00230   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00231   p[0] = (Scheme_Object *) ASSELF __gc_external;
00232 
00233   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
00234   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00235   
00236      READY_TO_RETURN;
00237   }
00238 }
00239 
00240 static Scheme_Object *os_wxPanelPreOnEvent(int n, Scheme_Object *p[]);
00241 
00242 Bool os_wxPanel::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
00243 {
00244   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00245   Scheme_Object *v;
00246   Scheme_Object *method INIT_NULLED_OUT;
00247 #ifdef MZ_PRECISE_GC
00248   os_wxPanel *sElF = this;
00249 #endif
00250   static void *mcache = 0;
00251 
00252   SETUP_VAR_STACK(7);
00253   VAR_STACK_PUSH(0, method);
00254   VAR_STACK_PUSH(1, sElF);
00255   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00256   VAR_STACK_PUSH(5, x0);
00257   VAR_STACK_PUSH(6, x1);
00258   SET_VAR_STACK();
00259 
00260   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "pre-on-event", &mcache);
00261   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelPreOnEvent)) {
00262     SET_VAR_STACK();
00263     return FALSE;
00264   } else {
00265   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00266   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00267   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
00268   ESCAPE_BLOCK(1)
00269   p[0] = (Scheme_Object *) ASSELF __gc_external;
00270 
00271   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00272   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00273   
00274   {
00275      Bool resval;
00276      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in panel%"", extracting return value"));
00277      READY_TO_RETURN;
00278      return resval;
00279   }
00280   }
00281 }
00282 
00283 static Scheme_Object *os_wxPanelPreOnChar(int n, Scheme_Object *p[]);
00284 
00285 Bool os_wxPanel::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
00286 {
00287   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00288   Scheme_Object *v;
00289   Scheme_Object *method INIT_NULLED_OUT;
00290 #ifdef MZ_PRECISE_GC
00291   os_wxPanel *sElF = this;
00292 #endif
00293   static void *mcache = 0;
00294 
00295   SETUP_VAR_STACK(7);
00296   VAR_STACK_PUSH(0, method);
00297   VAR_STACK_PUSH(1, sElF);
00298   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00299   VAR_STACK_PUSH(5, x0);
00300   VAR_STACK_PUSH(6, x1);
00301   SET_VAR_STACK();
00302 
00303   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "pre-on-char", &mcache);
00304   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelPreOnChar)) {
00305     SET_VAR_STACK();
00306     return FALSE;
00307   } else {
00308   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00309   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
00310   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
00311   ESCAPE_BLOCK(1)
00312   p[0] = (Scheme_Object *) ASSELF __gc_external;
00313 
00314   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00315   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00316   
00317   {
00318      Bool resval;
00319      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in panel%"", extracting return value"));
00320      READY_TO_RETURN;
00321      return resval;
00322   }
00323   }
00324 }
00325 
00326 static Scheme_Object *os_wxPanelOnSize(int n, Scheme_Object *p[]);
00327 
00328 void os_wxPanel::OnSize(int x0, int x1)
00329 {
00330   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
00331   Scheme_Object *v;
00332   Scheme_Object *method INIT_NULLED_OUT;
00333 #ifdef MZ_PRECISE_GC
00334   os_wxPanel *sElF = this;
00335 #endif
00336   static void *mcache = 0;
00337 
00338   SETUP_VAR_STACK(5);
00339   VAR_STACK_PUSH(0, method);
00340   VAR_STACK_PUSH(1, sElF);
00341   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
00342   SET_VAR_STACK();
00343 
00344   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "on-size", &mcache);
00345   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelOnSize)) {
00346     SET_VAR_STACK();
00347     READY_TO_RETURN; ASSELF wxPanel::OnSize(x0, x1);
00348   } else {
00349   
00350   p[POFFSET+0] = scheme_make_integer(x0);
00351   p[POFFSET+1] = scheme_make_integer(x1);
00352   
00353   p[0] = (Scheme_Object *) ASSELF __gc_external;
00354 
00355   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
00356   
00357   
00358      READY_TO_RETURN;
00359   }
00360 }
00361 
00362 static Scheme_Object *os_wxPanelOnSetFocus(int n, Scheme_Object *p[]);
00363 
00364 void os_wxPanel::OnSetFocus()
00365 {
00366   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00367   Scheme_Object *v;
00368   Scheme_Object *method INIT_NULLED_OUT;
00369 #ifdef MZ_PRECISE_GC
00370   os_wxPanel *sElF = this;
00371 #endif
00372   static void *mcache = 0;
00373 
00374   SETUP_VAR_STACK(5);
00375   VAR_STACK_PUSH(0, method);
00376   VAR_STACK_PUSH(1, sElF);
00377   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00378   SET_VAR_STACK();
00379 
00380   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "on-set-focus", &mcache);
00381   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelOnSetFocus)) {
00382     SET_VAR_STACK();
00383     READY_TO_RETURN; ASSELF wxPanel::OnSetFocus();
00384   } else {
00385   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00386   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00387   p[0] = (Scheme_Object *) ASSELF __gc_external;
00388 
00389   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00390   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00391   
00392      READY_TO_RETURN;
00393   }
00394 }
00395 
00396 static Scheme_Object *os_wxPanelOnKillFocus(int n, Scheme_Object *p[]);
00397 
00398 void os_wxPanel::OnKillFocus()
00399 {
00400   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
00401   Scheme_Object *v;
00402   Scheme_Object *method INIT_NULLED_OUT;
00403 #ifdef MZ_PRECISE_GC
00404   os_wxPanel *sElF = this;
00405 #endif
00406   static void *mcache = 0;
00407 
00408   SETUP_VAR_STACK(5);
00409   VAR_STACK_PUSH(0, method);
00410   VAR_STACK_PUSH(1, sElF);
00411   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
00412   SET_VAR_STACK();
00413 
00414   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxPanel_class, "on-kill-focus", &mcache);
00415   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxPanelOnKillFocus)) {
00416     SET_VAR_STACK();
00417     READY_TO_RETURN; ASSELF wxPanel::OnKillFocus();
00418   } else {
00419   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
00420   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
00421   p[0] = (Scheme_Object *) ASSELF __gc_external;
00422 
00423   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
00424   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
00425   
00426      READY_TO_RETURN;
00427   }
00428 }
00429 
00430 static Scheme_Object *os_wxPanelGetLabelPosition(int n,  Scheme_Object *p[])
00431 {
00432   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00433   REMEMBER_VAR_STACK();
00434   int r;
00435   objscheme_check_valid(os_wxPanel_class, "get-label-position in panel%", n, p);
00436 
00437   SETUP_VAR_STACK_REMEMBERED(1);
00438   VAR_STACK_PUSH(0, p);
00439 
00440   
00441 
00442   
00443   r = WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->GetLabelPosition());
00444 
00445   
00446   
00447   READY_TO_RETURN;
00448   return WITH_REMEMBERED_STACK(bundle_symset_orientation(r));
00449 }
00450 
00451 static Scheme_Object *os_wxPanelSetLabelPosition(int n,  Scheme_Object *p[])
00452 {
00453   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00454   REMEMBER_VAR_STACK();
00455   objscheme_check_valid(os_wxPanel_class, "set-label-position in panel%", n, p);
00456   int x0;
00457 
00458   SETUP_VAR_STACK_REMEMBERED(1);
00459   VAR_STACK_PUSH(0, p);
00460 
00461   
00462   x0 = WITH_VAR_STACK(unbundle_symset_orientation(p[POFFSET+0], "set-label-position in panel%"));
00463 
00464   
00465   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->SetLabelPosition(x0));
00466 
00467   
00468   
00469   READY_TO_RETURN;
00470   return scheme_void;
00471 }
00472 
00473 static Scheme_Object *os_wxPanelOnChar(int n,  Scheme_Object *p[])
00474 {
00475   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00476   REMEMBER_VAR_STACK();
00477   objscheme_check_valid(os_wxPanel_class, "on-char in panel%", n, p);
00478   class wxKeyEvent* x0 INIT_NULLED_OUT;
00479 
00480   SETUP_VAR_STACK_REMEMBERED(2);
00481   VAR_STACK_PUSH(0, p);
00482   VAR_STACK_PUSH(1, x0);
00483 
00484   
00485   x0 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+0], "on-char in panel%", 0));
00486 
00487   
00488   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnChar(x0));
00489 
00490   
00491   
00492   READY_TO_RETURN;
00493   return scheme_void;
00494 }
00495 
00496 static Scheme_Object *os_wxPanelOnEvent(int n,  Scheme_Object *p[])
00497 {
00498   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00499   REMEMBER_VAR_STACK();
00500   objscheme_check_valid(os_wxPanel_class, "on-event in panel%", n, p);
00501   class wxMouseEvent* x0 INIT_NULLED_OUT;
00502 
00503   SETUP_VAR_STACK_REMEMBERED(2);
00504   VAR_STACK_PUSH(0, p);
00505   VAR_STACK_PUSH(1, x0);
00506 
00507   
00508   x0 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+0], "on-event in panel%", 0));
00509 
00510   
00511   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnEvent(x0));
00512 
00513   
00514   
00515   READY_TO_RETURN;
00516   return scheme_void;
00517 }
00518 
00519 static Scheme_Object *os_wxPanelOnPaint(int n,  Scheme_Object *p[])
00520 {
00521   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00522   REMEMBER_VAR_STACK();
00523   objscheme_check_valid(os_wxPanel_class, "on-paint in panel%", n, p);
00524 
00525   SETUP_VAR_STACK_REMEMBERED(1);
00526   VAR_STACK_PUSH(0, p);
00527 
00528   
00529 
00530   
00531   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnPaint());
00532 
00533   
00534   
00535   READY_TO_RETURN;
00536   return scheme_void;
00537 }
00538 
00539 static Scheme_Object *os_wxPanelOnDropFile(int n,  Scheme_Object *p[])
00540 {
00541   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00542   REMEMBER_VAR_STACK();
00543   objscheme_check_valid(os_wxPanel_class, "on-drop-file in panel%", n, p);
00544   epathname x0 INIT_NULLED_OUT;
00545 
00546   SETUP_VAR_STACK_REMEMBERED(2);
00547   VAR_STACK_PUSH(0, p);
00548   VAR_STACK_PUSH(1, x0);
00549 
00550   
00551   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in panel%"));
00552 
00553   
00554   if (((Scheme_Class_Object *)p[0])->primflag)
00555     WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->wxPanel::OnDropFile(x0));
00556   else
00557     WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
00558 
00559   
00560   
00561   READY_TO_RETURN;
00562   return scheme_void;
00563 }
00564 
00565 static Scheme_Object *os_wxPanelPreOnEvent(int n,  Scheme_Object *p[])
00566 {
00567   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00568   REMEMBER_VAR_STACK();
00569   Bool r;
00570   objscheme_check_valid(os_wxPanel_class, "pre-on-event in panel%", n, p);
00571   class wxWindow* x0 INIT_NULLED_OUT;
00572   class wxMouseEvent* x1 INIT_NULLED_OUT;
00573 
00574   SETUP_VAR_STACK_REMEMBERED(3);
00575   VAR_STACK_PUSH(0, p);
00576   VAR_STACK_PUSH(1, x0);
00577   VAR_STACK_PUSH(2, x1);
00578 
00579   
00580   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in panel%", 0));
00581   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in panel%", 0));
00582 
00583   
00584   if (((Scheme_Class_Object *)p[0])->primflag)
00585     r = WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
00586   else
00587     r = WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
00588 
00589   
00590   
00591   READY_TO_RETURN;
00592   return (r ? scheme_true : scheme_false);
00593 }
00594 
00595 static Scheme_Object *os_wxPanelPreOnChar(int n,  Scheme_Object *p[])
00596 {
00597   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00598   REMEMBER_VAR_STACK();
00599   Bool r;
00600   objscheme_check_valid(os_wxPanel_class, "pre-on-char in panel%", n, p);
00601   class wxWindow* x0 INIT_NULLED_OUT;
00602   class wxKeyEvent* x1 INIT_NULLED_OUT;
00603 
00604   SETUP_VAR_STACK_REMEMBERED(3);
00605   VAR_STACK_PUSH(0, p);
00606   VAR_STACK_PUSH(1, x0);
00607   VAR_STACK_PUSH(2, x1);
00608 
00609   
00610   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in panel%", 0));
00611   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in panel%", 0));
00612 
00613   
00614   if (((Scheme_Class_Object *)p[0])->primflag)
00615     r = WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
00616   else
00617     r = WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
00618 
00619   
00620   
00621   READY_TO_RETURN;
00622   return (r ? scheme_true : scheme_false);
00623 }
00624 
00625 static Scheme_Object *os_wxPanelOnSize(int n,  Scheme_Object *p[])
00626 {
00627   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00628   REMEMBER_VAR_STACK();
00629   objscheme_check_valid(os_wxPanel_class, "on-size in panel%", n, p);
00630   int x0;
00631   int x1;
00632 
00633   SETUP_VAR_STACK_REMEMBERED(1);
00634   VAR_STACK_PUSH(0, p);
00635 
00636   
00637   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in panel%"));
00638   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in panel%"));
00639 
00640   
00641   if (((Scheme_Class_Object *)p[0])->primflag)
00642     WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->wxPanel::OnSize(x0, x1));
00643   else
00644     WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
00645 
00646   
00647   
00648   READY_TO_RETURN;
00649   return scheme_void;
00650 }
00651 
00652 static Scheme_Object *os_wxPanelOnSetFocus(int n,  Scheme_Object *p[])
00653 {
00654   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00655   REMEMBER_VAR_STACK();
00656   objscheme_check_valid(os_wxPanel_class, "on-set-focus in panel%", n, p);
00657 
00658   SETUP_VAR_STACK_REMEMBERED(1);
00659   VAR_STACK_PUSH(0, p);
00660 
00661   
00662 
00663   
00664   if (((Scheme_Class_Object *)p[0])->primflag)
00665     WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->wxPanel::OnSetFocus());
00666   else
00667     WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
00668 
00669   
00670   
00671   READY_TO_RETURN;
00672   return scheme_void;
00673 }
00674 
00675 static Scheme_Object *os_wxPanelOnKillFocus(int n,  Scheme_Object *p[])
00676 {
00677   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00678   REMEMBER_VAR_STACK();
00679   objscheme_check_valid(os_wxPanel_class, "on-kill-focus in panel%", n, p);
00680 
00681   SETUP_VAR_STACK_REMEMBERED(1);
00682   VAR_STACK_PUSH(0, p);
00683 
00684   
00685 
00686   
00687   if (((Scheme_Class_Object *)p[0])->primflag)
00688     WITH_VAR_STACK(((os_wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->wxPanel::OnKillFocus());
00689   else
00690     WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
00691 
00692   
00693   
00694   READY_TO_RETURN;
00695   return scheme_void;
00696 }
00697 
00698 static Scheme_Object *os_wxPanelSetItemCursor(int n,  Scheme_Object *p[])
00699 {
00700   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00701   REMEMBER_VAR_STACK();
00702   objscheme_check_valid(os_wxPanel_class, "set-item-cursor in panel%", n, p);
00703   int x0;
00704   int x1;
00705 
00706   SETUP_VAR_STACK_REMEMBERED(1);
00707   VAR_STACK_PUSH(0, p);
00708 
00709   
00710   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "set-item-cursor in panel%"));
00711   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "set-item-cursor in panel%"));
00712 
00713   
00714   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->SetItemCursor(x0, x1));
00715 
00716   
00717   
00718   READY_TO_RETURN;
00719   return scheme_void;
00720 }
00721 
00722 static Scheme_Object *os_wxPanelGetCursor(int n,  Scheme_Object *p[])
00723 {
00724   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
00725   REMEMBER_VAR_STACK();
00726   objscheme_check_valid(os_wxPanel_class, "get-item-cursor in panel%", n, p);
00727   int _x0;
00728   int* x0 = &_x0;
00729   int _x1;
00730   int* x1 = &_x1;
00731   Scheme_Object *sbox_tmp;
00732 
00733   SETUP_VAR_STACK_REMEMBERED(1);
00734   VAR_STACK_PUSH(0, p);
00735 
00736   
00737       *x0 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+0], "get-item-cursor in panel%")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get-item-cursor in panel%"", extracting boxed argument")));
00738       *x1 = (sbox_tmp = WITH_VAR_STACK(objscheme_unbox(p[POFFSET+1], "get-item-cursor in panel%")), WITH_VAR_STACK(objscheme_unbundle_integer(sbox_tmp, "get-item-cursor in panel%"", extracting boxed argument")));
00739 
00740   
00741   WITH_VAR_STACK(((wxPanel *)((Scheme_Class_Object *)p[0])->primdata)->GetCursor(x0, x1));
00742 
00743   
00744   if (n > (POFFSET+0))
00745     { Scheme_Object *sbv_ = scheme_make_integer(_x0); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+0], sbv_)); } 
00746   if (n > (POFFSET+1))
00747     { Scheme_Object *sbv_ = scheme_make_integer(_x1); WITH_VAR_STACK(objscheme_set_box(p[POFFSET+1], sbv_)); } 
00748   
00749   READY_TO_RETURN;
00750   return scheme_void;
00751 }
00752 
00753 static Scheme_Object *os_wxPanel_ConstructScheme(int n,  Scheme_Object *p[])
00754 {
00755   SETUP_PRE_VAR_STACK(1);
00756   PRE_VAR_STACK_PUSH(0, p);
00757   os_wxPanel *realobj INIT_NULLED_OUT;
00758   REMEMBER_VAR_STACK();
00759   if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_wxPanel(p[POFFSET+0], NULL, 0))) {
00760     class wxPanel* x0 INIT_NULLED_OUT;
00761     int x1;
00762     int x2;
00763     int x3;
00764     int x4;
00765     int x5;
00766     string x6 INIT_NULLED_OUT;
00767 
00768     SETUP_VAR_STACK_PRE_REMEMBERED(4);
00769     VAR_STACK_PUSH(0, p);
00770     VAR_STACK_PUSH(1, realobj);
00771     VAR_STACK_PUSH(2, x0);
00772     VAR_STACK_PUSH(3, x6);
00773 
00774     
00775     if ((n < (POFFSET+1)) || (n > (POFFSET+7))) 
00776       WITH_VAR_STACK(scheme_wrong_count_m("initialization in panel% (panel parent case)", POFFSET+1, POFFSET+7, n, p, 1));
00777     x0 = WITH_VAR_STACK(objscheme_unbundle_wxPanel(p[POFFSET+0], "initialization in panel% (panel parent case)", 0));
00778     if (n > (POFFSET+1)) {
00779       x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "initialization in panel% (panel parent case)"));
00780     } else
00781       x1 = -1;
00782     if (n > (POFFSET+2)) {
00783       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in panel% (panel parent case)"));
00784     } else
00785       x2 = -1;
00786     if (n > (POFFSET+3)) {
00787       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in panel% (panel parent case)"));
00788     } else
00789       x3 = -1;
00790     if (n > (POFFSET+4)) {
00791       x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in panel% (panel parent case)"));
00792     } else
00793       x4 = -1;
00794     if (n > (POFFSET+5)) {
00795       x5 = WITH_VAR_STACK(unbundle_symset_panelStyle(p[POFFSET+5], "initialization in panel% (panel parent case)"));
00796     } else
00797       x5 = 0;
00798     if (n > (POFFSET+6)) {
00799       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in panel% (panel parent case)"));
00800     } else
00801       x6 = "panel";
00802 
00803     if (!x3) x3 = -1;if (!x4) x4 = -1;
00804     realobj = WITH_VAR_STACK(new os_wxPanel CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00805 #ifdef MZ_PRECISE_GC
00806     WITH_VAR_STACK(realobj->gcInit_wxPanel(x0, x1, x2, x3, x4, x5, x6));
00807 #endif
00808     realobj->__gc_external = (void *)p[0];
00809     
00810     
00811     READY_TO_PRE_RETURN;
00812   } else if ((n >= (POFFSET+1)) && WITH_REMEMBERED_STACK(objscheme_istype_wxDialogBox(p[POFFSET+0], NULL, 0))) {
00813     class wxDialogBox* x0 INIT_NULLED_OUT;
00814     int x1;
00815     int x2;
00816     int x3;
00817     int x4;
00818     int x5;
00819     string x6 INIT_NULLED_OUT;
00820 
00821     SETUP_VAR_STACK_PRE_REMEMBERED(4);
00822     VAR_STACK_PUSH(0, p);
00823     VAR_STACK_PUSH(1, realobj);
00824     VAR_STACK_PUSH(2, x0);
00825     VAR_STACK_PUSH(3, x6);
00826 
00827     
00828     if ((n < (POFFSET+1)) || (n > (POFFSET+7))) 
00829       WITH_VAR_STACK(scheme_wrong_count_m("initialization in panel% (dialog case)", POFFSET+1, POFFSET+7, n, p, 1));
00830     x0 = WITH_VAR_STACK(objscheme_unbundle_wxDialogBox(p[POFFSET+0], "initialization in panel% (dialog case)", 0));
00831     if (n > (POFFSET+1)) {
00832       x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "initialization in panel% (dialog case)"));
00833     } else
00834       x1 = -1;
00835     if (n > (POFFSET+2)) {
00836       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in panel% (dialog case)"));
00837     } else
00838       x2 = -1;
00839     if (n > (POFFSET+3)) {
00840       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in panel% (dialog case)"));
00841     } else
00842       x3 = -1;
00843     if (n > (POFFSET+4)) {
00844       x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in panel% (dialog case)"));
00845     } else
00846       x4 = -1;
00847     if (n > (POFFSET+5)) {
00848       x5 = WITH_VAR_STACK(unbundle_symset_panelStyle(p[POFFSET+5], "initialization in panel% (dialog case)"));
00849     } else
00850       x5 = 0;
00851     if (n > (POFFSET+6)) {
00852       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in panel% (dialog case)"));
00853     } else
00854       x6 = "panel";
00855 
00856     if (!x3) x3 = -1;if (!x4) x4 = -1;
00857     realobj = WITH_VAR_STACK(new os_wxPanel CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00858 #ifdef MZ_PRECISE_GC
00859     WITH_VAR_STACK(realobj->gcInit_wxPanel(x0, x1, x2, x3, x4, x5, x6));
00860 #endif
00861     realobj->__gc_external = (void *)p[0];
00862     
00863     
00864     READY_TO_PRE_RETURN;
00865   } else  {
00866     class wxFrame* x0 INIT_NULLED_OUT;
00867     int x1;
00868     int x2;
00869     int x3;
00870     int x4;
00871     int x5;
00872     string x6 INIT_NULLED_OUT;
00873 
00874     SETUP_VAR_STACK_PRE_REMEMBERED(4);
00875     VAR_STACK_PUSH(0, p);
00876     VAR_STACK_PUSH(1, realobj);
00877     VAR_STACK_PUSH(2, x0);
00878     VAR_STACK_PUSH(3, x6);
00879 
00880     
00881     if ((n < (POFFSET+1)) || (n > (POFFSET+7))) 
00882       WITH_VAR_STACK(scheme_wrong_count_m("initialization in panel% (frame case)", POFFSET+1, POFFSET+7, n, p, 1));
00883     x0 = WITH_VAR_STACK(objscheme_unbundle_wxFrame(p[POFFSET+0], "initialization in panel% (frame case)", 0));
00884     if (n > (POFFSET+1)) {
00885       x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "initialization in panel% (frame case)"));
00886     } else
00887       x1 = -1;
00888     if (n > (POFFSET+2)) {
00889       x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "initialization in panel% (frame case)"));
00890     } else
00891       x2 = -1;
00892     if (n > (POFFSET+3)) {
00893       x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in panel% (frame case)"));
00894     } else
00895       x3 = -1;
00896     if (n > (POFFSET+4)) {
00897       x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in panel% (frame case)"));
00898     } else
00899       x4 = -1;
00900     if (n > (POFFSET+5)) {
00901       x5 = WITH_VAR_STACK(unbundle_symset_panelStyle(p[POFFSET+5], "initialization in panel% (frame case)"));
00902     } else
00903       x5 = 0;
00904     if (n > (POFFSET+6)) {
00905       x6 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+6], "initialization in panel% (frame case)"));
00906     } else
00907       x6 = "panel";
00908 
00909     if (!x3) x3 = -1;if (!x4) x4 = -1;
00910     realobj = WITH_VAR_STACK(new os_wxPanel CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6)));
00911 #ifdef MZ_PRECISE_GC
00912     WITH_VAR_STACK(realobj->gcInit_wxPanel(x0, x1, x2, x3, x4, x5, x6));
00913 #endif
00914     realobj->__gc_external = (void *)p[0];
00915     
00916     
00917     READY_TO_PRE_RETURN;
00918   }
00919 
00920   ((Scheme_Class_Object *)p[0])->primdata = realobj;
00921   ((Scheme_Class_Object *)p[0])->primflag = 1;
00922   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
00923   return scheme_void;
00924 }
00925 
00926 void objscheme_setup_wxPanel(Scheme_Env *env)
00927 {
00928   SETUP_VAR_STACK(1);
00929   VAR_STACK_PUSH(0, env);
00930 
00931   wxREGGLOB(os_wxPanel_class);
00932 
00933   os_wxPanel_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "panel%", "window%", (Scheme_Method_Prim *)os_wxPanel_ConstructScheme, 13));
00934 
00935   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "get-label-position" " method", (Scheme_Method_Prim *)os_wxPanelGetLabelPosition, 0, 0));
00936   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "set-label-position" " method", (Scheme_Method_Prim *)os_wxPanelSetLabelPosition, 1, 1));
00937   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-char" " method", (Scheme_Method_Prim *)os_wxPanelOnChar, 1, 1));
00938   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-event" " method", (Scheme_Method_Prim *)os_wxPanelOnEvent, 1, 1));
00939   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-paint" " method", (Scheme_Method_Prim *)os_wxPanelOnPaint, 0, 0));
00940   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxPanelOnDropFile, 1, 1));
00941   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxPanelPreOnEvent, 2, 2));
00942   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxPanelPreOnChar, 2, 2));
00943   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-size" " method", (Scheme_Method_Prim *)os_wxPanelOnSize, 2, 2));
00944   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxPanelOnSetFocus, 0, 0));
00945   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxPanelOnKillFocus, 0, 0));
00946   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "set-item-cursor" " method", (Scheme_Method_Prim *)os_wxPanelSetItemCursor, 2, 2));
00947   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxPanel_class, "get-item-cursor" " method", (Scheme_Method_Prim *)os_wxPanelGetCursor, 2, 2));
00948 
00949 
00950   WITH_VAR_STACK(scheme_made_class(os_wxPanel_class));
00951 
00952   WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxPanel, wxTYPE_PANEL));
00953 
00954   READY_TO_RETURN;
00955 }
00956 
00957 int objscheme_istype_wxPanel(Scheme_Object *obj, const char *stop, int nullOK)
00958 {
00959   REMEMBER_VAR_STACK();
00960   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
00961   if (objscheme_is_a(obj,  os_wxPanel_class))
00962     return 1;
00963   else {
00964     if (!stop)
00965        return 0;
00966     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "panel% object or " XC_NULL_STR: "panel% object", -1, 0, &obj));
00967     return 0;
00968   }
00969 }
00970 
00971 Scheme_Object *objscheme_bundle_wxPanel(class wxPanel *realobj)
00972 {
00973   Scheme_Class_Object *obj INIT_NULLED_OUT;
00974   Scheme_Object *sobj INIT_NULLED_OUT;
00975 
00976   if (!realobj) return XC_SCHEME_NULL;
00977 
00978   if (realobj->__gc_external)
00979     return (Scheme_Object *)realobj->__gc_external;
00980 
00981   SETUP_VAR_STACK(2);
00982   VAR_STACK_PUSH(0, obj);
00983   VAR_STACK_PUSH(1, realobj);
00984 
00985   if ((realobj->__type != wxTYPE_PANEL) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
00986     { READY_TO_RETURN; return sobj; }
00987   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxPanel_class));
00988 
00989   obj->primdata = realobj;
00990   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
00991   obj->primflag = 0;
00992 
00993   realobj->__gc_external = (void *)obj;
00994   READY_TO_RETURN;
00995   return (Scheme_Object *)obj;
00996 }
00997 
00998 class wxPanel *objscheme_unbundle_wxPanel(Scheme_Object *obj, const char *where, int nullOK)
00999 {
01000   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01001 
01002   REMEMBER_VAR_STACK();
01003 
01004   (void)objscheme_istype_wxPanel(obj, where, nullOK);
01005   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01006   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01007   if (o->primflag)
01008     return (os_wxPanel *)o->primdata;
01009   else
01010     return (wxPanel *)o->primdata;
01011 }
01012 
01013 
01014 #ifdef wx_msw
01015 # define XTMAC_UNUSED(x) x
01016 #else
01017 # define XTMAC_UNUSED(x) 
01018 #endif
01019 
01020 static void dialogMenu(wxDialogBox *XTMAC_UNUSED(d))
01021 {
01022 #ifdef wx_msw
01023   d->SystemMenu();
01024 #endif
01025 }
01026 
01027 #ifndef wxNOT_AS_SHEET
01028 # define wxNOT_AS_SHEET 0
01029 #endif
01030 
01031 static Scheme_Object *dialogStyle_wxNO_CAPTION_sym = NULL;
01032 static Scheme_Object *dialogStyle_wxMAXIMIZE_sym = NULL;
01033 static Scheme_Object *dialogStyle_wxNOT_AS_SHEET_sym = NULL;
01034 
01035 static void init_symset_dialogStyle(void) {
01036   REMEMBER_VAR_STACK();
01037   wxREGGLOB(dialogStyle_wxNO_CAPTION_sym);
01038   dialogStyle_wxNO_CAPTION_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-caption"));
01039   wxREGGLOB(dialogStyle_wxMAXIMIZE_sym);
01040   dialogStyle_wxMAXIMIZE_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("resize-border"));
01041   wxREGGLOB(dialogStyle_wxNOT_AS_SHEET_sym);
01042   dialogStyle_wxNOT_AS_SHEET_sym = WITH_REMEMBERED_STACK(scheme_intern_symbol("no-sheet"));
01043 }
01044 
01045 static int unbundle_symset_dialogStyle(Scheme_Object *v, const char *where) {
01046   SETUP_VAR_STACK(1);
01047   VAR_STACK_PUSH(0, v);
01048   if (!dialogStyle_wxNOT_AS_SHEET_sym) WITH_VAR_STACK(init_symset_dialogStyle());
01049   Scheme_Object *i INIT_NULLED_OUT, *l = v;
01050   long result = 0;
01051   while (SCHEME_PAIRP(l)) {
01052   i = SCHEME_CAR(l);
01053   if (0) { }
01054   else if (i == dialogStyle_wxNO_CAPTION_sym) { result = result | wxNO_CAPTION; }
01055   else if (i == dialogStyle_wxMAXIMIZE_sym) { result = result | wxMAXIMIZE; }
01056   else if (i == dialogStyle_wxNOT_AS_SHEET_sym) { result = result | wxNOT_AS_SHEET; }
01057   else { break; } 
01058   l = SCHEME_CDR(l);
01059   }
01060   if (SCHEME_NULLP(l)) { READY_TO_RETURN; return result; }
01061   if (where) WITH_VAR_STACK(scheme_wrong_type(where, "dialogStyle symbol list", -1, 0, &v));
01062   READY_TO_RETURN;
01063   return 0;
01064 }
01065 
01066 
01067 
01068 extern void *wxsCheckEventspace(char *);
01069 
01070 
01071 
01072 
01073 
01074 
01075 
01076 
01077 
01078 
01079 
01080 
01081 
01082 
01083 // @SETMARK c = d
01084 // @INCLUDE wxs_cnvs.xci
01085 
01086 // @ p "on-default-action" : void OnDefaultAction(wxItem!);
01087 
01088 // @ p "on-item-event" : void OnItemEvent(wxItem!,wxMouseEvent%); ## INTERACT_METHODS
01089 // @ p "on-item-left-click" : void OnItemLeftClick(wxItem!,int,int,int); ## INTERACT_METHODS
01090 // @ p "on-item-right-click" : void OnItemRightClick(wxItem!,int,int,int); ## INTERACT_METHODS
01091 // @ p "on-item-move" : void OnItemMove(wxItem!,int,int); ## INTERACT_METHODS
01092 // @ p "on-item-size" : void OnItemSize(wxItem!,int,int); ## INTERACT_METHODS
01093 // @ p "on-left-click" : void OnLeftClick(int,int,int); ## INTERACT_METHODS
01094 // @ p "on-right-click" : void OnRightClick(int,int,int); ## INTERACT_METHODS
01095 
01096 
01097 
01098 class os_wxDialogBox : public wxDialogBox {
01099  public:
01100 
01101   os_wxDialogBox CONSTRUCTOR_ARGS((class wxWindow* x0, nstring x1, Bool x2 = FALSE, int x3 = 300, int x4 = 300, int x5 = 500, int x6 = 500, int x7 = 0, string x8 = "dialogBox"));
01102   ~os_wxDialogBox();
01103   void OnDropFile(epathname x0);
01104   Bool PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1);
01105   Bool PreOnChar(class wxWindow* x0, class wxKeyEvent* x1);
01106   void OnSize(int x0, int x1);
01107   void OnSetFocus();
01108   void OnKillFocus();
01109   Bool OnClose();
01110   void OnActivate(Bool x0);
01111 #ifdef MZ_PRECISE_GC
01112   void gcMark();
01113   void gcFixup();
01114 #endif
01115 };
01116 
01117 #ifdef MZ_PRECISE_GC
01118 void os_wxDialogBox::gcMark() {
01119   wxDialogBox::gcMark();
01120 }
01121 void os_wxDialogBox::gcFixup() {
01122   wxDialogBox::gcFixup();
01123 }
01124 #endif
01125 
01126 static Scheme_Object *os_wxDialogBox_class;
01127 
01128 os_wxDialogBox::os_wxDialogBox CONSTRUCTOR_ARGS((class wxWindow* x0, nstring x1, Bool x2, int x3, int x4, int x5, int x6, int x7, string x8))
01129 CONSTRUCTOR_INIT(: wxDialogBox(x0, x1, x2, x3, x4, x5, x6, x7, x8))
01130 {
01131 }
01132 
01133 os_wxDialogBox::~os_wxDialogBox()
01134 {
01135     objscheme_destroy(this, (Scheme_Object *) __gc_external);
01136 }
01137 
01138 static Scheme_Object *os_wxDialogBoxOnDropFile(int n, Scheme_Object *p[]);
01139 
01140 void os_wxDialogBox::OnDropFile(epathname x0)
01141 {
01142   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
01143   Scheme_Object *v;
01144   Scheme_Object *method INIT_NULLED_OUT;
01145 #ifdef MZ_PRECISE_GC
01146   os_wxDialogBox *sElF = this;
01147 #endif
01148   static void *mcache = 0;
01149 
01150   SETUP_VAR_STACK(6);
01151   VAR_STACK_PUSH(0, method);
01152   VAR_STACK_PUSH(1, sElF);
01153   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
01154   VAR_STACK_PUSH(5, x0);
01155   SET_VAR_STACK();
01156 
01157   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-drop-file", &mcache);
01158   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnDropFile)) {
01159     SET_VAR_STACK();
01160     READY_TO_RETURN; ASSELF wxDialogBox::OnDropFile(x0);
01161   } else {
01162   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01163   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_pathname((char *)x0));
01164   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01165   p[0] = (Scheme_Object *) ASSELF __gc_external;
01166 
01167   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
01168   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01169   
01170      READY_TO_RETURN;
01171   }
01172 }
01173 
01174 static Scheme_Object *os_wxDialogBoxPreOnEvent(int n, Scheme_Object *p[]);
01175 
01176 Bool os_wxDialogBox::PreOnEvent(class wxWindow* x0, class wxMouseEvent* x1)
01177 {
01178   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01179   Scheme_Object *v;
01180   Scheme_Object *method INIT_NULLED_OUT;
01181 #ifdef MZ_PRECISE_GC
01182   os_wxDialogBox *sElF = this;
01183 #endif
01184   static void *mcache = 0;
01185 
01186   SETUP_VAR_STACK(7);
01187   VAR_STACK_PUSH(0, method);
01188   VAR_STACK_PUSH(1, sElF);
01189   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01190   VAR_STACK_PUSH(5, x0);
01191   VAR_STACK_PUSH(6, x1);
01192   SET_VAR_STACK();
01193 
01194   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "pre-on-event", &mcache);
01195   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxPreOnEvent)) {
01196     SET_VAR_STACK();
01197     return FALSE;
01198   } else {
01199   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01200   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
01201   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxMouseEvent(x1));
01202   ESCAPE_BLOCK(1)
01203   p[0] = (Scheme_Object *) ASSELF __gc_external;
01204 
01205   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01206   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01207   
01208   {
01209      Bool resval;
01210      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-event in dialog%"", extracting return value"));
01211      READY_TO_RETURN;
01212      return resval;
01213   }
01214   }
01215 }
01216 
01217 static Scheme_Object *os_wxDialogBoxPreOnChar(int n, Scheme_Object *p[]);
01218 
01219 Bool os_wxDialogBox::PreOnChar(class wxWindow* x0, class wxKeyEvent* x1)
01220 {
01221   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01222   Scheme_Object *v;
01223   Scheme_Object *method INIT_NULLED_OUT;
01224 #ifdef MZ_PRECISE_GC
01225   os_wxDialogBox *sElF = this;
01226 #endif
01227   static void *mcache = 0;
01228 
01229   SETUP_VAR_STACK(7);
01230   VAR_STACK_PUSH(0, method);
01231   VAR_STACK_PUSH(1, sElF);
01232   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01233   VAR_STACK_PUSH(5, x0);
01234   VAR_STACK_PUSH(6, x1);
01235   SET_VAR_STACK();
01236 
01237   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "pre-on-char", &mcache);
01238   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxPreOnChar)) {
01239     SET_VAR_STACK();
01240     return FALSE;
01241   } else {
01242   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01243   p[POFFSET+0] = WITH_VAR_STACK(objscheme_bundle_wxWindow(x0));
01244   p[POFFSET+1] = WITH_VAR_STACK(objscheme_bundle_wxKeyEvent(x1));
01245   ESCAPE_BLOCK(1)
01246   p[0] = (Scheme_Object *) ASSELF __gc_external;
01247 
01248   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01249   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01250   
01251   {
01252      Bool resval;
01253      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "pre-on-char in dialog%"", extracting return value"));
01254      READY_TO_RETURN;
01255      return resval;
01256   }
01257   }
01258 }
01259 
01260 static Scheme_Object *os_wxDialogBoxOnSize(int n, Scheme_Object *p[]);
01261 
01262 void os_wxDialogBox::OnSize(int x0, int x1)
01263 {
01264   Scheme_Object *p[POFFSET+2] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT INA_comma NULLED_OUT });
01265   Scheme_Object *v;
01266   Scheme_Object *method INIT_NULLED_OUT;
01267 #ifdef MZ_PRECISE_GC
01268   os_wxDialogBox *sElF = this;
01269 #endif
01270   static void *mcache = 0;
01271 
01272   SETUP_VAR_STACK(5);
01273   VAR_STACK_PUSH(0, method);
01274   VAR_STACK_PUSH(1, sElF);
01275   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+2);
01276   SET_VAR_STACK();
01277 
01278   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-size", &mcache);
01279   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnSize)) {
01280     SET_VAR_STACK();
01281     READY_TO_RETURN; ASSELF wxDialogBox::OnSize(x0, x1);
01282   } else {
01283   
01284   p[POFFSET+0] = scheme_make_integer(x0);
01285   p[POFFSET+1] = scheme_make_integer(x1);
01286   
01287   p[0] = (Scheme_Object *) ASSELF __gc_external;
01288 
01289   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+2, p));
01290   
01291   
01292      READY_TO_RETURN;
01293   }
01294 }
01295 
01296 static Scheme_Object *os_wxDialogBoxOnSetFocus(int n, Scheme_Object *p[]);
01297 
01298 void os_wxDialogBox::OnSetFocus()
01299 {
01300   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
01301   Scheme_Object *v;
01302   Scheme_Object *method INIT_NULLED_OUT;
01303 #ifdef MZ_PRECISE_GC
01304   os_wxDialogBox *sElF = this;
01305 #endif
01306   static void *mcache = 0;
01307 
01308   SETUP_VAR_STACK(5);
01309   VAR_STACK_PUSH(0, method);
01310   VAR_STACK_PUSH(1, sElF);
01311   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
01312   SET_VAR_STACK();
01313 
01314   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-set-focus", &mcache);
01315   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnSetFocus)) {
01316     SET_VAR_STACK();
01317     READY_TO_RETURN; ASSELF wxDialogBox::OnSetFocus();
01318   } else {
01319   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01320   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01321   p[0] = (Scheme_Object *) ASSELF __gc_external;
01322 
01323   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
01324   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01325   
01326      READY_TO_RETURN;
01327   }
01328 }
01329 
01330 static Scheme_Object *os_wxDialogBoxOnKillFocus(int n, Scheme_Object *p[]);
01331 
01332 void os_wxDialogBox::OnKillFocus()
01333 {
01334   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
01335   Scheme_Object *v;
01336   Scheme_Object *method INIT_NULLED_OUT;
01337 #ifdef MZ_PRECISE_GC
01338   os_wxDialogBox *sElF = this;
01339 #endif
01340   static void *mcache = 0;
01341 
01342   SETUP_VAR_STACK(5);
01343   VAR_STACK_PUSH(0, method);
01344   VAR_STACK_PUSH(1, sElF);
01345   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
01346   SET_VAR_STACK();
01347 
01348   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-kill-focus", &mcache);
01349   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnKillFocus)) {
01350     SET_VAR_STACK();
01351     READY_TO_RETURN; ASSELF wxDialogBox::OnKillFocus();
01352   } else {
01353   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01354   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01355   p[0] = (Scheme_Object *) ASSELF __gc_external;
01356 
01357   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
01358   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01359   
01360      READY_TO_RETURN;
01361   }
01362 }
01363 
01364 static Scheme_Object *os_wxDialogBoxOnClose(int n, Scheme_Object *p[]);
01365 
01366 Bool os_wxDialogBox::OnClose()
01367 {
01368   Scheme_Object *p[POFFSET+0] INIT_NULLED_ARRAY({ NULLED_OUT });
01369   Scheme_Object *v;
01370   Scheme_Object *method INIT_NULLED_OUT;
01371 #ifdef MZ_PRECISE_GC
01372   os_wxDialogBox *sElF = this;
01373 #endif
01374   static void *mcache = 0;
01375 
01376   SETUP_VAR_STACK(5);
01377   VAR_STACK_PUSH(0, method);
01378   VAR_STACK_PUSH(1, sElF);
01379   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+0);
01380   SET_VAR_STACK();
01381 
01382   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-close", &mcache);
01383   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnClose)) {
01384     SET_VAR_STACK();
01385     READY_TO_RETURN; return ASSELF wxDialogBox::OnClose();
01386   } else {
01387   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01388   ESCAPE_BLOCK(0)
01389   p[0] = (Scheme_Object *) ASSELF __gc_external;
01390 
01391   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+0, p));
01392   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01393   
01394   {
01395      Bool resval;
01396      resval = WITH_VAR_STACK(objscheme_unbundle_bool(v, "on-close in dialog%"", extracting return value"));
01397      READY_TO_RETURN;
01398      return resval;
01399   }
01400   }
01401 }
01402 
01403 static Scheme_Object *os_wxDialogBoxOnActivate(int n, Scheme_Object *p[]);
01404 
01405 void os_wxDialogBox::OnActivate(Bool x0)
01406 {
01407   Scheme_Object *p[POFFSET+1] INIT_NULLED_ARRAY({ NULLED_OUT INA_comma NULLED_OUT });
01408   Scheme_Object *v;
01409   Scheme_Object *method INIT_NULLED_OUT;
01410 #ifdef MZ_PRECISE_GC
01411   os_wxDialogBox *sElF = this;
01412 #endif
01413   static void *mcache = 0;
01414 
01415   SETUP_VAR_STACK(5);
01416   VAR_STACK_PUSH(0, method);
01417   VAR_STACK_PUSH(1, sElF);
01418   VAR_STACK_PUSH_ARRAY(2, p, POFFSET+1);
01419   SET_VAR_STACK();
01420 
01421   method = objscheme_find_method((Scheme_Object *) ASSELF __gc_external, os_wxDialogBox_class, "on-activate", &mcache);
01422   if (!method || OBJSCHEME_PRIM_METHOD(method, os_wxDialogBoxOnActivate)) {
01423     SET_VAR_STACK();
01424     READY_TO_RETURN; ASSELF wxDialogBox::OnActivate(x0);
01425   } else {
01426   mz_jmp_buf *savebuf, newbuf; Scheme_Thread *thread;
01427   p[POFFSET+0] = (x0 ? scheme_true : scheme_false);
01428   ESCAPE_BLOCK(ESCAPE_NO_RET_VAL)
01429   p[0] = (Scheme_Object *) ASSELF __gc_external;
01430 
01431   v = WITH_VAR_STACK(scheme_apply(method, POFFSET+1, p));
01432   { thread = scheme_get_current_thread(); thread->error_buf = savebuf; }
01433   
01434      READY_TO_RETURN;
01435   }
01436 }
01437 
01438 static Scheme_Object *os_wxDialogBoxdialogMenu(int n,  Scheme_Object *p[])
01439 {
01440   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01441   REMEMBER_VAR_STACK();
01442   objscheme_check_valid(os_wxDialogBox_class, "system-menu in dialog%", n, p);
01443 
01444   SETUP_VAR_STACK_REMEMBERED(1);
01445   VAR_STACK_PUSH(0, p);
01446 
01447   
01448 
01449   
01450   WITH_VAR_STACK(dialogMenu(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)));
01451 
01452   
01453   
01454   READY_TO_RETURN;
01455   return scheme_void;
01456 }
01457 
01458 static Scheme_Object *os_wxDialogBoxSetTitle(int n,  Scheme_Object *p[])
01459 {
01460   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01461   REMEMBER_VAR_STACK();
01462   objscheme_check_valid(os_wxDialogBox_class, "set-title in dialog%", n, p);
01463   string x0 INIT_NULLED_OUT;
01464 
01465   SETUP_VAR_STACK_REMEMBERED(2);
01466   VAR_STACK_PUSH(0, p);
01467   VAR_STACK_PUSH(1, x0);
01468 
01469   
01470   x0 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+0], "set-title in dialog%"));
01471 
01472   
01473   WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->SetTitle(x0));
01474 
01475   
01476   
01477   READY_TO_RETURN;
01478   return scheme_void;
01479 }
01480 
01481 static Scheme_Object *os_wxDialogBoxOnDropFile(int n,  Scheme_Object *p[])
01482 {
01483   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01484   REMEMBER_VAR_STACK();
01485   objscheme_check_valid(os_wxDialogBox_class, "on-drop-file in dialog%", n, p);
01486   epathname x0 INIT_NULLED_OUT;
01487 
01488   SETUP_VAR_STACK_REMEMBERED(2);
01489   VAR_STACK_PUSH(0, p);
01490   VAR_STACK_PUSH(1, x0);
01491 
01492   
01493   x0 = (epathname)WITH_VAR_STACK(objscheme_unbundle_epathname(p[POFFSET+0], "on-drop-file in dialog%"));
01494 
01495   
01496   if (((Scheme_Class_Object *)p[0])->primflag)
01497     WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnDropFile(x0));
01498   else
01499     WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnDropFile(x0));
01500 
01501   
01502   
01503   READY_TO_RETURN;
01504   return scheme_void;
01505 }
01506 
01507 static Scheme_Object *os_wxDialogBoxPreOnEvent(int n,  Scheme_Object *p[])
01508 {
01509   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01510   REMEMBER_VAR_STACK();
01511   Bool r;
01512   objscheme_check_valid(os_wxDialogBox_class, "pre-on-event in dialog%", n, p);
01513   class wxWindow* x0 INIT_NULLED_OUT;
01514   class wxMouseEvent* x1 INIT_NULLED_OUT;
01515 
01516   SETUP_VAR_STACK_REMEMBERED(3);
01517   VAR_STACK_PUSH(0, p);
01518   VAR_STACK_PUSH(1, x0);
01519   VAR_STACK_PUSH(2, x1);
01520 
01521   
01522   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-event in dialog%", 0));
01523   x1 = WITH_VAR_STACK(objscheme_unbundle_wxMouseEvent(p[POFFSET+1], "pre-on-event in dialog%", 0));
01524 
01525   
01526   if (((Scheme_Class_Object *)p[0])->primflag)
01527     r = WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnEvent(x0, x1));
01528   else
01529     r = WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnEvent(x0, x1));
01530 
01531   
01532   
01533   READY_TO_RETURN;
01534   return (r ? scheme_true : scheme_false);
01535 }
01536 
01537 static Scheme_Object *os_wxDialogBoxPreOnChar(int n,  Scheme_Object *p[])
01538 {
01539   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01540   REMEMBER_VAR_STACK();
01541   Bool r;
01542   objscheme_check_valid(os_wxDialogBox_class, "pre-on-char in dialog%", n, p);
01543   class wxWindow* x0 INIT_NULLED_OUT;
01544   class wxKeyEvent* x1 INIT_NULLED_OUT;
01545 
01546   SETUP_VAR_STACK_REMEMBERED(3);
01547   VAR_STACK_PUSH(0, p);
01548   VAR_STACK_PUSH(1, x0);
01549   VAR_STACK_PUSH(2, x1);
01550 
01551   
01552   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "pre-on-char in dialog%", 0));
01553   x1 = WITH_VAR_STACK(objscheme_unbundle_wxKeyEvent(p[POFFSET+1], "pre-on-char in dialog%", 0));
01554 
01555   
01556   if (((Scheme_Class_Object *)p[0])->primflag)
01557     r = WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)-> wxWindow::PreOnChar(x0, x1));
01558   else
01559     r = WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->PreOnChar(x0, x1));
01560 
01561   
01562   
01563   READY_TO_RETURN;
01564   return (r ? scheme_true : scheme_false);
01565 }
01566 
01567 static Scheme_Object *os_wxDialogBoxOnSize(int n,  Scheme_Object *p[])
01568 {
01569   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01570   REMEMBER_VAR_STACK();
01571   objscheme_check_valid(os_wxDialogBox_class, "on-size in dialog%", n, p);
01572   int x0;
01573   int x1;
01574 
01575   SETUP_VAR_STACK_REMEMBERED(1);
01576   VAR_STACK_PUSH(0, p);
01577 
01578   
01579   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "on-size in dialog%"));
01580   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "on-size in dialog%"));
01581 
01582   
01583   if (((Scheme_Class_Object *)p[0])->primflag)
01584     WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnSize(x0, x1));
01585   else
01586     WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSize(x0, x1));
01587 
01588   
01589   
01590   READY_TO_RETURN;
01591   return scheme_void;
01592 }
01593 
01594 static Scheme_Object *os_wxDialogBoxOnSetFocus(int n,  Scheme_Object *p[])
01595 {
01596   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01597   REMEMBER_VAR_STACK();
01598   objscheme_check_valid(os_wxDialogBox_class, "on-set-focus in dialog%", n, p);
01599 
01600   SETUP_VAR_STACK_REMEMBERED(1);
01601   VAR_STACK_PUSH(0, p);
01602 
01603   
01604 
01605   
01606   if (((Scheme_Class_Object *)p[0])->primflag)
01607     WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnSetFocus());
01608   else
01609     WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnSetFocus());
01610 
01611   
01612   
01613   READY_TO_RETURN;
01614   return scheme_void;
01615 }
01616 
01617 static Scheme_Object *os_wxDialogBoxOnKillFocus(int n,  Scheme_Object *p[])
01618 {
01619   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01620   REMEMBER_VAR_STACK();
01621   objscheme_check_valid(os_wxDialogBox_class, "on-kill-focus in dialog%", n, p);
01622 
01623   SETUP_VAR_STACK_REMEMBERED(1);
01624   VAR_STACK_PUSH(0, p);
01625 
01626   
01627 
01628   
01629   if (((Scheme_Class_Object *)p[0])->primflag)
01630     WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnKillFocus());
01631   else
01632     WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnKillFocus());
01633 
01634   
01635   
01636   READY_TO_RETURN;
01637   return scheme_void;
01638 }
01639 
01640 static Scheme_Object *os_wxDialogBoxEnforceSize(int n,  Scheme_Object *p[])
01641 {
01642   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01643   REMEMBER_VAR_STACK();
01644   objscheme_check_valid(os_wxDialogBox_class, "enforce-size in dialog%", n, p);
01645   int x0;
01646   int x1;
01647   int x2;
01648   int x3;
01649   int x4;
01650   int x5;
01651 
01652   SETUP_VAR_STACK_REMEMBERED(1);
01653   VAR_STACK_PUSH(0, p);
01654 
01655   
01656   x0 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+0], "enforce-size in dialog%"));
01657   x1 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+1], "enforce-size in dialog%"));
01658   x2 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+2], "enforce-size in dialog%"));
01659   x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "enforce-size in dialog%"));
01660   x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "enforce-size in dialog%"));
01661   x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "enforce-size in dialog%"));
01662 
01663   
01664   WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->EnforceSize(x0, x1, x2, x3, x4, x5));
01665 
01666   
01667   
01668   READY_TO_RETURN;
01669   return scheme_void;
01670 }
01671 
01672 static Scheme_Object *os_wxDialogBoxOnClose(int n,  Scheme_Object *p[])
01673 {
01674   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01675   REMEMBER_VAR_STACK();
01676   Bool r;
01677   objscheme_check_valid(os_wxDialogBox_class, "on-close in dialog%", n, p);
01678 
01679   SETUP_VAR_STACK_REMEMBERED(1);
01680   VAR_STACK_PUSH(0, p);
01681 
01682   
01683 
01684   
01685   if (((Scheme_Class_Object *)p[0])->primflag)
01686     r = WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnClose());
01687   else
01688     r = WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnClose());
01689 
01690   
01691   
01692   READY_TO_RETURN;
01693   return (r ? scheme_true : scheme_false);
01694 }
01695 
01696 static Scheme_Object *os_wxDialogBoxOnActivate(int n,  Scheme_Object *p[])
01697 {
01698   WXS_USE_ARGUMENT(n) WXS_USE_ARGUMENT(p)
01699   REMEMBER_VAR_STACK();
01700   objscheme_check_valid(os_wxDialogBox_class, "on-activate in dialog%", n, p);
01701   Bool x0;
01702 
01703   SETUP_VAR_STACK_REMEMBERED(1);
01704   VAR_STACK_PUSH(0, p);
01705 
01706   
01707   x0 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+0], "on-activate in dialog%"));
01708 
01709   
01710   if (((Scheme_Class_Object *)p[0])->primflag)
01711     WITH_VAR_STACK(((os_wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->wxDialogBox::OnActivate(x0));
01712   else
01713     WITH_VAR_STACK(((wxDialogBox *)((Scheme_Class_Object *)p[0])->primdata)->OnActivate(x0));
01714 
01715   
01716   
01717   READY_TO_RETURN;
01718   return scheme_void;
01719 }
01720 
01721 static Scheme_Object *os_wxDialogBox_ConstructScheme(int n,  Scheme_Object *p[])
01722 {
01723   SETUP_PRE_VAR_STACK(1);
01724   PRE_VAR_STACK_PUSH(0, p);
01725   os_wxDialogBox *realobj INIT_NULLED_OUT;
01726   REMEMBER_VAR_STACK();
01727   class wxWindow* x0 INIT_NULLED_OUT;
01728   nstring x1 INIT_NULLED_OUT;
01729   Bool x2;
01730   int x3;
01731   int x4;
01732   int x5;
01733   int x6;
01734   int x7;
01735   string x8 INIT_NULLED_OUT;
01736 
01737   SETUP_VAR_STACK_PRE_REMEMBERED(5);
01738   VAR_STACK_PUSH(0, p);
01739   VAR_STACK_PUSH(1, realobj);
01740   VAR_STACK_PUSH(2, x0);
01741   VAR_STACK_PUSH(3, x1);
01742   VAR_STACK_PUSH(4, x8);
01743 
01744   
01745   if ((n < (POFFSET+2)) || (n > (POFFSET+9))) 
01746     WITH_VAR_STACK(scheme_wrong_count_m("initialization in dialog%", POFFSET+2, POFFSET+9, n, p, 1));
01747   x0 = WITH_VAR_STACK(objscheme_unbundle_wxWindow(p[POFFSET+0], "initialization in dialog%", 1));
01748   x1 = (nstring)WITH_VAR_STACK(objscheme_unbundle_nullable_string(p[POFFSET+1], "initialization in dialog%"));
01749   if (n > (POFFSET+2)) {
01750     x2 = WITH_VAR_STACK(objscheme_unbundle_bool(p[POFFSET+2], "initialization in dialog%"));
01751   } else
01752     x2 = FALSE;
01753   if (n > (POFFSET+3)) {
01754     x3 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+3], "initialization in dialog%"));
01755   } else
01756     x3 = 300;
01757   if (n > (POFFSET+4)) {
01758     x4 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+4], "initialization in dialog%"));
01759   } else
01760     x4 = 300;
01761   if (n > (POFFSET+5)) {
01762     x5 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+5], "initialization in dialog%"));
01763   } else
01764     x5 = 500;
01765   if (n > (POFFSET+6)) {
01766     x6 = WITH_VAR_STACK(objscheme_unbundle_integer(p[POFFSET+6], "initialization in dialog%"));
01767   } else
01768     x6 = 500;
01769   if (n > (POFFSET+7)) {
01770     x7 = WITH_VAR_STACK(unbundle_symset_dialogStyle(p[POFFSET+7], "initialization in dialog%"));
01771   } else
01772     x7 = 0;
01773   if (n > (POFFSET+8)) {
01774     x8 = (string)WITH_VAR_STACK(objscheme_unbundle_string(p[POFFSET+8], "initialization in dialog%"));
01775   } else
01776     x8 = "dialogBox";
01777 
01778   if (x0 && !wxSubType(((wxObject *)x0)->__type, wxTYPE_FRAME) && !wxSubType(((wxObject *)x0)->__type, wxTYPE_DIALOG_BOX)) scheme_wrong_type(METHODNAME("dialog%","initialization"), "frame or dialog box", POFFSET+0, n, p);WITH_VAR_STACK(wxsCheckEventspace(METHODNAME("dialog%","initialization")));if (!x5) x5 = -1;if (!x6) x6 = -1;
01779   realobj = WITH_VAR_STACK(new os_wxDialogBox CONSTRUCTOR_ARGS((x0, x1, x2, x3, x4, x5, x6, x7, x8)));
01780 #ifdef MZ_PRECISE_GC
01781   WITH_VAR_STACK(realobj->gcInit_wxDialogBox(x0, x1, x2, x3, x4, x5, x6, x7, x8));
01782 #endif
01783   realobj->__gc_external = (void *)p[0];
01784   
01785   
01786   READY_TO_RETURN;
01787   ((Scheme_Class_Object *)p[0])->primdata = realobj;
01788   ((Scheme_Class_Object *)p[0])->primflag = 1;
01789   WITH_REMEMBERED_STACK(objscheme_register_primpointer(p[0], &((Scheme_Class_Object *)p[0])->primdata));
01790   return scheme_void;
01791 }
01792 
01793 void objscheme_setup_wxDialogBox(Scheme_Env *env)
01794 {
01795   SETUP_VAR_STACK(1);
01796   VAR_STACK_PUSH(0, env);
01797 
01798   wxREGGLOB(os_wxDialogBox_class);
01799 
01800   os_wxDialogBox_class = WITH_VAR_STACK(objscheme_def_prim_class(env, "dialog%", "window%", (Scheme_Method_Prim *)os_wxDialogBox_ConstructScheme, 11));
01801 
01802   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "system-menu" " method", (Scheme_Method_Prim *)os_wxDialogBoxdialogMenu, 0, 0));
01803   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "set-title" " method", (Scheme_Method_Prim *)os_wxDialogBoxSetTitle, 1, 1));
01804   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-drop-file" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnDropFile, 1, 1));
01805   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "pre-on-event" " method", (Scheme_Method_Prim *)os_wxDialogBoxPreOnEvent, 2, 2));
01806   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "pre-on-char" " method", (Scheme_Method_Prim *)os_wxDialogBoxPreOnChar, 2, 2));
01807   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-size" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnSize, 2, 2));
01808   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-set-focus" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnSetFocus, 0, 0));
01809   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-kill-focus" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnKillFocus, 0, 0));
01810   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "enforce-size" " method", (Scheme_Method_Prim *)os_wxDialogBoxEnforceSize, 6, 6));
01811   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-close" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnClose, 0, 0));
01812   WITH_VAR_STACK(scheme_add_method_w_arity(os_wxDialogBox_class, "on-activate" " method", (Scheme_Method_Prim *)os_wxDialogBoxOnActivate, 1, 1));
01813 
01814 
01815   WITH_VAR_STACK(scheme_made_class(os_wxDialogBox_class));
01816 
01817   WITH_VAR_STACK(objscheme_install_bundler((Objscheme_Bundler)objscheme_bundle_wxDialogBox, wxTYPE_DIALOG_BOX));
01818 
01819   READY_TO_RETURN;
01820 }
01821 
01822 int objscheme_istype_wxDialogBox(Scheme_Object *obj, const char *stop, int nullOK)
01823 {
01824   REMEMBER_VAR_STACK();
01825   if (nullOK && XC_SCHEME_NULLP(obj)) return 1;
01826   if (objscheme_is_a(obj,  os_wxDialogBox_class))
01827     return 1;
01828   else {
01829     if (!stop)
01830        return 0;
01831     WITH_REMEMBERED_STACK(scheme_wrong_type(stop, nullOK ? "dialog% object or " XC_NULL_STR: "dialog% object", -1, 0, &obj));
01832     return 0;
01833   }
01834 }
01835 
01836 Scheme_Object *objscheme_bundle_wxDialogBox(class wxDialogBox *realobj)
01837 {
01838   Scheme_Class_Object *obj INIT_NULLED_OUT;
01839   Scheme_Object *sobj INIT_NULLED_OUT;
01840 
01841   if (!realobj) return XC_SCHEME_NULL;
01842 
01843   if (realobj->__gc_external)
01844     return (Scheme_Object *)realobj->__gc_external;
01845 
01846   SETUP_VAR_STACK(2);
01847   VAR_STACK_PUSH(0, obj);
01848   VAR_STACK_PUSH(1, realobj);
01849 
01850   if ((realobj->__type != wxTYPE_DIALOG_BOX) && (sobj = WITH_VAR_STACK(objscheme_bundle_by_type(realobj, realobj->__type))))
01851     { READY_TO_RETURN; return sobj; }
01852   obj = (Scheme_Class_Object *)WITH_VAR_STACK(scheme_make_uninited_object(os_wxDialogBox_class));
01853 
01854   obj->primdata = realobj;
01855   WITH_VAR_STACK(objscheme_register_primpointer(obj, &obj->primdata));
01856   obj->primflag = 0;
01857 
01858   realobj->__gc_external = (void *)obj;
01859   READY_TO_RETURN;
01860   return (Scheme_Object *)obj;
01861 }
01862 
01863 class wxDialogBox *objscheme_unbundle_wxDialogBox(Scheme_Object *obj, const char *where, int nullOK)
01864 {
01865   if (nullOK && XC_SCHEME_NULLP(obj)) return NULL;
01866 
01867   REMEMBER_VAR_STACK();
01868 
01869   (void)objscheme_istype_wxDialogBox(obj, where, nullOK);
01870   Scheme_Class_Object *o = (Scheme_Class_Object *)obj;
01871   WITH_REMEMBERED_STACK(objscheme_check_valid(NULL, NULL, 0, &obj));
01872   if (o->primflag)
01873     return (os_wxDialogBox *)o->primdata;
01874   else
01875     return (wxDialogBox *)o->primdata;
01876 }
01877