]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxListCtrl to derive from wxGenericListCtrl,
authorJulian Smart <julian@anthemion.co.uk>
Mon, 22 Jul 2002 23:03:03 +0000 (23:03 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 22 Jul 2002 23:03:03 +0000 (23:03 +0000)
ditto for wxImageList

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/imaglist.h
include/wx/generic/listctrl.h
include/wx/imaglist.h
include/wx/listctrl.h
src/generic/imaglist.cpp
src/generic/listctrl.cpp

index a953bad4e4272791713710648b7aa7e0dba18b21..337d045258663c4aff8885c210565587a9a7e4a9 100644 (file)
@@ -84,5 +84,25 @@ private:
     DECLARE_DYNAMIC_CLASS(wxGenericImageList)
 };
 
+#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+/*
+ * wxImageList has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+class WXDLLEXPORT wxImageList: public wxGenericImageList
+{
+    DECLARE_DYNAMIC_CLASS(wxImageList)
+
+public:
+    wxImageList() {}
+
+    wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 )
+        : wxGenericImageList(width, height, mask, initialCount)
+    {
+    }
+};
+#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
+
 #endif  // __IMAGELISTH_G__
 
index 8ac82905be2350f8434f1b42b6e04b4753c7a4c5..0576e00126458a157cd61ed5b30fdc906d5cd551 100644 (file)
@@ -220,7 +220,29 @@ private:
     DECLARE_DYNAMIC_CLASS(wxGenericListCtrl);
 };
 
+#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+/*
+ * wxListCtrl has to be a real class or we have problems with
+ * the run-time information.
+ */
 
-#endif // __LISTCTRLH_G__
+class WXDLLEXPORT wxListCtrl: public wxGenericListCtrl
+{
+    DECLARE_DYNAMIC_CLASS(wxListCtrl)
+
+public:
+    wxListCtrl() {}
+
+    wxListCtrl(wxWindow *parent, wxWindowID id = -1,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
+               long style = wxLC_ICON,
+               const wxValidator &validator = wxDefaultValidator,
+               const wxString &name = "listctrl" )
+    : wxGenericListCtrl(parent, id, pos, size, style, validator, name)
+    {
+    }
+};
+#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
 
-// vi:sts=4:sw=4:et
+#endif // __LISTCTRLH_G__
index 6558755bc761bfb3705a851c7a245ebc972029b2..8a752751d7f54f4161036a062bd8da54a4588493 100644 (file)
@@ -1,13 +1,10 @@
 #ifndef _WX_IMAGLIST_H_BASE_
 #define _WX_IMAGLIST_H_BASE_
 
-#if defined(__WIN32__)
+#if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
     #include "wx/msw/imaglist.h"
-#endif
-#include "wx/generic/imaglist.h"
-#if !defined(__WIN32__)
-    #define wxImageList wxGenericImageList
-    #define sm_classwxImageList sm_classwxGenericImageList
+#else
+    #include "wx/generic/imaglist.h"
 #endif
 
 #endif
index daaf070e4527abd0d525fe6e12c82afd8c09aaff..e633113110e9fc130d659b389501be90085c970c 100644 (file)
@@ -315,11 +315,8 @@ private:
 
 #if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
     #include "wx/msw/listctrl.h"
-#endif
-#include "wx/generic/listctrl.h"
-#if !defined(__WIN32__) || defined(__WXUNIVERSAL__)
-    #define wxListCtrl wxGenericListCtrl
-    #define sm_classwxListCtrl sm_classwxGenericListCtrl
+#else
+    #include "wx/generic/listctrl.h"
 #endif
 
 // ----------------------------------------------------------------------------
index 4aea721b374064b8ee054e0213bab4e2b4a6cfdb..b70f3e23bf21b418f4903d67890db42d803a403e 100644 (file)
 
 IMPLEMENT_DYNAMIC_CLASS(wxGenericImageList, wxObject)
 
+#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+/*
+ * wxImageList has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxGenericImageList)
+#endif
+
 wxGenericImageList::wxGenericImageList( int width, int height, bool mask, int initialCount )
 {
     (void)Create(width, height, mask, initialCount);
index 89639c5b3529e71456a96985949d17f88c2ecc86..6cfc4bec2ced948126ba281d5fcea0572017d358 100644 (file)
@@ -4521,6 +4521,15 @@ BEGIN_EVENT_TABLE(wxGenericListCtrl,wxControl)
   EVT_IDLE(wxGenericListCtrl::OnIdle)
 END_EVENT_TABLE()
 
+#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+/*
+ * wxListCtrl has to be a real class or we have problems with
+ * the run-time information.
+ */
+
+IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxGenericListCtrl)
+#endif
+
 wxGenericListCtrl::wxGenericListCtrl()
 {
     m_imageListNormal = (wxGenericImageList *) NULL;