]>
Commit | Line | Data |
---|---|---|
ec376c8f | 1 | ///////////////////////////////////////////////////////////////////////////// |
4ce7b1e4 | 2 | // Name: src/xrc/xh_clrpicker.cpp |
ec376c8f VZ |
3 | // Purpose: XML resource handler for wxColourPickerCtrl |
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_FILEPICKERCTRL | |
19 | ||
20 | #include "wx/xrc/xh_filepicker.h" | |
21 | #include "wx/filepicker.h" | |
22 | ||
23 | IMPLEMENT_DYNAMIC_CLASS(wxFilePickerCtrlXmlHandler, wxXmlResourceHandler) | |
24 | ||
25 | wxFilePickerCtrlXmlHandler::wxFilePickerCtrlXmlHandler() : wxXmlResourceHandler() | |
26 | { | |
27 | XRC_ADD_STYLE(wxFLP_OPEN); | |
28 | XRC_ADD_STYLE(wxFLP_SAVE); | |
29 | XRC_ADD_STYLE(wxFLP_OVERWRITE_PROMPT); | |
30 | XRC_ADD_STYLE(wxFLP_FILE_MUST_EXIST); | |
31 | XRC_ADD_STYLE(wxFLP_CHANGE_DIR); | |
32 | XRC_ADD_STYLE(wxFLP_DEFAULT_STYLE); | |
33 | AddWindowStyles(); | |
34 | } | |
35 | ||
36 | wxObject *wxFilePickerCtrlXmlHandler::DoCreateResource() | |
37 | { | |
38 | XRC_MAKE_INSTANCE(picker, wxFilePickerCtrl) | |
39 | ||
40 | picker->Create(m_parentAsWindow, | |
41 | GetID(), | |
42 | GetParamValue(wxT("default-path")), | |
43 | GetParamValue(wxT("message")), | |
44 | GetParamValue(wxT("wildcard")), | |
45 | GetPosition(), GetSize(), | |
46 | GetStyle(_T("style"), wxFLP_DEFAULT_STYLE), | |
47 | wxDefaultValidator, | |
48 | GetName()); | |
49 | ||
50 | SetupWindow(picker); | |
51 | return picker; | |
52 | } | |
53 | ||
54 | bool wxFilePickerCtrlXmlHandler::CanHandle(wxXmlNode *node) | |
55 | { | |
56 | return IsOfClass(node, wxT("wxFilePickerCtrl")); | |
57 | } | |
58 | ||
59 | #endif // wxUSE_XRC && wxUSE_FILEPICKERCTRL |