]> git.saurik.com Git - wxWidgets.git/commitdiff
Replace 3 copies of wxListCtrl mode tests with a single one in wxListCtrlBase.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jan 2012 15:09:37 +0000 (15:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jan 2012 15:09:37 +0000 (15:09 +0000)
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

include/wx/generic/listctrl.h
include/wx/listbase.h
include/wx/msw/listctrl.h
include/wx/osx/listctrl.h

index 63de1ff1ac60b1ae015cff51624faea89ffa03bd..5b8de4c7c6a6240c8effe3a2691e5b35c67243f0 100644 (file)
@@ -140,12 +140,6 @@ public:
     bool ScrollList( int dx, int dy );
     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?
     bool HasHeader() const
         { return InReportView() && !HasFlag(wxLC_NO_HEADER); }
index 8246ad83c815d3c028cb131aae731f8990765de9..55849b3c762f8c9621c171165021b9d21d7f1ec9 100644 (file)
@@ -383,6 +383,10 @@ class WXDLLIMPEXP_CORE wxListCtrlBase : public wxControl
 {
 public:
     wxListCtrlBase() { }
+
+    // Convenient functions for testing the list control mode:
+    bool InReportView() const { return HasFlag(wxLC_REPORT); }
+    bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
 };
 
 // ----------------------------------------------------------------------------
index dd11f1e4a4bb518926686e803c18284f664d9099..c4cb6597ac9e5659427596c007fff43692c95a55 100644 (file)
@@ -256,12 +256,6 @@ public:
     void SetImageList(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)
     void RefreshItem(long item);
     void RefreshItems(long itemFrom, long itemTo);
index 681775f0cac79baa44f0a72168dd2fb6eff1114d..0e9fcf122602b5d77e2f52e5ad73a80eb880ae9d 100644 (file)
@@ -160,11 +160,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
   // list or report view
   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
   void SetSingleStyle(long style, bool add = true) ;