]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/manager.cpp
Disable wxUSE_ENH_METAFILE for wxGTK builds.
[wxWidgets.git] / src / propgrid / manager.cpp
index 6a1f9fe6e16241f62fb33d37b89b11099271fded..99d6e145fc3fc67d09709e0194dc1ebd1acb33a5 100644 (file)
@@ -346,7 +346,7 @@ private:
 
     virtual bool ProcessEvent( wxEvent& event )
     {
 
     virtual bool ProcessEvent( wxEvent& event )
     {
-        if ( event.IsKindOf(CLASSINFO(wxHeaderCtrlEvent)) )
+        if ( event.IsKindOf(wxCLASSINFO(wxHeaderCtrlEvent)) )
         {
             wxHeaderCtrlEvent& hcEvent =
                 static_cast<wxHeaderCtrlEvent&>(event);
         {
             wxHeaderCtrlEvent& hcEvent =
                 static_cast<wxHeaderCtrlEvent&>(event);
@@ -355,7 +355,7 @@ private:
             int col = hcEvent.GetColumn();
             int evtType = event.GetEventType();
 
             int col = hcEvent.GetColumn();
             int evtType = event.GetEventType();
 
-            if ( evtType == wxEVT_COMMAND_HEADER_RESIZING )
+            if ( evtType == wxEVT_HEADER_RESIZING )
             {
                 int colWidth = hcEvent.GetWidth();
 
             {
                 int colWidth = hcEvent.GetWidth();
 
@@ -367,7 +367,7 @@ private:
 
                 return true;
             }
 
                 return true;
             }
-            else if ( evtType == wxEVT_COMMAND_HEADER_BEGIN_RESIZE )
+            else if ( evtType == wxEVT_HEADER_BEGIN_RESIZE )
             {
                 // Never allow column resize if layout is static
                 if ( m_manager->HasFlag(wxPG_STATIC_SPLITTER) )
             {
                 // Never allow column resize if layout is static
                 if ( m_manager->HasFlag(wxPG_STATIC_SPLITTER) )
@@ -380,7 +380,7 @@ private:
 
                 return true;
             }
 
                 return true;
             }
-            else if ( evtType == wxEVT_COMMAND_HEADER_END_RESIZE )
+            else if ( evtType == wxEVT_HEADER_END_RESIZE )
             {
                 pg->SendEvent(wxEVT_PG_COL_END_DRAG,
                               NULL, NULL, 0,
             {
                 pg->SendEvent(wxEVT_PG_COL_END_DRAG,
                               NULL, NULL, 0,
@@ -745,12 +745,14 @@ bool wxPropertyGridManager::DoSelectPage( int index )
             return false;
     }
 
             return false;
     }
 
+#if wxUSE_TOOLBAR
     wxPropertyGridPage* prevPage;
 
     if ( m_selPage >= 0 )
         prevPage = GetPage(m_selPage);
     else
         prevPage = m_emptyPage;
     wxPropertyGridPage* prevPage;
 
     if ( m_selPage >= 0 )
         prevPage = GetPage(m_selPage);
     else
         prevPage = m_emptyPage;
+#endif
 
     wxPropertyGridPage* nextPage;
 
 
     wxPropertyGridPage* nextPage;
 
@@ -1030,7 +1032,7 @@ wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
 
             // Connect to toolbar button events.
             Connect(pageObj->m_toolId,
 
             // Connect to toolbar button events.
             Connect(pageObj->m_toolId,
-                    wxEVT_COMMAND_TOOL_CLICKED,
+                    wxEVT_TOOL,
                     wxCommandEventHandler(
                         wxPropertyGridManager::OnToolbarClick));
 
                     wxCommandEventHandler(
                         wxPropertyGridManager::OnToolbarClick));
 
@@ -1513,11 +1515,11 @@ void wxPropertyGridManager::RecreateControls()
                 m_pToolbar->Realize();
 
                 Connect(m_categorizedModeToolId,
                 m_pToolbar->Realize();
 
                 Connect(m_categorizedModeToolId,
-                        wxEVT_COMMAND_TOOL_CLICKED,
+                        wxEVT_TOOL,
                         wxCommandEventHandler(
                             wxPropertyGridManager::OnToolbarClick));
                 Connect(m_alphabeticModeToolId,
                         wxCommandEventHandler(
                             wxPropertyGridManager::OnToolbarClick));
                 Connect(m_alphabeticModeToolId,
-                        wxEVT_COMMAND_TOOL_CLICKED,
+                        wxEVT_TOOL,
                         wxCommandEventHandler(
                             wxPropertyGridManager::OnToolbarClick));
             }
                         wxCommandEventHandler(
                             wxPropertyGridManager::OnToolbarClick));
             }
@@ -1906,6 +1908,11 @@ void wxPropertyGridManager::OnResize( wxSizeEvent& WXUNUSED(event) )
             }
         }
     }
             }
         }
     }
+
+#if wxUSE_HEADERCTRL
+    if ( m_showHeader )
+        m_pHeaderCtrl->OnColumWidthsChanged();
+#endif
 }
 
 // -----------------------------------------------------------------------
 }
 
 // -----------------------------------------------------------------------
@@ -2003,7 +2010,7 @@ void wxPropertyGridManager::OnMouseClick( wxMouseEvent &event )
 
 void wxPropertyGridManager::OnMouseUp( wxMouseEvent &event )
 {
 
 void wxPropertyGridManager::OnMouseUp( wxMouseEvent &event )
 {
-    // No event type check - basicly calling this method should
+    // No event type check - basically calling this method should
     // just stop dragging.
 
     if ( m_dragStatus >= 1 )
     // just stop dragging.
 
     if ( m_dragStatus >= 1 )