00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "wx/wxprec.h"
00022
00023 #ifdef __BORLANDC__
00024 #pragma hdrstop
00025 #endif
00026
00027
00028
00029 #ifndef WX_PRECOMP
00030 #include "wx/wx.h"
00031 #endif
00032
00033
00034
00035
00036
00037
00038 #if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
00039 #include "mondrian.xpm"
00040 #endif
00041
00042
00043
00044
00045
00046
00047 class SBApp : public wxApp
00048 {
00049 public:
00050
00051
00052
00053
00054
00055
00056 virtual bool OnInit();
00057 };
00058
00059
00060
00061
00062
00063
00064 IMPLEMENT_APP(SBApp)
00065
00066
00067
00068
00069
00070
00071
00072
00073 #if 0 && _WIN32
00074 char *_pgmptr;
00075 #include <ctype.h>
00076
00077 unsigned short *_pctype = _ctype+1;
00078 unsigned short *_pwctype = _ctype+1;
00079
00080 unsigned short _ctype[257] = {
00081 0,
00082 _CONTROL,
00083 _CONTROL,
00084 _CONTROL,
00085 _CONTROL,
00086 _CONTROL,
00087 _CONTROL,
00088 _CONTROL,
00089 _CONTROL,
00090 _CONTROL,
00091 _SPACE+_CONTROL,
00092 _SPACE+_CONTROL,
00093 _SPACE+_CONTROL,
00094 _SPACE+_CONTROL,
00095 _SPACE+_CONTROL,
00096 _CONTROL,
00097 _CONTROL,
00098 _CONTROL,
00099 _CONTROL,
00100 _CONTROL,
00101 _CONTROL,
00102 _CONTROL,
00103 _CONTROL,
00104 _CONTROL,
00105 _CONTROL,
00106 _CONTROL,
00107 _CONTROL,
00108 _CONTROL,
00109 _CONTROL,
00110 _CONTROL,
00111 _CONTROL,
00112 _CONTROL,
00113 _CONTROL,
00114 _SPACE+_BLANK,
00115 _PUNCT,
00116 _PUNCT,
00117 _PUNCT,
00118 _PUNCT,
00119 _PUNCT,
00120 _PUNCT,
00121 _PUNCT,
00122 _PUNCT,
00123 _PUNCT,
00124 _PUNCT,
00125 _PUNCT,
00126 _PUNCT,
00127 _PUNCT,
00128 _PUNCT,
00129 _PUNCT,
00130 _DIGIT+_HEX,
00131 _DIGIT+_HEX,
00132 _DIGIT+_HEX,
00133 _DIGIT+_HEX,
00134 _DIGIT+_HEX,
00135 _DIGIT+_HEX,
00136 _DIGIT+_HEX,
00137 _DIGIT+_HEX,
00138 _DIGIT+_HEX,
00139 _DIGIT+_HEX,
00140 _PUNCT,
00141 _PUNCT,
00142 _PUNCT,
00143 _PUNCT,
00144 _PUNCT,
00145 _PUNCT,
00146 _PUNCT,
00147 _UPPER+_HEX,
00148 _UPPER+_HEX,
00149 _UPPER+_HEX,
00150 _UPPER+_HEX,
00151 _UPPER+_HEX,
00152 _UPPER+_HEX,
00153 _UPPER,
00154 _UPPER,
00155 _UPPER,
00156 _UPPER,
00157 _UPPER,
00158 _UPPER,
00159 _UPPER,
00160 _UPPER,
00161 _UPPER,
00162 _UPPER,
00163 _UPPER,
00164 _UPPER,
00165 _UPPER,
00166 _UPPER,
00167 _UPPER,
00168 _UPPER,
00169 _UPPER,
00170 _UPPER,
00171 _UPPER,
00172 _UPPER,
00173 _PUNCT,
00174 _PUNCT,
00175 _PUNCT,
00176 _PUNCT,
00177 _PUNCT,
00178 _PUNCT,
00179 _LOWER+_HEX,
00180 _LOWER+_HEX,
00181 _LOWER+_HEX,
00182 _LOWER+_HEX,
00183 _LOWER+_HEX,
00184 _LOWER+_HEX,
00185 _LOWER,
00186 _LOWER,
00187 _LOWER,
00188 _LOWER,
00189 _LOWER,
00190 _LOWER,
00191 _LOWER,
00192 _LOWER,
00193 _LOWER,
00194 _LOWER,
00195 _LOWER,
00196 _LOWER,
00197 _LOWER,
00198 _LOWER,
00199 _LOWER,
00200 _LOWER,
00201 _LOWER,
00202 _LOWER,
00203 _LOWER,
00204 _LOWER,
00205 _PUNCT,
00206 _PUNCT,
00207 _PUNCT,
00208 _PUNCT,
00209 _CONTROL,
00210
00211 };
00212 int __mb_cur_max=MB_CUR_MAX;
00213 char **_environ;
00214 #endif
00215
00216 extern "C" void * C_wxWindow(void *pParent, int id, int posx, int posy, int sizex, int sizey, long style, char *pszName){
00217 return new wxWindow((wxWindow *)pParent, id, wxPoint(posx,posy),wxSize(sizex,sizey),style,_T(pszName));
00218 }
00219
00220 extern "C" void * C_wxFrame(void *pParent, int id, char *pszTitle, int posx, int posy, int sizex, int sizey, long style, char *pszName){
00221 wxButton *button = (wxButton*) NULL;
00222 wxFrame *main_frame = new wxFrame((wxWindow *)pParent, id, _T(pszTitle),wxPoint(posx,posy),wxSize(sizex,sizey),style,_T(pszName));
00223
00224 main_frame->CreateToolBar(wxNO_BORDER|wxTB_VERTICAL, 500);
00225 button = new wxButton( main_frame, -1, "Press to reparent!" );
00226
00227 wxTheApp->SetTopWindow(main_frame);
00228 main_frame->Show(1);
00229 main_frame->Raise();
00230 return main_frame;
00231 }
00232
00233
00234 extern "C" void mainwx(int,char **);
00235
00236 bool SBApp::OnInit()
00237 {
00238 #ifdef _WIN32
00239 _pgmptr = this->argv[0];
00240 _environ = NULL;
00241 #endif
00242 mainwx(this->argc,this->argv);
00243 return 1;
00244 }