]> git.saurik.com Git - wxWidgets.git/blame - src/mgl/app.cpp
added std icons to wxMGL
[wxWidgets.git] / src / mgl / app.cpp
CommitLineData
32b8ec41
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.cpp
3// Purpose:
4// Author: Vaclav Slavik
5// Id: $Id$
8f7b34a8 6// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
32b8ec41
VZ
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifdef __GNUG__
11 #pragma implementation "app.h"
12#endif
13
14#include "wx/app.h"
15#include "wx/settings.h"
16#include "wx/module.h"
17
18#include <mgraph.hpp>
19
20//-----------------------------------------------------------------------------
21// Global data
22//-----------------------------------------------------------------------------
23
32b8ec41
VZ
24wxApp *wxTheApp = (wxApp *) NULL;
25wxAppInitializerFunction wxAppBase::m_appInitFn = (wxAppInitializerFunction) NULL;
26
27// FIXME_MGL - whole file
28
29
30extern bool g_isIdle;
31
32bool g_mainThreadLocked = FALSE;
33
34void wxExit()
35{
36 exit(0);
37}
38
39//-----------------------------------------------------------------------------
40// wxYield
41//-----------------------------------------------------------------------------
42
43bool wxYield()
44{
45 return TRUE;
46}
47
48//-----------------------------------------------------------------------------
49// wxWakeUpIdle
50//-----------------------------------------------------------------------------
51
52void wxWakeUpIdle()
53{
54}
55
56//-----------------------------------------------------------------------------
57// wxApp
58//-----------------------------------------------------------------------------
59
60IMPLEMENT_DYNAMIC_CLASS(wxApp,wxEvtHandler)
61
62BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
63 EVT_IDLE(wxApp::OnIdle)
64END_EVENT_TABLE()
65
66
67int wxEntry( int argc, char *argv[] )
68{
69 return 0;
70}
71
72
73// FIXME_MGL - this is temporary solution, will be removed
74// once I have wxApp up and running
75bool wxMGL_Initialize()
76{
77 wxBuffer = new wxChar[BUFSIZ + 512];
78
79 wxClassInfo::InitializeClasses();
80 wxSystemSettings::Init();
81 wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
82 wxTheColourDatabase->Initialize();
83 wxInitializeStockLists();
84 wxInitializeStockObjects();
85 wxModule::RegisterModules();
86 if (!wxModule::InitializeModules()) return FALSE;
87 return TRUE;
88}
89