]> git.saurik.com Git - wxWidgets.git/blame - utils/dialoged/src/dialoged.cpp
don't crash when invalid colour is set as fg/bg colour
[wxWidgets.git] / utils / dialoged / src / dialoged.cpp
CommitLineData
457814b5
JS
1// Name: dialoged.cpp
2// Purpose: Main Dialog Editor implementation file
3// Author: Julian Smart
4// Modified by:
5// Created: 04/01/98
6// RCS-ID: $Id$
7// Copyright: (c) Julian Smart
8// Licence: wxWindows license
9/////////////////////////////////////////////////////////////////////////////
10
11#ifdef __GNUG__
12#pragma implementation "dialoged.h"
13#endif
14
15// For compilers that support precompilation, includes "wx/wx.h".
16#include "wx/wxprec.h"
17
18#ifdef __BORLANDC__
19#pragma hdrstop
20#endif
21
22#ifndef WX_PRECOMP
23#include "wx/wx.h"
24#endif
25
26#include "dialoged.h"
27
457814b5
JS
28IMPLEMENT_APP(MyApp)
29
7bf07d26 30BEGIN_EVENT_TABLE(MyApp, wxApp)
f6bcfd97
BP
31EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu)
32EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu)
7bf07d26
VZ
33END_EVENT_TABLE()
34
457814b5
JS
35MyApp::MyApp(void)
36{
37}
38
ae8351fc 39wxResourceManager *theResourceManager = NULL;
457814b5 40
03f68f12
JS
41#include "symbtabl.h"
42
457814b5
JS
43bool MyApp::OnInit(void)
44{
ae8351fc
JS
45 theResourceManager = new wxResourceManager;
46 theResourceManager->Initialize();
f6bcfd97 47
ae8351fc 48 theResourceManager->ShowResourceEditor(TRUE);
f6bcfd97 49
ae8351fc
JS
50 if (argc > 1)
51 theResourceManager->Load(argv[1]);
f6bcfd97 52
ae8351fc 53 SetTopWindow(theResourceManager->GetEditorFrame());
f6bcfd97 54
ae8351fc 55 return TRUE;
457814b5
JS
56}
57
ae8351fc
JS
58int MyApp::OnExit(void)
59{
60 delete theResourceManager;
61 theResourceManager = NULL;
62 return 0;
63}