/////////////////////////////////////////////////////////////////////////////
// Name:        xh_mtx_frame.cpp
// Purpose:     XML resource for dialogs
// Author:      Aleksandras Gluchovas
// Created:     2000/03/05
// RCS-ID:      $Id: xh_mtx_frame.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_frame.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/frame.h"
#include "wx/log.h"
#include "wx/intl.h"

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

wxMtxFrameXmlHandler::wxMtxFrameXmlHandler() 
	: wxFrameXmlHandler()
{}

wxObject *wxMtxFrameXmlHandler::DoCreateResource()
{ 
	wxFrame* frame = (wxFrame*)wxFrameXmlHandler::DoCreateResource();

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

	return frame;
}

bool wxMtxFrameXmlHandler::CanHandle(wxXmlNode *node)
{
    return IsOfClass(node, _T("wxMatrixFrame"));
}