Applied patch [ 583922 ] Make generic/wxListCtrl avail. in WIN32

Generic wxListCtrl renamed to wxGenericListCtrl, wxImageList
renamed to wxGenericImageList, so they can be used on wxMSW
(Rene Rivera).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-07-22 08:51:49 +00:00
parent 70a2c6562f
commit 3cd94a0d11
11 changed files with 164 additions and 147 deletions

View File

@@ -34,6 +34,8 @@
* used.
*/
#if !defined(wxIMAGELIST_DRAW_NORMAL)
// Flags for Draw
#define wxIMAGELIST_DRAW_NORMAL 0x0001
#define wxIMAGELIST_DRAW_TRANSPARENT 0x0002
@@ -47,17 +49,19 @@ enum {
wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation)
};
class WXDLLEXPORT wxImageList: public wxObject
#endif
class WXDLLEXPORT wxGenericImageList: public wxObject
{
public:
wxImageList() { }
wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 );
~wxImageList();
wxGenericImageList() { }
wxGenericImageList( int width, int height, bool mask = TRUE, int initialCount = 1 );
~wxGenericImageList();
bool Create( int width, int height, bool mask = TRUE, int initialCount = 1 );
bool Create();
int GetImageCount() const;
bool GetSize( int index, int &width, int &height ) const;
virtual int GetImageCount() const;
virtual bool GetSize( int index, int &width, int &height ) const;
int Add( const wxBitmap& bitmap );
int Add( const wxBitmap& bitmap, const wxBitmap& mask );
@@ -67,7 +71,7 @@ public:
bool Remove( int index );
bool RemoveAll();
bool Draw(int index, wxDC& dc, int x, int y,
virtual bool Draw(int index, wxDC& dc, int x, int y,
int flags = wxIMAGELIST_DRAW_NORMAL,
bool solidBackground = FALSE);
@@ -77,7 +81,7 @@ private:
int m_width;
int m_height;
DECLARE_DYNAMIC_CLASS(wxImageList)
DECLARE_DYNAMIC_CLASS(wxGenericImageList)
};
#endif // __IMAGELISTH_G__

View File

@@ -54,11 +54,11 @@ class WXDLLEXPORT wxListTextCtrl;
// wxListCtrl
//-----------------------------------------------------------------------------
class WXDLLEXPORT wxListCtrl: public wxControl
class WXDLLEXPORT wxGenericListCtrl: public wxControl
{
public:
wxListCtrl();
wxListCtrl( wxWindow *parent,
wxGenericListCtrl();
wxGenericListCtrl( wxWindow *parent,
wxWindowID id = -1,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
@@ -68,7 +68,7 @@ public:
{
Create(parent, id, pos, size, style, validator, name);
}
~wxListCtrl();
~wxGenericListCtrl();
bool Create( wxWindow *parent,
wxWindowID id = -1,
@@ -114,9 +114,9 @@ public:
void SetWindowStyleFlag( long style );
void RecreateWindow() {}
long GetNextItem( long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE ) const;
wxImageList *GetImageList( int which ) const;
void SetImageList( wxImageList *imageList, int which );
void AssignImageList( wxImageList *imageList, int which );
wxGenericImageList *GetImageList( int which ) const;
void SetImageList( wxGenericImageList *imageList, int which );
void AssignImageList( wxGenericImageList *imageList, int which );
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
void ClearAll();
@@ -183,9 +183,9 @@ public:
// implementation
// --------------
wxImageList *m_imageListNormal;
wxImageList *m_imageListSmall;
wxImageList *m_imageListState; // what's that ?
wxGenericImageList *m_imageListNormal;
wxGenericImageList *m_imageListSmall;
wxGenericImageList *m_imageListState; // what's that ?
bool m_ownsImageListNormal,
m_ownsImageListSmall,
m_ownsImageListState;
@@ -217,7 +217,7 @@ private:
void ResizeReportView(bool showHeader);
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxListCtrl);
DECLARE_DYNAMIC_CLASS(wxGenericListCtrl);
};

View File

@@ -20,12 +20,12 @@
#include "wx/scrolwin.h"
#include "wx/pen.h"
#include "wx/imaglist.h"
// -----------------------------------------------------------------------------
// forward declaration
// -----------------------------------------------------------------------------
class WXDLLEXPORT wxImageList;
class WXDLLEXPORT wxGenericTreeItem;
class WXDLLEXPORT wxTreeItemData;

View File

@@ -3,8 +3,11 @@
#if defined(__WIN32__)
#include "wx/msw/imaglist.h"
#else
#include "wx/generic/imaglist.h"
#endif
#include "wx/generic/imaglist.h"
#if !defined(__WIN32__)
#define wxImageList wxGenericImageList
#define sm_classwxImageList sm_classwxGenericImageList
#endif
#endif

View File

@@ -315,8 +315,11 @@ private:
#if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
#include "wx/msw/listctrl.h"
#else
#include "wx/generic/listctrl.h"
#endif
#include "wx/generic/listctrl.h"
#if !defined(__WIN32__) || defined(__WXUNIVERSAL__)
#define wxListCtrl wxGenericListCtrl
#define sm_classwxListCtrl sm_classwxGenericListCtrl
#endif
// ----------------------------------------------------------------------------

View File

@@ -26,8 +26,7 @@
#include "wx/control.h"
#include "wx/dynarray.h"
class WXDLLEXPORT wxImageList;
#include "wx/imaglist.h"
// ----------------------------------------------------------------------------
// types