lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5862] Move wxApp implementation


From: Greg Chicares
Subject: [lmi-commits] [5862] Move wxApp implementation
Date: Wed, 26 Feb 2014 21:03:30 +0000

Revision: 5862
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5862
Author:   chicares
Date:     2014-02-26 21:03:29 +0000 (Wed, 26 Feb 2014)
Log Message:
-----------
Move wxApp implementation

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/main_wx.cpp
    lmi/trunk/skeleton.cpp
    lmi/trunk/skeleton.hpp
    lmi/trunk/view_ex.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-02-26 15:37:17 UTC (rev 5861)
+++ lmi/trunk/ChangeLog 2014-02-26 21:03:29 UTC (rev 5862)
@@ -33610,3 +33610,12 @@
 Split lmi_wx_shared into a DLL and a small executable (VS). See:
   http://lists.nongnu.org/archive/html/lmi/2014-02/msg00007.html
 
+20140226T2103Z <address@hidden> [542]
+
+  main_wx.cpp
+  skeleton.cpp
+  skeleton.hpp
+  view_ex.cpp
+Move wxApp implementation (VS). See:
+  http://lists.nongnu.org/archive/html/lmi/2014-02/msg00004.html
+

Modified: lmi/trunk/main_wx.cpp
===================================================================
--- lmi/trunk/main_wx.cpp       2014-02-26 15:37:17 UTC (rev 5861)
+++ lmi/trunk/main_wx.cpp       2014-02-26 21:03:29 UTC (rev 5862)
@@ -47,6 +47,9 @@
 
 #include <wx/defs.h> // for wx_dependent_objects in workhorse.make
 
+IMPLEMENT_APP_NO_MAIN(Skeleton)
+IMPLEMENT_WX_THEME_SUPPORT
+
 #ifndef LMI_MSW
 int main(int argc, char* argv[])
 #else // LMI_MSW defined.

Modified: lmi/trunk/skeleton.cpp
===================================================================
--- lmi/trunk/skeleton.cpp      2014-02-26 15:37:17 UTC (rev 5861)
+++ lmi/trunk/skeleton.cpp      2014-02-26 21:03:29 UTC (rev 5862)
@@ -107,9 +107,6 @@
 #   include <gtk/gtk.h>
 #endif
 
-IMPLEMENT_APP_NO_MAIN(Skeleton)
-IMPLEMENT_WX_THEME_SUPPORT
-
 // Where a builtin wxID_X identifier exists, use it as such, even if
 // it's used as the 'name=' attribute of an entity in an '.xrc' file.
 // For example, write 'wxID_SAVE' here, not 'XRCID("wxID_SAVE")'.

Modified: lmi/trunk/skeleton.hpp
===================================================================
--- lmi/trunk/skeleton.hpp      2014-02-26 15:37:17 UTC (rev 5861)
+++ lmi/trunk/skeleton.hpp      2014-02-26 21:03:29 UTC (rev 5862)
@@ -128,7 +128,5 @@
     DECLARE_EVENT_TABLE()
 };
 
-DECLARE_APP(Skeleton)
-
 #endif // skeleton_hpp
 

Modified: lmi/trunk/view_ex.cpp
===================================================================
--- lmi/trunk/view_ex.cpp       2014-02-26 15:37:17 UTC (rev 5861)
+++ lmi/trunk/view_ex.cpp       2014-02-26 21:03:29 UTC (rev 5862)
@@ -48,7 +48,7 @@
 #include "alert.hpp"
 #include "assert_lmi.hpp"
 #include "docmanager_ex.hpp"
-#include "skeleton.hpp" // wxGetApp()
+#include "skeleton.hpp" // Skeleton::CreateChildFrame()
 #include "safely_dereference_as.hpp"
 #include "wx_new.hpp"
 
@@ -152,7 +152,10 @@
 //
 bool ViewEx::OnCreate(wxDocument* doc, long int)
 {
-    wxGetApp().CreateChildFrame(doc, this);
+    Skeleton* app = dynamic_cast<Skeleton*>(wxApp::GetInstance());
+    LMI_ASSERT(app);
+    app->CreateChildFrame(doc, this);
+
     DocManager().AssociateFileHistoryWithFileMenu(FrameWindow().GetMenuBar());
     GetFrame()->SetLabel("Loading document...");
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]