]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_grid.cpp
wxMSW: return correct value from wxMessageDialog::GetReturnCode().
[wxWidgets.git] / src / xrc / xh_grid.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_grid.cpp
3 // Purpose: XML resource handler for the grid control
4 // Author: Agron Selimaj
5 // Created: 2005/08/11
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
17 #if wxUSE_XRC && wxUSE_GRID
18
19 #include "wx/xrc/xh_grid.h"
20 #include "wx/grid.h"
21
22 IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler)
23
24 wxGridXmlHandler::wxGridXmlHandler()
25 : wxXmlResourceHandler()
26 {
27 AddWindowStyles();
28 }
29
30 wxObject *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
45 bool wxGridXmlHandler::CanHandle(wxXmlNode *node)
46 {
47 return IsOfClass(node, wxT("wxGrid"));
48 }
49
50 #endif // wxUSE_XRC && wxUSE_GRID