// Purpose: XRC resource for wxSplitterWindow
// Author: panga@freemail.hu, Vaclav Slavik
// Created: 2003/01/26
-// RCS-ID: $Id$
// Copyright: (c) 2003 panga@freemail.hu, Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/splitter.h"
+#include "wx/xml/xml.h"
+
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindowXmlHandler, wxXmlResourceHandler)
wxSplitterWindowXmlHandler::wxSplitterWindowXmlHandler() : wxXmlResourceHandler()
long sashpos = GetLong(wxT("sashpos"), 0);
long minpanesize = GetLong(wxT("minsize"), -1);
+ float gravity = GetFloat(wxT("gravity"), 0.0);
if (minpanesize != -1)
- splitter->SetMinimumPaneSize(minpanesize);
+ splitter->SetMinimumPaneSize(minpanesize);
+ if (gravity != 0.0)
+ splitter->SetSashGravity(gravity);
wxWindow *win1 = NULL, *win2 = NULL;
wxXmlNode *n = m_node->GetChildren();
}
if (win1 == NULL)
- wxLogError(wxT("wxSplitterWindow node must contain at least one window."));
+ ReportError("wxSplitterWindow node must contain at least one window");
bool horizontal = (GetParamValue(wxT("orientation")) != wxT("vertical"));
if (win1 && win2)