]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp
Don't confuse SWIG with static and non-static methods of the same name
[wxWidgets.git] / wxPython / contrib / gizmos / wxCode / src / treelistctrl.cpp
index 251ef1b7f70cb5bc4b1a833dd5a93080afdb041a..3345ac6e5af5127f38fc5c4cc9dfc80dc558d1de 100644 (file)
@@ -112,7 +112,7 @@ class  wxTreeListHeaderWindow : public wxWindow
 {
 protected:
     wxTreeListMainWindow *m_owner;
-    wxCursor             *m_currentCursor;
+    const wxCursor       *m_currentCursor;
     wxCursor             *m_resizeCursor;
     bool                 m_isDragging;
 
@@ -2926,7 +2926,7 @@ void wxTreeListMainWindow::SelectItem(const wxTreeItemId& itemId,
 
 void wxTreeListMainWindow::SelectAll(bool extended_select)
 {
-    wxCHECK_RET( GetWindowStyleFlag() & wxTR_MULTIPLE, wxT("invalid tree style") );
+    wxCHECK_RET( GetWindowStyleFlag() & wxTR_MULTIPLE, wxT("invalid tree style, must have wxTR_MULTIPLE style to select all items") );
 
     wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId() );
     event.SetItem( GetRootItem() );
@@ -2954,6 +2954,7 @@ void wxTreeListMainWindow::SelectAll(bool extended_select)
     wxTreeItemId root = GetRootItem();
     wxTreeListItem *first = (wxTreeListItem *)GetFirstChild (root, cookie).m_pItem;
     wxTreeListItem *last = (wxTreeListItem *)GetLastChild (GetRootItem()).m_pItem;
+    if (!first || !last) return;
     if (TagAllChildrenUntilLast (first, last, true)) return;
     TagNextChildren (first, last, true);
 
@@ -3449,8 +3450,8 @@ void wxTreeListMainWindow::PaintLevel (wxTreeListItem *item, wxDC &dc,
             int total_width = m_owner->GetHeaderWindow()->GetWidth();
             // if the background colour is white, choose a
             // contrasting color for the lines
-            dc.SetPen (*((GetBackgroundColour() == *wxWHITE)?
-                        wxMEDIUM_GREY_PEN : wxWHITE_PEN));
+            dc.SetPen(((GetBackgroundColour() == *wxWHITE) ?
+                       wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT) : *wxWHITE_PEN));
             dc.DrawLine(0, y_top, total_width, y_top);
             dc.DrawLine(0, y, total_width, y);
         }