added wxListCtrl::SetItemPtrData()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -163,6 +163,7 @@ All (GUI):
|
|||||||
|
|
||||||
- Allow status bar children in XRC (Edmunt Pienkowski)
|
- Allow status bar children in XRC (Edmunt Pienkowski)
|
||||||
- Fix memory leak in wxWizard when not using sizers for the page layout
|
- Fix memory leak in wxWizard when not using sizers for the page layout
|
||||||
|
- Added wxListCtrl::SetItemPtrData()
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
|
@@ -943,6 +943,9 @@ from $0$ to {\it count}.
|
|||||||
|
|
||||||
Associates application-defined data with this item.
|
Associates application-defined data with this item.
|
||||||
|
|
||||||
|
Notice that this function cannot be used to associate pointers with the control
|
||||||
|
items, use \helpref{SetItemPtrData}{wxlistctrlsetitemptrdata} instead.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxListCtrl::SetItemFont}\label{wxlistctrlsetitemfont}
|
\membersection{wxListCtrl::SetItemFont}\label{wxlistctrlsetitemfont}
|
||||||
|
|
||||||
@@ -981,6 +984,18 @@ The image is an index into the image list associated with the list control.
|
|||||||
Sets the position of the item, in icon or small icon view. Windows only.
|
Sets the position of the item, in icon or small icon view. Windows only.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxListCtrl::SetItemPtrData}\label{wxlistctrlsetitemptrdata}
|
||||||
|
|
||||||
|
\func{bool}{SetItemPtrData}{\param{long }{item}, \param{wxUIntPtr }{data}}
|
||||||
|
|
||||||
|
Associates application-defined data with this item. The \arg{data} parameter may
|
||||||
|
be either an integer or a pointer cast to the \texttt{wxUIntPtr} type which is
|
||||||
|
guaranteed to be large enough to be able to contain all integer types and
|
||||||
|
pointers.
|
||||||
|
|
||||||
|
\newsince{2.8.4}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
|
\membersection{wxListCtrl::SetItemState}\label{wxlistctrlsetitemstate}
|
||||||
|
|
||||||
\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}}
|
\func{bool}{SetItemState}{\param{long }{item}, \param{long }{state}, \param{long }{stateMask}}
|
||||||
|
@@ -77,7 +77,8 @@ public:
|
|||||||
wxString GetItemText( long item ) const;
|
wxString GetItemText( long item ) const;
|
||||||
void SetItemText( long item, const wxString& str );
|
void SetItemText( long item, const wxString& str );
|
||||||
wxUIntPtr GetItemData( long item ) const;
|
wxUIntPtr GetItemData( long item ) const;
|
||||||
bool SetItemData( long item, long data );
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||||
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
bool GetItemRect( long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const;
|
||||||
bool GetItemPosition( long item, wxPoint& pos ) const;
|
bool GetItemPosition( long item, wxPoint& pos ) const;
|
||||||
bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
|
bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC
|
||||||
|
@@ -122,7 +122,8 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
long GetItemData(long item) const ;
|
long GetItemData(long item) const ;
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool SetItemData(long item, long data) ;
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
||||||
|
@@ -163,7 +163,8 @@ public:
|
|||||||
wxUIntPtr GetItemData(long item) const ;
|
wxUIntPtr GetItemData(long item) const ;
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool SetItemData(long item, long data) ;
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
||||||
|
@@ -150,9 +150,8 @@ public:
|
|||||||
// Item data
|
// Item data
|
||||||
//
|
//
|
||||||
long GetItemData(long lItem) const;
|
long GetItemData(long lItem) const;
|
||||||
bool SetItemData( long lItem
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
,long lData
|
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||||
);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
|
@@ -166,7 +166,8 @@ public:
|
|||||||
long GetItemData(long item) const ;
|
long GetItemData(long item) const ;
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool SetItemData(long item, long data) ;
|
bool SetItemPtrData(long item, wxUIntPtr data);
|
||||||
|
bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
|
||||||
|
@@ -5177,7 +5177,7 @@ wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const
|
|||||||
return info.m_data;
|
return info.m_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGenericListCtrl::SetItemData( long item, long data )
|
bool wxGenericListCtrl::SetItemPtrData( long item, wxUIntPtr data )
|
||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
info.m_mask = wxLIST_MASK_DATA;
|
info.m_mask = wxLIST_MASK_DATA;
|
||||||
|
@@ -1326,7 +1326,7 @@ long wxListCtrl::GetItemData(long item) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData(long item, long data)
|
bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
|
||||||
{
|
{
|
||||||
if (m_genericImpl)
|
if (m_genericImpl)
|
||||||
return m_genericImpl->SetItemData(item, data);
|
return m_genericImpl->SetItemData(item, data);
|
||||||
|
@@ -948,7 +948,7 @@ wxUIntPtr wxListCtrl::GetItemData(long item) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData(long item, long data)
|
bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
|
||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
|
|
||||||
|
@@ -1519,9 +1519,9 @@ long wxListCtrl::GetItemData (
|
|||||||
} // end of wxListCtrl::GetItemData
|
} // end of wxListCtrl::GetItemData
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData (
|
bool wxListCtrl::SetItemPtrData (
|
||||||
long lItem
|
long lItem
|
||||||
, long lData
|
, wxUIntPtr lData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxListItem vInfo;
|
wxListItem vInfo;
|
||||||
@@ -1530,7 +1530,7 @@ bool wxListCtrl::SetItemData (
|
|||||||
vInfo.m_itemId = lItem;
|
vInfo.m_itemId = lItem;
|
||||||
vInfo.m_data = lData;
|
vInfo.m_data = lData;
|
||||||
return SetItem(vInfo);
|
return SetItem(vInfo);
|
||||||
} // end of wxListCtrl::SetItemData
|
} // end of wxListCtrl::SetItemPtrData
|
||||||
|
|
||||||
// Gets the item rectangle
|
// Gets the item rectangle
|
||||||
bool wxListCtrl::GetItemRect ( long lItem,
|
bool wxListCtrl::GetItemRect ( long lItem,
|
||||||
|
@@ -283,7 +283,7 @@ long wxListCtrl::GetItemData(long item) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sets the item data
|
// Sets the item data
|
||||||
bool wxListCtrl::SetItemData(long item, long data)
|
bool wxListCtrl::SetItemPtrData(long item, wxUIntPtr data)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user