]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_grid.cpp
Added wxRichTextTableBlock class to help with table UI operations
[wxWidgets.git] / src / xrc / xh_grid.cpp
CommitLineData
0e3c83a7 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/xrc/xh_grid.cpp
0e3c83a7
JS
3// Purpose: XML resource handler for the grid control
4// Author: Agron Selimaj
5// Created: 2005/08/11
0e3c83a7
JS
6// Copyright: (c) 2005 Agron Selimaj, Freepour Controls Inc.
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
f5e3d946 17#if wxUSE_XRC && wxUSE_GRID
0e3c83a7
JS
18
19#include "wx/xrc/xh_grid.h"
20#include "wx/grid.h"
21
22IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler)
23
24wxGridXmlHandler::wxGridXmlHandler()
f5e3d946 25 : wxXmlResourceHandler()
0e3c83a7
JS
26{
27 AddWindowStyles();
28}
29
30wxObject *wxGridXmlHandler::DoCreateResource()
31{
32 XRC_MAKE_INSTANCE(grid, wxGrid)
33
34 grid->Create(m_parentAsWindow,
35 GetID(),
36 GetPosition(), GetSize(),
37 GetStyle(wxT("style")),
38 GetName());
39
40 SetupWindow( grid);
41
42 return grid;
43}
44
45bool wxGridXmlHandler::CanHandle(wxXmlNode *node)
46{
47 return IsOfClass(node, wxT("wxGrid"));
48}
49
f5e3d946 50#endif // wxUSE_XRC && wxUSE_GRID