]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_gdctl.cpp
docopydocs is not needed for this script.
[wxWidgets.git] / src / xrc / xh_gdctl.cpp
CommitLineData
995c1788
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_gdctl.cpp
3// Purpose: XRC resource for wxGenericDirCtrl
4// Author: Markus Greither
5// Created: 2002/01/20
6// RCS-ID:
7// Copyright: (c) 2002 Markus Greither
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
995c1788
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 && wxUSE_DIRDLG
995c1788
VS
19
20#include "wx/textctrl.h"
21#include "wx/xrc/xh_gdctl.h"
22#include "wx/dirctrl.h"
23
854e189f
VS
24IMPLEMENT_DYNAMIC_CLASS(wxGenericDirCtrlXmlHandler, wxXmlResourceHandler)
25
995c1788
VS
26wxGenericDirCtrlXmlHandler::wxGenericDirCtrlXmlHandler()
27: wxXmlResourceHandler()
28{
66010e8d
VS
29 XRC_ADD_STYLE(wxDIRCTRL_DIR_ONLY);
30 XRC_ADD_STYLE(wxDIRCTRL_3D_INTERNAL);
31 XRC_ADD_STYLE(wxDIRCTRL_SELECT_FIRST);
32 XRC_ADD_STYLE(wxDIRCTRL_SHOW_FILTERS);
995c1788
VS
33 AddWindowStyles();
34}
35
36wxObject *wxGenericDirCtrlXmlHandler::DoCreateResource()
37{
38 XRC_MAKE_INSTANCE(ctrl, wxGenericDirCtrl)
f80ea77b 39
995c1788
VS
40 ctrl->Create(m_parentAsWindow,
41 GetID(),
42 GetText(wxT("defaultfolder")),
43 GetPosition(), GetSize(),
44 GetStyle(),
45 GetText(wxT("filter")),
46 (int)GetLong(wxT("defaultfilter")),
47 GetName());
48
49 SetupWindow(ctrl);
50
51 return ctrl;
52}
53
54bool wxGenericDirCtrlXmlHandler::CanHandle(wxXmlNode *node)
55{
56 return IsOfClass(node, wxT("wxGenericDirCtrl"));
57}
58
621be1ec 59#endif // wxUSE_XRC && wxUSE_DIRDLG