Use native EOL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,32 +1,32 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: wx/xrc/xh_comboctrl.h
|
// Name: wx/xrc/xh_comboctrl.h
|
||||||
// Purpose: XML resource handler for wxComboBox
|
// Purpose: XML resource handler for wxComboBox
|
||||||
// Author: Jaakko Salli
|
// Author: Jaakko Salli
|
||||||
// Created: 2009/01/25
|
// Created: 2009/01/25
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2009 Jaakko Salli
|
// Copyright: (c) 2009 Jaakko Salli
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_XH_COMBOCTRL_H_
|
#ifndef _WX_XH_COMBOCTRL_H_
|
||||||
#define _WX_XH_COMBOCTRL_H_
|
#define _WX_XH_COMBOCTRL_H_
|
||||||
|
|
||||||
#include "wx/xrc/xmlres.h"
|
#include "wx/xrc/xmlres.h"
|
||||||
|
|
||||||
#if wxUSE_XRC && wxUSE_COMBOCTRL
|
#if wxUSE_XRC && wxUSE_COMBOCTRL
|
||||||
|
|
||||||
class WXDLLIMPEXP_XRC wxComboCtrlXmlHandler : public wxXmlResourceHandler
|
class WXDLLIMPEXP_XRC wxComboCtrlXmlHandler : public wxXmlResourceHandler
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxComboCtrlXmlHandler)
|
DECLARE_DYNAMIC_CLASS(wxComboCtrlXmlHandler)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxComboCtrlXmlHandler();
|
wxComboCtrlXmlHandler();
|
||||||
virtual wxObject *DoCreateResource();
|
virtual wxObject *DoCreateResource();
|
||||||
virtual bool CanHandle(wxXmlNode *node);
|
virtual bool CanHandle(wxXmlNode *node);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_XRC && wxUSE_COMBOCTRL
|
#endif // wxUSE_XRC && wxUSE_COMBOCTRL
|
||||||
|
|
||||||
#endif // _WX_XH_COMBOCTRL_H_
|
#endif // _WX_XH_COMBOCTRL_H_
|
||||||
|
|||||||
@@ -1,69 +1,69 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: src/xrc/xh_comboctrl.cpp
|
// Name: src/xrc/xh_comboctrl.cpp
|
||||||
// Purpose: XRC resource for wxComboCtrl
|
// Purpose: XRC resource for wxComboCtrl
|
||||||
// Author: Jaakko Salli
|
// Author: Jaakko Salli
|
||||||
// Created: 2009/01/25
|
// Created: 2009/01/25
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2009 Jaakko Salli
|
// Copyright: (c) 2009 Jaakko Salli
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_XRC && wxUSE_COMBOCTRL
|
#if wxUSE_XRC && wxUSE_COMBOCTRL
|
||||||
|
|
||||||
#include "wx/xrc/xh_comboctrl.h"
|
#include "wx/xrc/xh_comboctrl.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/textctrl.h" // for wxTE_PROCESS_ENTER
|
#include "wx/textctrl.h" // for wxTE_PROCESS_ENTER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/combo.h"
|
#include "wx/combo.h"
|
||||||
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxComboCtrlXmlHandler, wxXmlResourceHandler)
|
IMPLEMENT_DYNAMIC_CLASS(wxComboCtrlXmlHandler, wxXmlResourceHandler)
|
||||||
|
|
||||||
wxComboCtrlXmlHandler::wxComboCtrlXmlHandler()
|
wxComboCtrlXmlHandler::wxComboCtrlXmlHandler()
|
||||||
: wxXmlResourceHandler()
|
: wxXmlResourceHandler()
|
||||||
{
|
{
|
||||||
XRC_ADD_STYLE(wxCB_SORT);
|
XRC_ADD_STYLE(wxCB_SORT);
|
||||||
XRC_ADD_STYLE(wxCB_READONLY);
|
XRC_ADD_STYLE(wxCB_READONLY);
|
||||||
XRC_ADD_STYLE(wxTE_PROCESS_ENTER);
|
XRC_ADD_STYLE(wxTE_PROCESS_ENTER);
|
||||||
XRC_ADD_STYLE(wxCC_SPECIAL_DCLICK);
|
XRC_ADD_STYLE(wxCC_SPECIAL_DCLICK);
|
||||||
XRC_ADD_STYLE(wxCC_STD_BUTTON);
|
XRC_ADD_STYLE(wxCC_STD_BUTTON);
|
||||||
AddWindowStyles();
|
AddWindowStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxObject *wxComboCtrlXmlHandler::DoCreateResource()
|
wxObject *wxComboCtrlXmlHandler::DoCreateResource()
|
||||||
{
|
{
|
||||||
if( m_class == wxT("wxComboCtrl"))
|
if( m_class == wxT("wxComboCtrl"))
|
||||||
{
|
{
|
||||||
XRC_MAKE_INSTANCE(control, wxComboCtrl)
|
XRC_MAKE_INSTANCE(control, wxComboCtrl)
|
||||||
|
|
||||||
control->Create(m_parentAsWindow,
|
control->Create(m_parentAsWindow,
|
||||||
GetID(),
|
GetID(),
|
||||||
GetText(wxT("value")),
|
GetText(wxT("value")),
|
||||||
GetPosition(), GetSize(),
|
GetPosition(), GetSize(),
|
||||||
GetStyle(),
|
GetStyle(),
|
||||||
wxDefaultValidator,
|
wxDefaultValidator,
|
||||||
GetName());
|
GetName());
|
||||||
|
|
||||||
SetupWindow(control);
|
SetupWindow(control);
|
||||||
|
|
||||||
return control;
|
return control;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboCtrlXmlHandler::CanHandle(wxXmlNode *node)
|
bool wxComboCtrlXmlHandler::CanHandle(wxXmlNode *node)
|
||||||
{
|
{
|
||||||
return IsOfClass(node, wxT("wxComboCtrl"));
|
return IsOfClass(node, wxT("wxComboCtrl"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_XRC && wxUSE_COMBOBOX
|
#endif // wxUSE_XRC && wxUSE_COMBOBOX
|
||||||
|
|||||||
Reference in New Issue
Block a user