]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_comboctrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_comboctrl.cpp
3 // Purpose: XRC resource for wxComboCtrl
4 // Author: Jaakko Salli
7 // Copyright: (c) 2009 Jaakko Salli
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_COMBOCTRL
20 #include "wx/xrc/xh_comboctrl.h"
24 #include "wx/textctrl.h" // for wxTE_PROCESS_ENTER
30 IMPLEMENT_DYNAMIC_CLASS(wxComboCtrlXmlHandler
, wxXmlResourceHandler
)
32 wxComboCtrlXmlHandler::wxComboCtrlXmlHandler()
33 : wxXmlResourceHandler()
35 XRC_ADD_STYLE(wxCB_SORT
);
36 XRC_ADD_STYLE(wxCB_READONLY
);
37 XRC_ADD_STYLE(wxTE_PROCESS_ENTER
);
38 XRC_ADD_STYLE(wxCC_SPECIAL_DCLICK
);
39 XRC_ADD_STYLE(wxCC_STD_BUTTON
);
43 wxObject
*wxComboCtrlXmlHandler::DoCreateResource()
45 if( m_class
== wxT("wxComboCtrl"))
47 XRC_MAKE_INSTANCE(control
, wxComboCtrl
)
49 control
->Create(m_parentAsWindow
,
51 GetText(wxT("value")),
52 GetPosition(), GetSize(),
64 bool wxComboCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
66 return IsOfClass(node
, wxT("wxComboCtrl"));
69 #endif // wxUSE_XRC && wxUSE_COMBOBOX