/////////////////////////////////////////////////////////////////////////////
// Name:        xh_mtx_panel.cpp
// Purpose:     XML resource for panels
// Author:      Aleksandras Gluchovas
// Created:     2000/03/05
// RCS-ID:      $Id: xh_mtx_panel.cpp,v 1.2 2001/04/19 21:09:25 georgetasker Exp $
// Copyright:   (c) 2000 Aleksandras Gluchovas
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////
 
#ifdef __GNUG__
#pragma implementation "xh_panel.h"
#endif

// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif

#include "wx/panel.h"

#include "wx/wspp/xh_mtx_panel.h"
#include "wx/wspp/matrixg.h"

wxMtxPanelXmlHandler::wxMtxPanelXmlHandler() 
	: wxPanelXmlHandler()
{}


wxObject *wxMtxPanelXmlHandler::DoCreateResource()
{ 
	wxPanel* panel = (wxPanel*)wxPanelXmlHandler::DoCreateResource();

	wxString autos = GetParamValue("autosize");
	new wxMatrixLayoutGuard(panel, autos.Length() ? autos == "1" : TRUE );

	return panel;
}


bool wxMtxPanelXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, wxT("wxMatrixPanel"));
}
