class WXDLLEXPORT wxListItem : public wxObject
{
+ wxListItem& operator=(const wxListItem& item);
+
public:
wxListItem();
+ wxListItem(const wxListItem& item);
~wxListItem() { delete m_attr; }
// resetting
public:
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
: wxNotifyEvent(commandType, id)
- {
- m_code = 0;
- m_itemIndex =
- m_oldItemIndex = 0;
- m_col = 0;
- }
-
+ , m_code(0)
+ , m_oldItemIndex(0)
+ , m_itemIndex(0)
+ , m_col(0)
+ , m_pointDrag()
+ , m_item()
+ { }
+
+ wxListEvent(const wxListEvent& event)
+ : wxNotifyEvent(event)
+ , m_code(event.m_code)
+ , m_oldItemIndex(event.m_oldItemIndex)
+ , m_itemIndex(event.m_itemIndex)
+ , m_col(event.m_col)
+ , m_pointDrag(event.m_pointDrag)
+ , m_item(event.m_item)
+ { }
+
int GetCode() const { return m_code; }
long GetIndex() const { return m_itemIndex; }
int GetColumn() const { return m_col; }
Clear();
}
+wxListItem::wxListItem(const wxListItem& item)
+ : wxObject()
+ , m_mask(item.m_mask)
+ , m_itemId(item.m_itemId)
+ , m_col(item.m_col)
+ , m_state(item.m_state)
+ , m_stateMask(item.m_stateMask)
+ , m_text(item.m_text)
+ , m_image(item.m_image)
+ , m_data(item.m_data)
+ , m_format(item.m_format)
+ , m_width(item.m_width)
+ , m_attr(NULL)
+{
+ // copy list item attributes
+ m_attr = new wxListItemAttr(*item.GetAttributes());
+}
+
void wxListItem::Clear()
{
m_mask = 0;
// event handlers
// ----------------------------------------------------------------------------
-void wxListCtrl::OnSize(wxSizeEvent& event)
+void wxListCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
{
if ( !m_mainWin )
return;
// virtual list control support
// ----------------------------------------------------------------------------
-wxString wxListCtrl::OnGetItemText(long item, long col) const
+wxString wxListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) const
{
// this is a pure virtual function, in fact - which is not really pure
// because the controls which are not virtual don't need to implement it
- wxFAIL_MSG( _T("not supposed to be called") );
+ wxFAIL_MSG( _T("wxListCtrl::OnGetItemText not supposed to be called") );
return wxEmptyString;
}
-int wxListCtrl::OnGetItemImage(long item) const
+int wxListCtrl::OnGetItemImage(long WXUNUSED(item)) const
{
// same as above
- wxFAIL_MSG( _T("not supposed to be called") );
+ wxFAIL_MSG( _T("wxListCtrl::OnGetItemImage not supposed to be called") );
return -1;
}