]> git.saurik.com Git - wxWidgets.git/commitdiff
listctrl header cleanup
authorPaul Cornett <paulcor@bullseye.com>
Mon, 2 Oct 2006 17:38:30 +0000 (17:38 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Mon, 2 Oct 2006 17:38:30 +0000 (17:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/listctrl.h
include/wx/listbase.h
include/wx/listctrl.h
include/wx/mac/carbon/listctrl.h
include/wx/msw/listctrl.h
src/common/datacmn.cpp
src/common/listctrlcmn.cpp
src/generic/listctrl.cpp
src/mac/carbon/listctrl_mac.cpp
src/msw/listctrl.cpp

index 70111560807aa528716e11c870623fccd4554d49..07cec7f0c84996483ad86882ce30370721d4debb 100644 (file)
@@ -8,21 +8,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __LISTCTRLH_G__
-#define __LISTCTRLH_G__
-
-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/imaglist.h"
-
-#include "wx/control.h"
-#include "wx/timer.h"
-#include "wx/dcclient.h"
-#include "wx/scrolwin.h"
-#include "wx/settings.h"
-#include "wx/listctrl.h"
+#ifndef _WX_GENERIC_LISTCTRL_H_
+#define _WX_GENERIC_LISTCTRL_H_
+
 #include "wx/textctrl.h"
 
+class WXDLLIMPEXP_CORE wxImageList;
+
 #if wxUSE_DRAG_AND_DROP
 class WXDLLEXPORT wxDropTarget;
 #endif
@@ -36,15 +28,9 @@ class WXDLLEXPORT wxDropTarget;
 // internal classes
 //-----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxListHeaderData;
-class WXDLLEXPORT wxListItemData;
-
 class WXDLLEXPORT wxListHeaderWindow;
 class WXDLLEXPORT wxListMainWindow;
 
-class WXDLLEXPORT wxListRenameTimer;
-class WXDLLEXPORT wxListTextCtrl;
-
 //-----------------------------------------------------------------------------
 // wxListCtrl
 //-----------------------------------------------------------------------------
@@ -286,4 +272,4 @@ public:
 };
 #endif // !__WXMSW__ || __WXUNIVERSAL__
 
-#endif // __LISTCTRLH_G__
+#endif // _WX_GENERIC_LISTCTRL_H_
index 84bb31b99fadc7fe5d069c650e97337efd49a53c..33cc52f92403b72a988f56b4f517d614c9ae1d06 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        wx/listctrl.h
+// Name:        wx/listbase.h
 // Purpose:     wxListCtrl class
 // Author:      Vadim Zeitlin
 // Modified by:
 #ifndef _WX_LISTBASE_H_BASE_
 #define _WX_LISTBASE_H_BASE_
 
-#include "wx/defs.h"
-
-#if wxUSE_LISTCTRL
-
 #include "wx/colour.h"
 #include "wx/font.h"
 #include "wx/gdicmn.h"
-
 #include "wx/event.h"
 
 // ----------------------------------------------------------------------------
@@ -492,7 +487,5 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
 #define EVT_LIST_SET_INFO(id, fn) wx__DECLARE_LISTEVT(SET_INFO, id, fn)
 #endif
 
-#endif // wxUSE_LISTCTRL
-
 #endif
     // _WX_LISTCTRL_H_BASE_
index d92e26d7b00f539a7a36015c4ff003d1033d6d31..f8385b6ab58216768232a3b64d74b521912167ca 100644 (file)
@@ -28,14 +28,12 @@ extern WXDLLEXPORT_DATA(const wxChar) wxListCtrlNameStr[];
 // include the wxListCtrl class declaration
 // ----------------------------------------------------------------------------
 
-#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
-    #include "wx/generic/listctrl.h"
-#endif
-
 #if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
     #include "wx/msw/listctrl.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/carbon/listctrl.h"
+#else
+    #include "wx/generic/listctrl.h"
 #endif
 
 // ----------------------------------------------------------------------------
index d77061e7c5898ea92d487c80d5fa37a3a6b5f230..d61a9c55fd03577f04ce6f215d3a1ad0ac7086cd 100644 (file)
 #ifndef _WX_LISTCTRL_H_
 #define _WX_LISTCTRL_H_
 
-#include "wx/control.h"
-#include "wx/event.h"
-#include "wx/imaglist.h"
 #include "wx/generic/listctrl.h"
 
 class wxMacDataBrowserListCtrlControl;
 class wxMacListControl;
 
-// type of compare function for wxListCtrl sort operation
-typedef int (*wxListCtrlCompare)(long item1, long item2, long sortData);
-
 class WXDLLEXPORT wxListCtrl: public wxControl
 {
   DECLARE_DYNAMIC_CLASS(wxListCtrl)
@@ -343,7 +337,5 @@ protected:
   int               m_count; // for virtual lists, store item count
 };
 
-typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
-
 #endif
     // _WX_LISTCTRL_H_
index 4bb1855f5efe308dda3cbb7dcd0943012054d920..81a0f2fa08063c473001dea6600aafb0e6ac0f43 100644 (file)
 #ifndef _WX_LISTCTRL_H_
 #define _WX_LISTCTRL_H_
 
-#if wxUSE_LISTCTRL
-
 #include "wx/control.h"
-#include "wx/event.h"
-#include "wx/hash.h"
-#include "wx/textctrl.h"
-
 
 class WXDLLEXPORT wxImageList;
+class WXDLLIMPEXP_CORE wxTextCtrl;
 
 /*
     The wxListCtrl can show lists of items in four different modes:
@@ -439,6 +434,4 @@ private:
     DECLARE_NO_COPY_CLASS(wxListCtrl)
 };
 
-#endif // wxUSE_LISTCTRL
-
 #endif // _WX_LISTCTRL_H_
index 15667bb34cd2b40eaced4031729f2b068771b81d..0529ce38367967fdb9b070937c03a0d038e8d297 100644 (file)
@@ -46,7 +46,6 @@ extern WXDLLEXPORT_DATA(const wxChar) wxDialogNameStr[] = wxT("dialog");
 extern WXDLLEXPORT_DATA(const wxChar) wxFrameNameStr[] = wxT("frame");
 extern WXDLLEXPORT_DATA(const wxChar) wxStaticBoxNameStr[] = wxT("groupBox");
 extern WXDLLEXPORT_DATA(const wxChar) wxListBoxNameStr[] = wxT("listBox");
-extern WXDLLEXPORT_DATA(const wxChar) wxListCtrlNameStr[] = wxT("listCtrl");
 extern WXDLLEXPORT_DATA(const wxChar) wxStaticTextNameStr[] = wxT("staticText");
 extern WXDLLEXPORT_DATA(const wxChar) wxStaticBitmapNameStr[] = wxT("staticBitmap");
 extern WXDLLEXPORT_DATA(const wxChar) wxNotebookNameStr[] = wxT("notebook");
index 88fdb5767b454b1e7a870a5a73bec776bfa9df23..36387bcdc447cbbcd6f530dc1e6933218e096a2e 100644 (file)
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
+
+#if wxUSE_LISTCTRL
+
 #include "wx/listctrl.h"
 
+const wxChar wxListCtrlNameStr[] = wxT("listCtrl");
+
 // ListCtrl events
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG)
@@ -46,3 +51,4 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_FOCUSED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT)
 
+#endif // wxUSE_LISTCTRL
index b6ca0aa425f2cc75b285dbb39d39caf47fd9173b..952596d171056f39d8d1a9a3fea83d843c1baa11 100644 (file)
 
 #if wxUSE_LISTCTRL
 
-// under Win32 we always use the native version and also may use the generic
-// one, however some things should be done only if we use only the generic
-// version
-#if (defined(__WIN32__) && !defined(__WXUNIVERSAL__)) || defined(__WXMAC__)
-    #define HAVE_NATIVE_LISTCTRL
-#endif
-
-// if we have the native control, wx/listctrl.h declares it and not this one
 #include "wx/listctrl.h"
 
-#ifndef HAVE_NATIVE_LISTCTRL
+#if (!defined(__WXMSW__) || defined(__WXUNIVERSAL__)) && !defined(__WXMAC__)
     // if we have a native version, its implementation file does all this
     IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
     IMPLEMENT_DYNAMIC_CLASS(wxListView, wxListCtrl)
     IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxNotifyEvent)
 
     IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxGenericListCtrl)
-#endif // HAVE_NATIVE_LISTCTRL/!HAVE_NATIVE_LISTCTRL
+#endif
 
 #ifndef WX_PRECOMP
+    #include "wx/scrolwin.h"
+    #include "wx/timer.h"
+    #include "wx/settings.h"
     #include "wx/dynarray.h"
-    #include "wx/app.h"
     #include "wx/dcscreen.h"
-    #include "wx/textctrl.h"
-    #include "wx/listbox.h"
     #include "wx/math.h"
 #endif
 
+#include "wx/imaglist.h"
 #include "wx/selstore.h"
 #include "wx/renderer.h"
 
index 6e5848c6a460c66d89d74b51796255a3e7eab840..46d53fe1bc821a2161882bb96765643cec060962 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/msw/listctrl.cpp
+// Name:        src/mac/listctrl_mac.cpp
 // Purpose:     wxListCtrl
 // Author:      Julian Smart
 // Modified by: Agron Selimaj
 
 #if wxUSE_LISTCTRL
 
+#include "wx/listctrl.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/app.h"
     #include "wx/intl.h"
-    #include "wx/log.h"
-    #include "wx/settings.h"
-    #include "wx/dcclient.h"
-    #include "wx/textctrl.h"
 #endif
 
 #include "wx/mac/uma.h"
 
 #include "wx/imaglist.h"
-#include "wx/listctrl.h"
 #include "wx/sysopt.h"
 
 #define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic")
index d3adde8fd179e63c7794b4e11b07b84636c247ad..a0301aec4a424747b6d8777a9c5a524c1e5ad150 100644 (file)
@@ -26,6 +26,8 @@
 
 #if wxUSE_LISTCTRL
 
+#include "wx/listctrl.h"
+
 #ifndef WX_PRECOMP
     #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/app.h"
@@ -37,7 +39,6 @@
 #endif
 
 #include "wx/imaglist.h"
-#include "wx/listctrl.h"
 
 #include "wx/msw/private.h"