]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_listc.cpp
remove superfluous assert
[wxWidgets.git] / src / xrc / xh_listc.cpp
CommitLineData
78d14f80 1/////////////////////////////////////////////////////////////////////////////
fec9cc08 2// Name: src/xrc/xh_listc.cpp
b5d6954b 3// Purpose: XRC resource for wxListCtrl
78d14f80
VS
4// Author: Brian Gavin
5// Created: 2000/09/09
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Brian Gavin
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
f80ea77b 10
78d14f80
VS
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
fec9cc08 18#if wxUSE_XRC && wxUSE_LISTCTRL
a1e4ec87 19
78d14f80 20#include "wx/xrc/xh_listc.h"
fec9cc08
WS
21
22#ifndef WX_PRECOMP
23 #include "wx/textctrl.h"
24#endif
25
78d14f80
VS
26#include "wx/listctrl.h"
27
28
854e189f
VS
29IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
30
f80ea77b
WS
31wxListCtrlXmlHandler::wxListCtrlXmlHandler()
32: wxXmlResourceHandler()
78d14f80 33{
544fee32
VS
34 XRC_ADD_STYLE(wxLC_LIST);
35 XRC_ADD_STYLE(wxLC_REPORT);
36 XRC_ADD_STYLE(wxLC_ICON);
37 XRC_ADD_STYLE(wxLC_SMALL_ICON);
38 XRC_ADD_STYLE(wxLC_ALIGN_TOP);
39 XRC_ADD_STYLE(wxLC_ALIGN_LEFT);
40 XRC_ADD_STYLE(wxLC_AUTOARRANGE);
41 XRC_ADD_STYLE(wxLC_USER_TEXT);
42 XRC_ADD_STYLE(wxLC_EDIT_LABELS);
43 XRC_ADD_STYLE(wxLC_NO_HEADER);
44 XRC_ADD_STYLE(wxLC_SINGLE_SEL);
45 XRC_ADD_STYLE(wxLC_SORT_ASCENDING);
46 XRC_ADD_STYLE(wxLC_SORT_DESCENDING);
0689c79e 47 XRC_ADD_STYLE(wxLC_VIRTUAL);
e7a0050f
VS
48 XRC_ADD_STYLE(wxLC_HRULES);
49 XRC_ADD_STYLE(wxLC_VRULES);
50 XRC_ADD_STYLE(wxLC_NO_SORT_HEADER);
78d14f80
VS
51 AddWindowStyles();
52}
53
78d14f80 54wxObject *wxListCtrlXmlHandler::DoCreateResource()
f80ea77b 55{
544fee32 56 XRC_MAKE_INSTANCE(list, wxListCtrl)
f2588180 57
544fee32
VS
58 list->Create(m_parentAsWindow,
59 GetID(),
60 GetPosition(), GetSize(),
61 GetStyle(),
62 wxDefaultValidator,
63 GetName());
f2588180 64
544fee32 65 // FIXME: add columns definition
f80ea77b 66
78d14f80 67 SetupWindow(list);
f80ea77b 68
78d14f80
VS
69 return list;
70}
71
78d14f80
VS
72bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
73{
74 return IsOfClass(node, wxT("wxListCtrl"));
75}
a1e4ec87 76
fec9cc08 77#endif // wxUSE_XRC && wxUSE_LISTCTRL