]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tbarsmpl.cpp
fixed wxSTC compilation with MSVC
[wxWidgets.git] / src / generic / tbarsmpl.cpp
index b7e16e0d4d2575745660aef284f41e4eb44cc393..51699c845cb5e6ef193962a29bc6d1ef3bb945cb 100644 (file)
@@ -5,8 +5,8 @@
 // Modified by: VZ on 14.12.99 during wxToolBarSimple reorganization
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Modified by: VZ on 14.12.99 during wxToolBarSimple reorganization
 // Created:     04/01/98
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:     wxWindows license
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -28,7 +28,7 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-#if wxUSE_TOOLBAR_SIMPLE
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_SIMPLE
 
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
 
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
@@ -37,6 +37,7 @@
     #include "wx/dcmemory.h"
 #endif
 
     #include "wx/dcmemory.h"
 #endif
 
+#include "wx/toolbar.h"
 #include "wx/tbarsmpl.h"
 
 // ----------------------------------------------------------------------------
 #include "wx/tbarsmpl.h"
 
 // ----------------------------------------------------------------------------
@@ -78,17 +79,17 @@ public:
     wxCoord m_y;
     wxCoord m_width;
     wxCoord m_height;
     wxCoord m_y;
     wxCoord m_width;
     wxCoord m_height;
+
+    DECLARE_NO_COPY_CLASS(wxToolBarToolSimple)
 };
 
 // ----------------------------------------------------------------------------
 // wxWin macros
 // ----------------------------------------------------------------------------
 
 };
 
 // ----------------------------------------------------------------------------
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase)
-
-#if !wxUSE_TOOLBAR_NATIVE
-    #include "wx/toolbar.h"
+IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxControl)
 
 
+#if !wxUSE_TOOLBAR_NATIVE && !defined(__WXUNIVERSAL__)
     IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarSimple)
 #endif
 
     IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarSimple)
 #endif
 
@@ -277,7 +278,7 @@ bool wxToolBarSimple::Realize()
     int maxToolHeight = 0;
 
     // Find the maximum tool width and height
     int maxToolHeight = 0;
 
     // Find the maximum tool width and height
-    wxToolBarToolsList::Node *node = m_tools.GetFirst();
+    wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
     while ( node )
     {
         wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
     while ( node )
     {
         wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
@@ -383,7 +384,7 @@ void wxToolBarSimple::OnPaint (wxPaintEvent& WXUNUSED(event))
         return;
     count++;
 
         return;
     count++;
 
-    for ( wxToolBarToolsList::Node *node = m_tools.GetFirst();
+    for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
           node;
           node = node->GetNext() )
     {
           node;
           node = node->GetNext() )
     {
@@ -652,7 +653,7 @@ void wxToolBarSimple::SetRows(int nRows)
 wxToolBarToolBase *wxToolBarSimple::FindToolForPosition(wxCoord x,
                                                         wxCoord y) const
 {
 wxToolBarToolBase *wxToolBarSimple::FindToolForPosition(wxCoord x,
                                                         wxCoord y) const
 {
-    wxToolBarToolsList::Node *node = m_tools.GetFirst();
+    wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
     while (node)
     {
         wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();
     while (node)
     {
         wxToolBarToolSimple *tool = (wxToolBarToolSimple *)node->GetData();