]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_listc.cpp
GTK2: gtk_widget_set_usize -> gtk_widget_set_size_request
[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// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
621be1ec 18#if wxUSE_XRC
a1e4ec87 19
78d14f80
VS
20#include "wx/textctrl.h"
21#include "wx/xrc/xh_listc.h"
22#include "wx/listctrl.h"
23
24
854e189f
VS
25IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler, wxXmlResourceHandler)
26
f80ea77b
WS
27wxListCtrlXmlHandler::wxListCtrlXmlHandler()
28: wxXmlResourceHandler()
78d14f80 29{
544fee32
VS
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);
0689c79e 43 XRC_ADD_STYLE(wxLC_VIRTUAL);
e7a0050f
VS
44 XRC_ADD_STYLE(wxLC_HRULES);
45 XRC_ADD_STYLE(wxLC_VRULES);
46 XRC_ADD_STYLE(wxLC_NO_SORT_HEADER);
78d14f80
VS
47 AddWindowStyles();
48}
49
78d14f80 50wxObject *wxListCtrlXmlHandler::DoCreateResource()
f80ea77b 51{
544fee32 52 XRC_MAKE_INSTANCE(list, wxListCtrl)
f2588180 53
544fee32
VS
54 list->Create(m_parentAsWindow,
55 GetID(),
56 GetPosition(), GetSize(),
57 GetStyle(),
58 wxDefaultValidator,
59 GetName());
f2588180 60
544fee32 61 // FIXME: add columns definition
f80ea77b 62
78d14f80 63 SetupWindow(list);
f80ea77b 64
78d14f80
VS
65 return list;
66}
67
78d14f80
VS
68bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
69{
70 return IsOfClass(node, wxT("wxListCtrl"));
71}
a1e4ec87 72
621be1ec 73#endif // wxUSE_XRC