]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_collpane.cpp
No changes, just minor wxMSW code cleanup: use WinStruct<>.
[wxWidgets.git] / src / xrc / xh_collpane.cpp
index c335919622f7e0be187de92c97c753d506b49443..70b50113faecfef963ef4f5eacd58c416276f2d9 100644 (file)
 
 #if wxUSE_XRC && wxUSE_COLLPANE
 
-#include "wx/xrc/xh_collpane.h"
+#ifndef WX_PRECOMP
+    #include "wx/log.h"
+#endif
+
 #include "wx/collpane.h"
+#include "wx/xrc/xh_collpane.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler, wxXmlResourceHandler)
 
-wxCollapsiblePaneXmlHandler::wxCollapsiblePaneXmlHandler() : wxXmlResourceHandler()
+wxCollapsiblePaneXmlHandler::wxCollapsiblePaneXmlHandler()
+: wxXmlResourceHandler(), m_isInside(false)
 {
     XRC_ADD_STYLE(wxCP_NO_TLW_RESIZE);
     XRC_ADD_STYLE(wxCP_DEFAULT_STYLE);
@@ -49,7 +54,7 @@ wxObject *wxCollapsiblePaneXmlHandler::DoCreateResource()
         }
         else
         {
-            wxLogError(wxT("Error in resource: no control within collapsible pane's <panewindow> tag."));
+            ReportError("no control within panewindow");
             return NULL;
         }
     }
@@ -60,7 +65,7 @@ wxObject *wxCollapsiblePaneXmlHandler::DoCreateResource()
         wxString label = GetParamValue(wxT("label"));
         if (label.empty())
         {
-            wxLogError(wxT("Error in resource: empty label for wxCollapsiblePane"));
+            ReportParamError("label", "label cannot be empty");
             return NULL;
         }
 
@@ -68,11 +73,11 @@ wxObject *wxCollapsiblePaneXmlHandler::DoCreateResource()
                     GetID(),
                     label,
                     GetPosition(), GetSize(),
-                    GetStyle(_T("style"), wxCP_DEFAULT_STYLE),
+                    GetStyle(wxT("style"), wxCP_DEFAULT_STYLE),
                     wxDefaultValidator,
                     GetName());
 
-        ctrl->Collapse(GetBool(_T("collapsed")));
+        ctrl->Collapse(GetBool(wxT("collapsed")));
         SetupWindow(ctrl);
 
         wxCollapsiblePane *old_par = m_collpane;