]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Really remove the droppings when there are no pages
[wxWidgets.git] / src / xrc / xmlres.cpp
index 0e1b2943abae40a074fa889bbf4e3cf050ef76e7..4aa3658c3d77313a49d96064c259361582152125 100644 (file)
@@ -727,9 +727,11 @@ void wxXmlResourceHandler::AddWindowStyles()
     XRC_ADD_STYLE(wxNO_BORDER);
     XRC_ADD_STYLE(wxTRANSPARENT_WINDOW);
     XRC_ADD_STYLE(wxWANTS_CHARS);
     XRC_ADD_STYLE(wxNO_BORDER);
     XRC_ADD_STYLE(wxTRANSPARENT_WINDOW);
     XRC_ADD_STYLE(wxWANTS_CHARS);
+    XRC_ADD_STYLE(wxTAB_TRAVERSAL);
     XRC_ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE);
     XRC_ADD_STYLE(wxFULL_REPAINT_ON_RESIZE);
     XRC_ADD_STYLE(wxWS_EX_BLOCK_EVENTS);
     XRC_ADD_STYLE(wxNO_FULL_REPAINT_ON_RESIZE);
     XRC_ADD_STYLE(wxFULL_REPAINT_ON_RESIZE);
     XRC_ADD_STYLE(wxWS_EX_BLOCK_EVENTS);
+    XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
 }
 
 
 }
 
 
@@ -1092,7 +1094,8 @@ wxString wxXmlResourceHandler::GetParamValue(const wxString& param)
 
 
 
 
 
 
-wxSize wxXmlResourceHandler::GetSize(const wxString& param)
+wxSize wxXmlResourceHandler::GetSize(const wxString& param,
+                                     wxWindow *windowToUse)
 {
     wxString s = GetParamValue(param);
     if (s.empty()) s = wxT("-1,-1");
 {
     wxString s = GetParamValue(param);
     if (s.empty()) s = wxT("-1,-1");
@@ -1111,8 +1114,14 @@ wxSize wxXmlResourceHandler::GetSize(const wxString& param)
 
     if (is_dlg)
     {
 
     if (is_dlg)
     {
-        if (m_parentAsWindow)
+        if (windowToUse)
+        {
+            return wxDLG_UNIT(windowToUse, wxSize(sx, sy));
+        }
+        else if (m_parentAsWindow)
+        {
             return wxDLG_UNIT(m_parentAsWindow, wxSize(sx, sy));
             return wxDLG_UNIT(m_parentAsWindow, wxSize(sx, sy));
+        }
         else
         {
             wxLogError(_("Cannot convert dialog units: dialog unknown."));
         else
         {
             wxLogError(_("Cannot convert dialog units: dialog unknown."));
@@ -1133,7 +1142,9 @@ wxPoint wxXmlResourceHandler::GetPosition(const wxString& param)
 
 
 
 
 
 
-wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaultv)
+wxCoord wxXmlResourceHandler::GetDimension(const wxString& param,
+                                           wxCoord defaultv,
+                                           wxWindow *windowToUse)
 {
     wxString s = GetParamValue(param);
     if (s.empty()) return defaultv;
 {
     wxString s = GetParamValue(param);
     if (s.empty()) return defaultv;
@@ -1151,8 +1162,14 @@ wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaul
 
     if (is_dlg)
     {
 
     if (is_dlg)
     {
-        if (m_parentAsWindow)
+        if (windowToUse)
+        {
+            return wxDLG_UNIT(windowToUse, wxSize(sx, 0)).x;
+        }
+        else if (m_parentAsWindow)
+        {
             return wxDLG_UNIT(m_parentAsWindow, wxSize(sx, 0)).x;
             return wxDLG_UNIT(m_parentAsWindow, wxSize(sx, 0)).x;
+        }
         else
         {
             wxLogError(_("Cannot convert dialog units: dialog unknown."));
         else
         {
             wxLogError(_("Cannot convert dialog units: dialog unknown."));