fixed GetItemSpacing() inconsistency by deprecating the old function and adding a new, easier to use, overload
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -369,13 +369,15 @@ ID and code and returns the wxRect.}
|
|||||||
\perlnote{In wxPerl this method takes only the {\bf item} parameter and
|
\perlnote{In wxPerl this method takes only the {\bf item} parameter and
|
||||||
returns a Wx::Rect ( or undef ).}
|
returns a Wx::Rect ( or undef ).}
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxListCtrl::GetItemSpacing}\label{wxlistctrlgetitemspacing}
|
\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}
|
\membersection{wxListCtrl::GetItemState}\label{wxlistctrlgetitemstate}
|
||||||
|
|
||||||
|
@@ -109,7 +109,7 @@ public:
|
|||||||
int GetItemCount() const;
|
int GetItemCount() const;
|
||||||
int GetColumnCount() const;
|
int GetColumnCount() const;
|
||||||
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
void SetItemSpacing( int spacing, bool isSmall = FALSE );
|
||||||
int GetItemSpacing( bool isSmall ) const;
|
wxSize GetItemSpacing() const;
|
||||||
void SetItemTextColour( long item, const wxColour& col);
|
void SetItemTextColour( long item, const wxColour& col);
|
||||||
wxColour GetItemTextColour( long item ) const;
|
wxColour GetItemTextColour( long item ) const;
|
||||||
void SetItemBackgroundColour( long item, const wxColour &col);
|
void SetItemBackgroundColour( long item, const wxColour &col);
|
||||||
@@ -162,6 +162,10 @@ public:
|
|||||||
void RefreshItem(long item);
|
void RefreshItem(long item);
|
||||||
void RefreshItems(long itemFrom, long itemTo);
|
void RefreshItems(long itemFrom, long itemTo);
|
||||||
|
|
||||||
|
// obsolete, don't use
|
||||||
|
wxDEPRECATED( int GetItemSpacing( bool isSmall ) const );
|
||||||
|
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
@@ -189,10 +189,8 @@ public:
|
|||||||
// Gets the number of columns in the list control
|
// Gets the number of columns in the list control
|
||||||
int GetColumnCount() const { return m_colCount; }
|
int GetColumnCount() const { return m_colCount; }
|
||||||
|
|
||||||
// Retrieves the spacing between icons in pixels.
|
// get the horizontal and vertical components of the item spacing
|
||||||
// If small is TRUE, gets the spacing for the small icon
|
wxSize GetItemSpacing() const;
|
||||||
// view, otherwise the large icon view.
|
|
||||||
int GetItemSpacing(bool isSmall) const;
|
|
||||||
|
|
||||||
// Foreground colour of an item.
|
// Foreground colour of an item.
|
||||||
void SetItemTextColour( long item, const wxColour& col);
|
void SetItemTextColour( long item, const wxColour& col);
|
||||||
@@ -355,6 +353,10 @@ public:
|
|||||||
// Necessary for drawing hrules and vrules, if specified
|
// Necessary for drawing hrules and vrules, if specified
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
||||||
|
|
||||||
|
// obsolete stuff, for compatibility only -- don't use
|
||||||
|
wxDEPRECATED( int GetItemSpacing(bool isSmall) const);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
@@ -4757,6 +4757,13 @@ void wxGenericListCtrl::SetItemSpacing( int spacing, bool isSmall )
|
|||||||
m_mainWin->SetItemSpacing( spacing, isSmall );
|
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
|
int wxGenericListCtrl::GetItemSpacing( bool isSmall ) const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetItemSpacing( isSmall );
|
return m_mainWin->GetItemSpacing( isSmall );
|
||||||
|
@@ -1110,9 +1110,13 @@ int wxListCtrl::GetItemCount() const
|
|||||||
return m_count;
|
return m_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieves the spacing between icons in pixels.
|
wxSize wxListCtrl::GetItemSpacing() const
|
||||||
// If small is TRUE, gets the spacing for the small icon
|
{
|
||||||
// view, otherwise the large icon view.
|
const int spacing = GetItemSpacing(HasFlag(wxLC_SMALL_ICON));
|
||||||
|
|
||||||
|
return wxSize(LOWORD(spacing), HIWORD(spacing));
|
||||||
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetItemSpacing(bool isSmall) const
|
int wxListCtrl::GetItemSpacing(bool isSmall) const
|
||||||
{
|
{
|
||||||
return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);
|
return ListView_GetItemSpacing(GetHwnd(), (BOOL) isSmall);
|
||||||
|
Reference in New Issue
Block a user