]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/docview.cpp
support for getting current event loop on iPhone
[wxWidgets.git] / samples / docview / docview.cpp
index 5e0c865bae8e2cf244ef9df950261ecadc3a723a..b865b6f42590348df34d8b6659b1a6b493fca9ef 100644 (file)
@@ -148,6 +148,8 @@ bool MyApp::OnInit()
     if ( !wxApp::OnInit() )
         return false;
 
+    ::wxInitAllImageHandlers();
+
     SetAppName("DocView Sample");
 
     //// Create a document manager
@@ -176,6 +178,10 @@ bool MyApp::OnInit()
 #if defined( __WXMAC__ ) && wxOSX_USE_CARBON
         wxFileName::MacRegisterDefaultTypeAndCreator("txt" , 'TEXT' , 'WXMA');
 #endif
+        // Create a template relating image documents to their views
+        new wxDocTemplate(docManager, "Image", "*.png;*.jpg", "", "png;jpg",
+                          "Image Doc", "Image View",
+                          CLASSINFO(wxImageDocument), CLASSINFO(wxImageView));
     }
 
     // create the main frame window