]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_listc.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     XRC resource for wxListCtrl 
   7 // Copyright:   (c) 2000 Brian Gavin 
   8 // Licence:     wxWindows licence 
   9 ///////////////////////////////////////////////////////////////////////////// 
  12 #pragma implementation "xh_listc.h" 
  15 // For compilers that support precompilation, includes "wx.h". 
  16 #include "wx/wxprec.h" 
  22 #include "wx/textctrl.h" 
  23 #include "wx/xrc/xh_listc.h" 
  24 #include "wx/listctrl.h" 
  27 IMPLEMENT_DYNAMIC_CLASS(wxListCtrlXmlHandler
, wxXmlResourceHandler
) 
  29 wxListCtrlXmlHandler::wxListCtrlXmlHandler()  
  30 : wxXmlResourceHandler()  
  32     XRC_ADD_STYLE(wxLC_LIST
); 
  33     XRC_ADD_STYLE(wxLC_REPORT
); 
  34     XRC_ADD_STYLE(wxLC_ICON
); 
  35     XRC_ADD_STYLE(wxLC_SMALL_ICON
); 
  36     XRC_ADD_STYLE(wxLC_ALIGN_TOP
); 
  37     XRC_ADD_STYLE(wxLC_ALIGN_LEFT
); 
  38     XRC_ADD_STYLE(wxLC_AUTOARRANGE
); 
  39     XRC_ADD_STYLE(wxLC_USER_TEXT
); 
  40     XRC_ADD_STYLE(wxLC_EDIT_LABELS
); 
  41     XRC_ADD_STYLE(wxLC_NO_HEADER
); 
  42     XRC_ADD_STYLE(wxLC_SINGLE_SEL
); 
  43     XRC_ADD_STYLE(wxLC_SORT_ASCENDING
); 
  44     XRC_ADD_STYLE(wxLC_SORT_DESCENDING
); 
  45     XRC_ADD_STYLE(wxLC_VIRTUAL
); 
  49 wxObject 
*wxListCtrlXmlHandler::DoCreateResource() 
  51     XRC_MAKE_INSTANCE(list
, wxListCtrl
) 
  53     list
->Create(m_parentAsWindow
, 
  55                  GetPosition(), GetSize(), 
  60     // FIXME: add columns definition 
  67 bool wxListCtrlXmlHandler::CanHandle(wxXmlNode 
*node
) 
  69     return IsOfClass(node
, wxT("wxListCtrl"));