]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/dialoged/src/dialoged.cpp
Added RTLD_GLOBAL to dlopen() flags which is needed if libraries depend
[wxWidgets.git] / utils / dialoged / src / dialoged.cpp
index 1abe2b507caf850fcea99202ea8fa68a61cfefe8..776852971dc19817ed9f273166cb85488b1f29e6 100644 (file)
@@ -1,4 +1,3 @@
-/////////////////////////////////////////////////////////////////////////////
 // Name:        dialoged.cpp
 // Purpose:     Main Dialog Editor implementation file
 // Author:      Julian Smart
 
 #include "dialoged.h"
 
-// A macro needed for some compilers (AIX) that need 'main' to be defined
-// in the application itself.
-IMPLEMENT_WXWIN_MAIN
-
 IMPLEMENT_APP(MyApp)
 
+BEGIN_EVENT_TABLE(MyApp, wxApp)
+    EVT_MENU(OBJECT_MENU_EDIT, MyApp::OnObjectPopupMenu)
+    EVT_MENU(OBJECT_MENU_DELETE, MyApp::OnObjectPopupMenu)
+END_EVENT_TABLE()
+
 MyApp::MyApp(void)
 {
 }
 
-wxResourceManager theResourceManager;
+wxResourceManager *theResourceManager = NULL;
+
+#include "symbtabl.h"
 
 bool MyApp::OnInit(void)
 {
-  theResourceManager.Initialize();
-  theResourceManager.ShowResourceEditor(TRUE);
+    theResourceManager = new wxResourceManager;
+    theResourceManager->Initialize();
+
+    theResourceManager->ShowResourceEditor(TRUE);
   
-  if (argc > 1)
-    theResourceManager.Load(argv[1]);
+    if (argc > 1)
+        theResourceManager->Load(argv[1]);
 
-  SetTopWindow(theResourceManager.GetEditorFrame());
+    SetTopWindow(theResourceManager->GetEditorFrame());
 
-  return TRUE;
+    return TRUE;
 }
 
+int MyApp::OnExit(void)
+{
+    delete theResourceManager;
+    theResourceManager = NULL;
+    return 0;
+}