]>
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
6 // Copyright: (c) 2009 Jaakko Salli
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_COMBOCTRL
19 #include "wx/xrc/xh_comboctrl.h"
23 #include "wx/textctrl.h" // for wxTE_PROCESS_ENTER
29 IMPLEMENT_DYNAMIC_CLASS(wxComboCtrlXmlHandler
, wxXmlResourceHandler
)
31 wxComboCtrlXmlHandler::wxComboCtrlXmlHandler()
32 : wxXmlResourceHandler()
34 XRC_ADD_STYLE(wxCB_SORT
);
35 XRC_ADD_STYLE(wxCB_READONLY
);
36 XRC_ADD_STYLE(wxTE_PROCESS_ENTER
);
37 XRC_ADD_STYLE(wxCC_SPECIAL_DCLICK
);
38 XRC_ADD_STYLE(wxCC_STD_BUTTON
);
42 wxObject
*wxComboCtrlXmlHandler::DoCreateResource()
44 if( m_class
== wxT("wxComboCtrl"))
46 XRC_MAKE_INSTANCE(control
, wxComboCtrl
)
48 control
->Create(m_parentAsWindow
,
50 GetText(wxT("value")),
51 GetPosition(), GetSize(),
63 bool wxComboCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
65 return IsOfClass(node
, wxT("wxComboCtrl"));
68 #endif // wxUSE_XRC && wxUSE_COMBOBOX