listctrl header cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-10-02 17:38:30 +00:00
parent f2e1afc988
commit e409b62aaf
10 changed files with 26 additions and 69 deletions

View File

@ -8,21 +8,13 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __LISTCTRLH_G__
#define __LISTCTRLH_G__
#ifndef _WX_GENERIC_LISTCTRL_H_
#define _WX_GENERIC_LISTCTRL_H_
#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"
#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_

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/listctrl.h
// Name: wx/listbase.h
// Purpose: wxListCtrl class
// Author: Vadim Zeitlin
// Modified by:
@ -12,14 +12,9 @@
#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_

View 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
// ----------------------------------------------------------------------------

View File

@ -12,17 +12,11 @@
#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_

View File

@ -12,15 +12,10 @@
#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_

View 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");

View File

@ -18,8 +18,13 @@
// 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

View File

@ -23,34 +23,27 @@
#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"

View 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
@ -26,19 +26,15 @@
#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")

View 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"