]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_dirpicker.cpp
Test using wxString::ToCDouble() in wxAny.
[wxWidgets.git] / src / xrc / xh_dirpicker.cpp
CommitLineData
ec376c8f 1/////////////////////////////////////////////////////////////////////////////
42c09d20
VS
2// Name: src/xrc/xh_dirpicker.cpp
3// Purpose: XML resource handler for wxDirPickerCtrl
ec376c8f
VZ
4// Author: Francesco Montorsi
5// Created: 2006-04-17
6// RCS-ID: $Id$
7// Copyright: (c) 2006 Francesco Montorsi
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
18#if wxUSE_XRC && wxUSE_DIRPICKERCTRL
19
20#include "wx/xrc/xh_dirpicker.h"
21#include "wx/filepicker.h"
22
23IMPLEMENT_DYNAMIC_CLASS(wxDirPickerCtrlXmlHandler, wxXmlResourceHandler)
24
25wxDirPickerCtrlXmlHandler::wxDirPickerCtrlXmlHandler() : wxXmlResourceHandler()
26{
27 XRC_ADD_STYLE(wxDIRP_USE_TEXTCTRL);
28 XRC_ADD_STYLE(wxDIRP_DIR_MUST_EXIST);
29 XRC_ADD_STYLE(wxDIRP_CHANGE_DIR);
75bc8b34 30 XRC_ADD_STYLE(wxDIRP_SMALL);
ec376c8f
VZ
31 XRC_ADD_STYLE(wxDIRP_DEFAULT_STYLE);
32 AddWindowStyles();
33}
34
35wxObject *wxDirPickerCtrlXmlHandler::DoCreateResource()
36{
37 XRC_MAKE_INSTANCE(picker, wxDirPickerCtrl)
38
39 picker->Create(m_parentAsWindow,
40 GetID(),
374caf23 41 GetParamValue(wxT("value")),
bfb78201 42 GetText(wxT("message")),
ec376c8f 43 GetPosition(), GetSize(),
9a83f860 44 GetStyle(wxT("style"), wxDIRP_DEFAULT_STYLE),
ec376c8f
VZ
45 wxDefaultValidator,
46 GetName());
47
48 SetupWindow(picker);
49
50 return picker;
51}
52
53bool wxDirPickerCtrlXmlHandler::CanHandle(wxXmlNode *node)
54{
55 return IsOfClass(node, wxT("wxDirPickerCtrl"));
56}
57
58#endif // wxUSE_XRC && wxUSE_DIRPICKERCTRL