/////////////////////////////////////////////////////////////////////////////
// Name:        xh_pagectrl.cpp
// Purpose:     XML resource for wxListCtrl
// Author:      Aleksandras Gluchovas
// Created:     2002/03/18
// RCS-ID:      $Id: xh_pagectrl.cpp,v 1.2 2001/04/19 21:09:25 georgetasker Exp $
// Copyright:   (c) 2000 Aleksandras Gluchovas (email: alex@soften.ktu.lt)
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////
 
#ifdef __GNUG__
#pragma implementation "xh_pagectrl.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/wspp/xh_pagectrl.h"
#include "wx/wspp/pagectrl.h"

wxPageCtrlXmlHandler::wxPageCtrlXmlHandler() 
: wxXmlResourceHandler() 
{
    AddWindowStyles();
}


wxObject *wxPageCtrlXmlHandler::DoCreateResource()
{ 
	wxPagingCtrl* ctrl = wxDynamicCast(m_Instance, wxPagingCtrl );

	if ( ctrl )

		ctrl->Create( m_ParentAsWindow, 
					  GetID(),
					  GetPosition(),
					  GetSize(),
					  GetStyle(),
					  GetName() );
	else
		ctrl = new wxPagingCtrl(m_ParentAsWindow,
								GetID(),
								GetPosition(), GetSize(),
								GetStyle(),
								GetName());

    SetupWindow(ctrl);
    
    return ctrl;
}

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