]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_grid.cpp
don't reset the selection after event was vetoed if there is no old selection
[wxWidgets.git] / src / xrc / xh_grid.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_grid.h
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
18 #if wxUSE_XRC && wxUSE_GRID
19
20 #include "wx/xrc/xh_grid.h"
21 #include "wx/grid.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxGridXmlHandler, wxXmlResourceHandler)
24
25 wxGridXmlHandler::wxGridXmlHandler()
26 : wxXmlResourceHandler()
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
51 #endif // wxUSE_XRC && wxUSE_GRID