]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp
Mention statusbar painting fix.
[wxWidgets.git] / wxPython / contrib / gizmos / wxCode / src / treelistctrl.cpp
index cb83cda0e6290f57768503c0457741d5cdcb6a31..4e7eea70695efbc5bee48b803ad36ba8d6ab5383 100644 (file)
 // headers
 // ---------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-  #pragma implementation "treelistctrl.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -1074,7 +1070,7 @@ void wxTreeListTextCtrl::OnKillFocus( wxFocusEvent &event )
 //  wxTreeListHeaderWindow
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTreeListHeaderWindow,wxWindow);
+IMPLEMENT_DYNAMIC_CLASS(wxTreeListHeaderWindow,wxWindow)
 
 BEGIN_EVENT_TABLE(wxTreeListHeaderWindow,wxWindow)
     EVT_ERASE_BACKGROUND  (wxTreeListHeaderWindow::OnEraseBackground)
@@ -1398,7 +1394,7 @@ void wxTreeListHeaderWindow::OnMouse( wxMouseEvent &event )
         // end of the current column
         int xpos = 0;
 
-        // find the column where this event occured
+        // find the column where this event occurred
         int countCol = GetColumnCount();
         for (int col = 0; col < countCol; col++)
         {
@@ -2463,7 +2459,7 @@ wxTreeItemId wxTreeListMainWindow::DoInsertItem(const wxTreeItemId& parentId,
 
     if ( data != NULL )
     {
-        data->SetId((long)item);
+        data->SetId((void*)item);
     }
 
     parent->Insert( item, previous );
@@ -2500,7 +2496,7 @@ wxTreeItemId wxTreeListMainWindow::AddRoot(const wxString& text,
 #endif
     if ( data != NULL )
     {
-        data->SetId((long)m_anchor);
+        data->SetId((void*)m_anchor);
     }
 
     if (!HasFlag(wxTR_MULTIPLE))
@@ -2575,7 +2571,7 @@ wxTreeItemId wxTreeListMainWindow::AppendItem(const wxTreeItemId& parentId,
 void wxTreeListMainWindow::SendDeleteEvent(wxTreeListItem *item)
 {
     wxTreeEvent event( wxEVT_COMMAND_TREE_DELETE_ITEM, m_owner->GetId() );
-    event.SetItem((long) item);
+    event.SetItem((void*)item);
     event.SetEventObject( /*this*/m_owner );
     m_owner->ProcessEvent( event );
 }
@@ -2652,7 +2648,7 @@ void wxTreeListMainWindow::Expand(const wxTreeItemId& itemId)
         return;
 
     wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_EXPANDING, m_owner->GetId() );
-    event.SetItem( (long) item );
+    event.SetItem( (void*)item );
     event.SetEventObject( /*this*/m_owner );
 
     if ( m_owner->ProcessEvent( event ) && !event.IsAllowed() )
@@ -2698,7 +2694,7 @@ void wxTreeListMainWindow::Collapse(const wxTreeItemId& itemId)
         return;
 
     wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, m_owner->GetId() );
-    event.SetItem( (long) item );
+    event.SetItem( (void*)item );
     event.SetEventObject( /*this*/m_owner );
     if ( m_owner->ProcessEvent( event ) && !event.IsAllowed() )
     {
@@ -2876,8 +2872,8 @@ void wxTreeListMainWindow::SelectItem(const wxTreeItemId& itemId,
     }
 
     wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId() );
-    event.SetItem( (long) item );
-    event.SetOldItem( (long) m_current );
+    event.SetItem( (void*)item );
+    event.SetOldItem( (void*)m_current );
     event.SetEventObject( /*this*/m_owner );
     // TODO : Here we don't send any selection mode yet !
 
@@ -2936,7 +2932,7 @@ void wxTreeListMainWindow::SelectAll(bool extended_select)
 
     wxTreeEvent event( wxEVT_COMMAND_TREE_SEL_CHANGING, m_owner->GetId() );
     event.SetItem( GetRootItem() );
-    event.SetOldItem( (long) m_current );
+    event.SetOldItem( (void*) m_current );
     event.SetEventObject( /*this*/m_owner );
     // TODO : Here we don't send any selection mode yet !
 
@@ -3801,7 +3797,7 @@ void wxTreeListMainWindow::OnChar( wxKeyEvent &event )
             {
                 wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
                                    m_owner->GetId() );
-                event.SetItem( (long) m_current);
+                event.SetItem( (void*) m_current);
                 event.SetEventObject( /*this*/m_owner );
                 m_owner->GetEventHandler()->ProcessEvent( event );
             }
@@ -4072,7 +4068,7 @@ void wxTreeListMainWindow::Edit( const wxTreeItemId& item )
     m_currentEdit = (wxTreeListItem*) item.m_pItem;
 
     wxTreeEvent te( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, m_owner->GetId() );
-    te.SetItem( (long) m_currentEdit);
+    te.SetItem( (void*) m_currentEdit);
     te.SetEventObject( /*this*/m_owner );
     m_owner->GetEventHandler()->ProcessEvent( te );
 
@@ -4113,7 +4109,7 @@ void wxTreeListMainWindow::OnRenameAccept()
 {
     // TODO if the validator fails this causes a crash
     wxTreeEvent le( wxEVT_COMMAND_TREE_END_LABEL_EDIT, m_owner->GetId() );
-    le.SetItem( (long) m_currentEdit );
+    le.SetItem( (void*)m_currentEdit );
     le.SetEventObject( /*this*/m_owner );
     le.SetLabel( m_renameRes );
     m_owner->GetEventHandler()->ProcessEvent( le );
@@ -4223,7 +4219,7 @@ void wxTreeListMainWindow::OnMouse( wxMouseEvent &event )
                               : wxEVT_COMMAND_TREE_BEGIN_DRAG;
 
         wxTreeEvent nevent( command,/*ALB*/ m_owner->GetId() );
-        nevent.SetItem( (long) m_current);
+        nevent.SetItem( (void*)m_current);
         nevent.SetEventObject(/*this*/m_owner); // ALB
         nevent.SetPoint(pt);
 
@@ -4286,7 +4282,7 @@ void wxTreeListMainWindow::OnMouse( wxMouseEvent &event )
         // generate the drag end event
         wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG,/*ALB*/m_owner->GetId());
 
-        event.SetItem( (long) item );
+        event.SetItem( (void*)item );
         event.SetPoint( wxPoint(x, y) );
         event.SetEventObject(/*this*/m_owner);
 
@@ -4314,7 +4310,7 @@ void wxTreeListMainWindow::OnMouse( wxMouseEvent &event )
             SetFocus();
             wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK,
                                m_owner->GetId());
-            nevent.SetItem( (long) item );
+            nevent.SetItem( (void*)item );
             int nx, ny;
             CalcScrolledPosition(x, y, &nx, &ny);
             nevent.SetPoint( wxPoint(nx, ny));
@@ -4381,7 +4377,7 @@ void wxTreeListMainWindow::OnMouse( wxMouseEvent &event )
                 // send activate event first
                 wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
                                     m_owner->GetId() );
-                nevent.SetItem( (long) item );
+                nevent.SetItem( (void*)item );
                 int nx, ny;
                 CalcScrolledPosition(x, y, &nx, &ny);
                 nevent.SetPoint( wxPoint(nx, ny) );
@@ -4629,7 +4625,7 @@ void wxTreeListMainWindow::SetFocus()
 //  wxTreeListCtrl
 //-----------------------------------------------------------------------------
 
-IMPLEMENT_DYNAMIC_CLASS(wxTreeListCtrl, wxControl);
+IMPLEMENT_DYNAMIC_CLASS(wxTreeListCtrl, wxControl)
 
 BEGIN_EVENT_TABLE(wxTreeListCtrl, wxControl)
     EVT_SIZE(wxTreeListCtrl::OnSize)