dc.SetBackground(wxBrush(GetBackgroundColour()));
dc.Clear();
- dc.BeginDrawing();
dc.SetFont( GetFont() );
dc.SetBackgroundMode(wxTRANSPARENT);
}
// Finish up by drawing the buffer to the real dc
- dc.EndDrawing();
dc.SelectObject(wxNullBitmap);
real_dc.DrawBitmap(buffer, 0, 0, false);
}
if ( data != NULL )
{
- data->SetId((long)item);
+ data->SetId((void*)item);
}
parent->Insert( item, previous );
#endif
if ( data != NULL )
{
- data->SetId((long)m_anchor);
+ data->SetId((void*)m_anchor);
}
if (!HasFlag(wxTR_MULTIPLE))
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 );
}
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() )
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() )
{
}
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 !
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 !
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);
}
{
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 );
}
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 );
{
// 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 );
: 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);
// 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);
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));
// 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) );