Avoid mixing Latin-1, UTF-8 and Mac Roman (?) encodings in different source files, use UTF-8 everywhere. See #11116. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
60 lines
1.6 KiB
C++
60 lines
1.6 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/xrc/xh_filectrl.cpp
|
|
// Purpose: XML resource handler for wxFileCtrl
|
|
// Author: Kinaou Hervé
|
|
// Created: 2009-05-11
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) 2009 wxWidgets development team
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// For compilers that support precompilation, includes "wx.h".
|
|
#include "wx/wxprec.h"
|
|
|
|
#ifdef __BORLANDC__
|
|
#pragma hdrstop
|
|
#endif
|
|
|
|
#if wxUSE_XRC && wxUSE_FILECTRL
|
|
|
|
#include "wx/xrc/xh_filectrl.h"
|
|
#include "wx/filectrl.h"
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS(wxFileCtrlXmlHandler, wxXmlResourceHandler)
|
|
|
|
wxFileCtrlXmlHandler::wxFileCtrlXmlHandler() : wxXmlResourceHandler()
|
|
{
|
|
XRC_ADD_STYLE(wxFC_DEFAULT_STYLE);
|
|
XRC_ADD_STYLE(wxFC_OPEN);
|
|
XRC_ADD_STYLE(wxFC_SAVE);
|
|
XRC_ADD_STYLE(wxFC_MULTIPLE);
|
|
XRC_ADD_STYLE(wxFC_NOSHOWHIDDEN);
|
|
|
|
AddWindowStyles();
|
|
}
|
|
|
|
wxObject *wxFileCtrlXmlHandler::DoCreateResource()
|
|
{
|
|
XRC_MAKE_INSTANCE(filectrl, wxFileCtrl)
|
|
|
|
filectrl->Create(m_parentAsWindow,
|
|
GetID(),
|
|
GetText(wxT("defaultdirectory")),
|
|
GetText(wxT("defaultfilename")),
|
|
GetParamValue(wxT("wildcard")),
|
|
GetStyle(wxT("style"), wxFC_DEFAULT_STYLE),
|
|
GetPosition(),
|
|
GetSize(),
|
|
GetName());
|
|
|
|
SetupWindow(filectrl);
|
|
return filectrl;
|
|
}
|
|
|
|
bool wxFileCtrlXmlHandler::CanHandle(wxXmlNode *node)
|
|
{
|
|
return IsOfClass(node, wxT("wxFileCtrl"));
|
|
}
|
|
|
|
#endif // wxUSE_XRC && wxUSE_FILECTRL
|