]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/xrc/xh_listc.cpp
Compilation fixes.
[wxWidgets.git] / src / xrc / xh_listc.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_listc.cpp
3// Purpose: XRC resource for wxListCtrl
4// Author: Brian Gavin
5// Created: 2000/09/09
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Brian Gavin
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
19
20#include "wx/textctrl.h"
21#include "wx/xrc/xh_listc.h"
22#include "wx/listctrl.h"
23
24
25IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
26
27wxListCtrlXmlHandler::wxListCtrlXmlHandler()
28: wxXmlResourceHandler()
29{
30 XRC_ADD_STYLE(wxLC_LIST);
31 XRC_ADD_STYLE(wxLC_REPORT);
32 XRC_ADD_STYLE(wxLC_ICON);
33 XRC_ADD_STYLE(wxLC_SMALL_ICON);
34 XRC_ADD_STYLE(wxLC_ALIGN_TOP);
35 XRC_ADD_STYLE(wxLC_ALIGN_LEFT);
36 XRC_ADD_STYLE(wxLC_AUTOARRANGE);
37 XRC_ADD_STYLE(wxLC_USER_TEXT);
38 XRC_ADD_STYLE(wxLC_EDIT_LABELS);
39 XRC_ADD_STYLE(wxLC_NO_HEADER);
40 XRC_ADD_STYLE(wxLC_SINGLE_SEL);
41 XRC_ADD_STYLE(wxLC_SORT_ASCENDING);
42 XRC_ADD_STYLE(wxLC_SORT_DESCENDING);
43 XRC_ADD_STYLE(wxLC_VIRTUAL);
44 XRC_ADD_STYLE(wxLC_HRULES);
45 XRC_ADD_STYLE(wxLC_VRULES);
46 XRC_ADD_STYLE(wxLC_NO_SORT_HEADER);
47 AddWindowStyles();
48}
49
50wxObject *wxListCtrlXmlHandler::DoCreateResource()
51{
52 XRC_MAKE_INSTANCE(list, wxListCtrl)
53
54 list->Create(m_parentAsWindow,
55 GetID(),
56 GetPosition(), GetSize(),
57 GetStyle(),
58 wxDefaultValidator,
59 GetName());
60
61 // FIXME: add columns definition
62
63 SetupWindow(list);
64
65 return list;
66}
67
68bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
69{
70 return IsOfClass(node, wxT("wxListCtrl"));
71}
72
73#endif // wxUSE_XRC