X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13baae2c95ae2e0eb01736b7d1fac6be4a2e6a3f..b7c75283f2144469e8fa6a24ca285b42fab69a6b:/wxPython/contrib/activex/wxie/wxIEApp.cpp diff --git a/wxPython/contrib/activex/wxie/wxIEApp.cpp b/wxPython/contrib/activex/wxie/wxIEApp.cpp new file mode 100644 index 0000000000..1c1dd737a5 --- /dev/null +++ b/wxPython/contrib/activex/wxie/wxIEApp.cpp @@ -0,0 +1,99 @@ +/* + wxActiveX Library Licence, Version 3 + ==================================== + + Copyright (C) 2003 Lindsay Mathieson [, ...] + + Everyone is permitted to copy and distribute verbatim copies + of this licence document, but changing it is not allowed. + + wxActiveX LIBRARY LICENCE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public Licence as published by + the Free Software Foundation; either version 2 of the Licence, or (at + your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library + General Public Licence for more details. + + You should have received a copy of the GNU Library General Public Licence + along with this software, usually in a file named COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA. + + EXCEPTION NOTICE + + 1. As a special exception, the copyright holders of this library give + permission for additional uses of the text contained in this release of + the library as licenced under the wxActiveX Library Licence, applying + either version 3 of the Licence, or (at your option) any later version of + the Licence as published by the copyright holders of version 3 of the + Licence document. + + 2. The exception is that you may use, copy, link, modify and distribute + under the user's own terms, binary object code versions of works based + on the Library. + + 3. If you copy code from files distributed under the terms of the GNU + General Public Licence or the GNU Library General Public Licence into a + copy of this library, as this licence permits, the exception does not + apply to the code that you add in this way. To avoid misleading anyone as + to the status of such modified files, you must delete this exception + notice from such code and/or adjust the licensing conditions notice + accordingly. + + 4. If you write modifications of your own for this library, it is your + choice whether to permit this exception to apply to your modifications. + If you do not wish that, you must delete the exception notice from such + code and/or adjust the licensing conditions notice accordingly. +*/ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +// For compilers that support precompilation, includes "wx/wx.h". +#if defined(__WXGTK__) || defined(__WXMOTIF__) + #include "wx/wx.h" +#endif +#include "wx/wxprec.h" +#include "wxIEApp.h" +#include "wxIEFrm.h" +#include "resource.h" + + + +// Create a new application object: this macro will allow wxWindows to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also declares the accessor function +// wxGetApp() which will return the reference of the right type (i.e. wxIEApp and +// not wxApp) +IMPLEMENT_APP(wxIEApp) + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// the application class +// ---------------------------------------------------------------------------- + +// 'Main program' equivalent: the program execution "starts" here +bool wxIEApp::OnInit() +{ + // create the main application window + wxIEFrame *frame = new wxIEFrame(wxT("IE Test")); + + // and show it (the frames, unlike simple controls, are not shown when + // created initially) + frame->Show(TRUE); + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned FALSE here, the + // application would exit immediately. + return TRUE; +} +