]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/xrc/xh_listc.cpp
removed static methods from wxAppTraitsBase, this doesn't work well in non-monolithic...
[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#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
27IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
28
29wxListCtrlXmlHandler::wxListCtrlXmlHandler()
30: wxXmlResourceHandler()
31{
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);
45 AddWindowStyles();
46}
47
48wxObject *wxListCtrlXmlHandler::DoCreateResource()
49{
50 XRC_MAKE_INSTANCE(list, wxListCtrl)
51
52 list->Create(m_parentAsWindow,
53 GetID(),
54 GetPosition(), GetSize(),
55 GetStyle(),
56 wxDefaultValidator,
57 GetName());
58
59 // FIXME: add columns definition
60
61 SetupWindow(list);
62
63 return list;
64}
65
66bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
67{
68 return IsOfClass(node, wxT("wxListCtrl"));
69}