Applied patch [ 1308152 ] wxGrid XRC handler patch HEAD
Start of a wxGrid handler by Agron Selimaj Applied with corrections. Needs further work for retrieving grid properties and styles. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
51
src/xrc/xh_grid.cpp
Normal file
51
src/xrc/xh_grid.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: xh_grid.h
|
||||
// Purpose: XML resource handler for the grid control
|
||||
// Author: Agron Selimaj
|
||||
// Created: 2005/08/11
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2005 Agron Selimaj, Freepour Controls Inc.
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_XRC
|
||||
|
||||
#include "wx/xrc/xh_grid.h"
|
||||
#include "wx/grid.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler)
|
||||
|
||||
wxGridXmlHandler::wxGridXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
wxObject *wxGridXmlHandler::DoCreateResource()
|
||||
{
|
||||
XRC_MAKE_INSTANCE(grid, wxGrid)
|
||||
|
||||
grid->Create(m_parentAsWindow,
|
||||
GetID(),
|
||||
GetPosition(), GetSize(),
|
||||
GetStyle(wxT("style")),
|
||||
GetName());
|
||||
|
||||
SetupWindow( grid);
|
||||
|
||||
return grid;
|
||||
}
|
||||
|
||||
bool wxGridXmlHandler::CanHandle(wxXmlNode *node)
|
||||
{
|
||||
return IsOfClass(node, wxT("wxGrid"));
|
||||
}
|
||||
|
||||
#endif // wxUSE_XRC
|
Reference in New Issue
Block a user