use a programmer-friendly macro for subclassing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,46 +27,40 @@
|
||||
wxListCtrlXmlHandler::wxListCtrlXmlHandler()
|
||||
: wxXmlResourceHandler()
|
||||
{
|
||||
ADD_STYLE(wxLC_LIST);
|
||||
ADD_STYLE(wxLC_REPORT);
|
||||
ADD_STYLE(wxLC_ICON);
|
||||
ADD_STYLE(wxLC_SMALL_ICON);
|
||||
ADD_STYLE(wxLC_ALIGN_TOP);
|
||||
ADD_STYLE(wxLC_ALIGN_LEFT);
|
||||
ADD_STYLE(wxLC_AUTOARRANGE);
|
||||
ADD_STYLE(wxLC_USER_TEXT);
|
||||
ADD_STYLE(wxLC_EDIT_LABELS);
|
||||
ADD_STYLE(wxLC_NO_HEADER);
|
||||
ADD_STYLE(wxLC_SINGLE_SEL);
|
||||
ADD_STYLE(wxLC_SORT_ASCENDING);
|
||||
ADD_STYLE(wxLC_SORT_DESCENDING);
|
||||
XRC_ADD_STYLE(wxLC_LIST);
|
||||
XRC_ADD_STYLE(wxLC_REPORT);
|
||||
XRC_ADD_STYLE(wxLC_ICON);
|
||||
XRC_ADD_STYLE(wxLC_SMALL_ICON);
|
||||
XRC_ADD_STYLE(wxLC_ALIGN_TOP);
|
||||
XRC_ADD_STYLE(wxLC_ALIGN_LEFT);
|
||||
XRC_ADD_STYLE(wxLC_AUTOARRANGE);
|
||||
XRC_ADD_STYLE(wxLC_USER_TEXT);
|
||||
XRC_ADD_STYLE(wxLC_EDIT_LABELS);
|
||||
XRC_ADD_STYLE(wxLC_NO_HEADER);
|
||||
XRC_ADD_STYLE(wxLC_SINGLE_SEL);
|
||||
XRC_ADD_STYLE(wxLC_SORT_ASCENDING);
|
||||
XRC_ADD_STYLE(wxLC_SORT_DESCENDING);
|
||||
AddWindowStyles();
|
||||
}
|
||||
|
||||
|
||||
wxObject *wxListCtrlXmlHandler::DoCreateResource()
|
||||
{
|
||||
wxListCtrl *list = wxStaticCast(m_instance, wxListCtrl);
|
||||
XRC_MAKE_INSTANCE(list, wxListCtrl)
|
||||
|
||||
if (!list)
|
||||
list = new wxListCtrl;
|
||||
list->Create(m_parentAsWindow,
|
||||
GetID(),
|
||||
GetPosition(), GetSize(),
|
||||
GetStyle(),
|
||||
wxDefaultValidator,
|
||||
GetName());
|
||||
|
||||
list->Create(m_parentAsWindow,
|
||||
GetID(),
|
||||
GetPosition(), GetSize(),
|
||||
GetStyle(),
|
||||
wxDefaultValidator,
|
||||
GetName());
|
||||
|
||||
/* TODO: columns definition */
|
||||
// FIXME: add columns definition
|
||||
|
||||
SetupWindow(list);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxListCtrlXmlHandler::CanHandle(wxXmlNode *node)
|
||||
{
|
||||
return IsOfClass(node, wxT("wxListCtrl"));
|
||||
|
Reference in New Issue
Block a user