Replace 3 copies of wxListCtrl mode tests with a single one in wxListCtrlBase.
Move InReportView() and IsVirtual() into the base class as they were the same in all the implementations. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -140,12 +140,6 @@ public:
|
|||||||
bool ScrollList( int dx, int dy );
|
bool ScrollList( int dx, int dy );
|
||||||
bool SortItems( wxListCtrlCompare fn, wxIntPtr data );
|
bool SortItems( wxListCtrlCompare fn, wxIntPtr data );
|
||||||
|
|
||||||
// are we in report mode?
|
|
||||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
|
||||||
|
|
||||||
// are we in virtual report mode?
|
|
||||||
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
|
||||||
|
|
||||||
// do we have a header window?
|
// do we have a header window?
|
||||||
bool HasHeader() const
|
bool HasHeader() const
|
||||||
{ return InReportView() && !HasFlag(wxLC_NO_HEADER); }
|
{ return InReportView() && !HasFlag(wxLC_NO_HEADER); }
|
||||||
|
@@ -383,6 +383,10 @@ class WXDLLIMPEXP_CORE wxListCtrlBase : public wxControl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxListCtrlBase() { }
|
wxListCtrlBase() { }
|
||||||
|
|
||||||
|
// Convenient functions for testing the list control mode:
|
||||||
|
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
||||||
|
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -256,12 +256,6 @@ public:
|
|||||||
void SetImageList(wxImageList *imageList, int which);
|
void SetImageList(wxImageList *imageList, int which);
|
||||||
void AssignImageList(wxImageList *imageList, int which);
|
void AssignImageList(wxImageList *imageList, int which);
|
||||||
|
|
||||||
// are we in report mode?
|
|
||||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
|
||||||
|
|
||||||
// are we in virtual report mode?
|
|
||||||
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
|
||||||
|
|
||||||
// refresh items selectively (only useful for virtual list controls)
|
// refresh items selectively (only useful for virtual list controls)
|
||||||
void RefreshItem(long item);
|
void RefreshItem(long item);
|
||||||
void RefreshItems(long itemFrom, long itemTo);
|
void RefreshItems(long itemFrom, long itemTo);
|
||||||
|
@@ -160,11 +160,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
|
|||||||
// list or report view
|
// list or report view
|
||||||
long GetTopItem() const ;
|
long GetTopItem() const ;
|
||||||
|
|
||||||
// are we in report mode?
|
|
||||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
|
||||||
|
|
||||||
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
|
|
||||||
|
|
||||||
// Add or remove a single window style
|
// Add or remove a single window style
|
||||||
void SetSingleStyle(long style, bool add = true) ;
|
void SetSingleStyle(long style, bool add = true) ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user