]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/xrc/xh_listc.cpp
removed dependency on windows.h from dynload.h
[wxWidgets.git] / contrib / 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/////////////////////////////////////////////////////////////////////////////
10
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
27wxListCtrlXmlHandler::wxListCtrlXmlHandler()
28: wxXmlResourceHandler()
29{
30 ADD_STYLE(wxLC_LIST);
31 ADD_STYLE(wxLC_REPORT);
32 ADD_STYLE(wxLC_ICON);
33 ADD_STYLE(wxLC_SMALL_ICON);
34 ADD_STYLE(wxLC_ALIGN_TOP);
35 ADD_STYLE(wxLC_ALIGN_LEFT);
36 ADD_STYLE(wxLC_AUTOARRANGE);
37 ADD_STYLE(wxLC_USER_TEXT);
38 ADD_STYLE(wxLC_EDIT_LABELS);
39 ADD_STYLE(wxLC_NO_HEADER);
40 ADD_STYLE(wxLC_SINGLE_SEL);
41 ADD_STYLE(wxLC_SORT_ASCENDING);
42 ADD_STYLE(wxLC_SORT_DESCENDING);
43 AddWindowStyles();
44}
45
46
47wxObject *wxListCtrlXmlHandler::DoCreateResource()
48{
f2588180
VS
49 wxListCtrl *list = wxStaticCast(m_instance, wxListCtrl);
50
51 if (!list)
52 list = new wxListCtrl;
53
54 list->Create(m_parentAsWindow,
55 GetID(),
56 GetPosition(), GetSize(),
57 GetStyle(),
58 wxDefaultValidator,
59 GetName());
60
78d14f80
VS
61 /* TODO: columns definition */
62
63 SetupWindow(list);
64
65 return list;
66}
67
68
69
70bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
71{
72 return IsOfClass(node, wxT("wxListCtrl"));
73}