]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_listc.cpp
fix for opening files with VC++ 8 (closes bug 994337)
[wxWidgets.git] / src / xrc / xh_listc.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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#ifdef __GNUG__
12#pragma implementation "xh_listc.h"
13#endif
14
15// For compilers that support precompilation, includes "wx.h".
16#include "wx/wxprec.h"
17
18#ifdef __BORLANDC__
19 #pragma hdrstop
20#endif
21
22#include "wx/textctrl.h"
23#include "wx/xrc/xh_listc.h"
24#include "wx/listctrl.h"
25
26
854e189f
VS
27IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
28
f80ea77b
WS
29wxListCtrlXmlHandler::wxListCtrlXmlHandler()
30: wxXmlResourceHandler()
78d14f80 31{
544fee32
VS
32 XRC_ADD_STYLE(wxLC_LIST);
33 XRC_ADD_STYLE(wxLC_REPORT);
34 XRC_ADD_STYLE(wxLC_ICON);
35 XRC_ADD_STYLE(wxLC_SMALL_ICON);
36 XRC_ADD_STYLE(wxLC_ALIGN_TOP);
37 XRC_ADD_STYLE(wxLC_ALIGN_LEFT);
38 XRC_ADD_STYLE(wxLC_AUTOARRANGE);
39 XRC_ADD_STYLE(wxLC_USER_TEXT);
40 XRC_ADD_STYLE(wxLC_EDIT_LABELS);
41 XRC_ADD_STYLE(wxLC_NO_HEADER);
42 XRC_ADD_STYLE(wxLC_SINGLE_SEL);
43 XRC_ADD_STYLE(wxLC_SORT_ASCENDING);
44 XRC_ADD_STYLE(wxLC_SORT_DESCENDING);
0689c79e 45 XRC_ADD_STYLE(wxLC_VIRTUAL);
e7a0050f
VS
46 XRC_ADD_STYLE(wxLC_HRULES);
47 XRC_ADD_STYLE(wxLC_VRULES);
48 XRC_ADD_STYLE(wxLC_NO_SORT_HEADER);
78d14f80
VS
49 AddWindowStyles();
50}
51
78d14f80 52wxObject *wxListCtrlXmlHandler::DoCreateResource()
f80ea77b 53{
544fee32 54 XRC_MAKE_INSTANCE(list, wxListCtrl)
f2588180 55
544fee32
VS
56 list->Create(m_parentAsWindow,
57 GetID(),
58 GetPosition(), GetSize(),
59 GetStyle(),
60 wxDefaultValidator,
61 GetName());
f2588180 62
544fee32 63 // FIXME: add columns definition
f80ea77b 64
78d14f80 65 SetupWindow(list);
f80ea77b 66
78d14f80
VS
67 return list;
68}
69
78d14f80
VS
70bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
71{
72 return IsOfClass(node, wxT("wxListCtrl"));
73}