]>
Commit | Line | Data |
---|---|---|
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 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2005 Agron Selimaj, Freepour Controls Inc. | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | // For compilers that support precompilation, includes "wx.h". | |
12 | #include "wx/wxprec.h" | |
13 | ||
14 | #ifdef __BORLANDC__ | |
15 | #pragma hdrstop | |
16 | #endif | |
17 | ||
f5e3d946 | 18 | #if wxUSE_XRC && wxUSE_GRID |
0e3c83a7 JS |
19 | |
20 | #include "wx/xrc/xh_grid.h" | |
21 | #include "wx/grid.h" | |
22 | ||
23 | IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler) | |
24 | ||
25 | wxGridXmlHandler::wxGridXmlHandler() | |
f5e3d946 | 26 | : wxXmlResourceHandler() |
0e3c83a7 JS |
27 | { |
28 | AddWindowStyles(); | |
29 | } | |
30 | ||
31 | wxObject *wxGridXmlHandler::DoCreateResource() | |
32 | { | |
33 | XRC_MAKE_INSTANCE(grid, wxGrid) | |
34 | ||
35 | grid->Create(m_parentAsWindow, | |
36 | GetID(), | |
37 | GetPosition(), GetSize(), | |
38 | GetStyle(wxT("style")), | |
39 | GetName()); | |
40 | ||
41 | SetupWindow( grid); | |
42 | ||
43 | return grid; | |
44 | } | |
45 | ||
46 | bool wxGridXmlHandler::CanHandle(wxXmlNode *node) | |
47 | { | |
48 | return IsOfClass(node, wxT("wxGrid")); | |
49 | } | |
50 | ||
f5e3d946 | 51 | #endif // wxUSE_XRC && wxUSE_GRID |