\perlnote{In wxPerl this method takes only the {\bf item} parameter and
returns a Wx::Rect ( or undef ).}
+
\membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing}
-\constfunc{int}{GetItemSpacing}{\param{bool }{isSmall}}
+\constfunc{wxSize}{GetItemSpacing}{\void}
+
+Retrieves the spacing between icons in pixels: horizontal spacing is returned
+as \texttt{x} component of the \helpref{wxSize}{wxsize} object and the vertical
+spacing as its \texttt{y} component.
-Retrieves the spacing between icons in pixels.
-If {\it small} is true, gets the spacing for the small icon
-view, otherwise the large icon view.
\membersection{wxListCtrl::GetItemState}\label{wxlistctrlgetitemstate}
int GetItemCount() const;
int GetColumnCount() const;
void SetItemSpacing( int spacing, bool isSmall = FALSE );
- int GetItemSpacing( bool isSmall ) const;
+ wxSize GetItemSpacing() const;
void SetItemTextColour( long item, const wxColour& col);
wxColour GetItemTextColour( long item ) const;
void SetItemBackgroundColour( long item, const wxColour &col);
void RefreshItem(long item);
void RefreshItems(long itemFrom, long itemTo);
+ // obsolete, don't use
+ wxDEPRECATED( int GetItemSpacing( bool isSmall ) const );
+
+
// implementation only from now on
// -------------------------------
// Gets the number of columns in the list control
int GetColumnCount() const { return m_colCount; }
- // Retrieves the spacing between icons in pixels.
- // If small is TRUE, gets the spacing for the small icon
- // view, otherwise the large icon view.
- int GetItemSpacing(bool isSmall) const;
+ // get the horizontal and vertical components of the item spacing
+ wxSize GetItemSpacing() const;
// Foreground colour of an item.
void SetItemTextColour( long item, const wxColour& col);
// Necessary for drawing hrules and vrules, if specified
void OnPaint(wxPaintEvent& event);
+
+ // obsolete stuff, for compatibility only -- don't use
+ wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
+
protected:
// common part of all ctors
void Init();
m_mainWin->SetItemSpacing( spacing, isSmall );
}
+wxSize wxGenericListCtrl::GetItemSpacing() const
+{
+ const int spacing = GetItemSpacing(HasFlag(wxLC_SMALL_ICON));
+
+ return wxSize(spacing, spacing);
+}
+
int wxGenericListCtrl::GetItemSpacing( bool isSmall ) const
{
return m_mainWin->GetItemSpacing( isSmall );
return m_count;
}
-// Retrieves the spacing between icons in pixels.
-// If small is TRUE, gets the spacing for the small icon
-// view, otherwise the large icon view.
+wxSize wxListCtrl::GetItemSpacing() const
+{
+ const int spacing = GetItemSpacing(HasFlag(wxLC_SMALL_ICON));
+
+ return wxSize(LOWORD(spacing), HIWORD(spacing));
+}
+
int wxListCtrl::GetItemSpacing(bool isSmall) const
{
return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);