git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43770
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
info.SetImage( OnGetItemColumnImage(info.m_itemId, info.m_col) );
if (info.GetMask() & wxLIST_MASK_STATE)
{
info.SetImage( OnGetItemColumnImage(info.m_itemId, info.m_col) );
if (info.GetMask() & wxLIST_MASK_STATE)
{
- if (IsDataBrowserItemSelected( m_dbImpl->GetControlRef(), info.m_itemId+1 ))
+ if (IsDataBrowserItemSelected( m_dbImpl->GetControlRef(), info.m_itemId+1 ))
info.SetState(info.GetState() | wxLIST_STATE_SELECTED);
}
info.SetState(info.GetState() | wxLIST_STATE_SELECTED);
}
wxListItemAttr* attrs = OnGetItemAttr( info.m_itemId );
if (attrs)
{
wxListItemAttr* attrs = OnGetItemAttr( info.m_itemId );
if (attrs)
{
if ( HasFlag(wxLC_VIRTUAL) )
{
if (stateMask == wxLIST_STATE_SELECTED)
if ( HasFlag(wxLC_VIRTUAL) )
{
if (stateMask == wxLIST_STATE_SELECTED)
- {
- if (IsDataBrowserItemSelected( m_dbImpl->GetControlRef(), item+1 ))
+ {
+ if (IsDataBrowserItemSelected( m_dbImpl->GetControlRef(), item+1 ))
return wxLIST_STATE_SELECTED;
else
return wxLIST_STATE_SELECTED;
else
{
if (m_genericImpl)
return m_genericImpl->SetItemState(item, state, stateMask);
{
if (m_genericImpl)
return m_genericImpl->SetItemState(item, state, stateMask);
if (m_dbImpl)
{
DataBrowserSetOption option = kDataBrowserItemsAdd;
if ( stateMask == wxLIST_STATE_SELECTED && state == 0 )
option = kDataBrowserItemsRemove;
if (m_dbImpl)
{
DataBrowserSetOption option = kDataBrowserItemsAdd;
if ( stateMask == wxLIST_STATE_SELECTED && state == 0 )
option = kDataBrowserItemsRemove;
if (item == -1)
{
if ( HasFlag(wxLC_VIRTUAL) )
if (item == -1)
{
if ( HasFlag(wxLC_VIRTUAL) )
if (line_upper.find(str_upper) == 0)
return idx;
}
if (line_upper.find(str_upper) == 0)
return idx;
}
{
if (m_genericImpl)
return m_genericImpl->GetScrollPos(orient);
{
if (m_genericImpl)
return m_genericImpl->GetScrollPos(orient);
if (m_dbImpl)
{
UInt32 offsetX, offsetY;
if (m_dbImpl)
{
UInt32 offsetX, offsetY;
// we need to temporarily disable the new item creation notification
// procedure to speed things up
// FIXME: Even this doesn't seem to help much...
// we need to temporarily disable the new item creation notification
// procedure to speed things up
// FIXME: Even this doesn't seem to help much...
// FIXME: Find a more efficient way to do this.
m_dbImpl->MacClear();
// FIXME: Find a more efficient way to do this.
m_dbImpl->MacClear();
DataBrowserCallbacks callbacks;
DataBrowserItemNotificationUPP itemUPP;
GetDataBrowserCallbacks(m_dbImpl->GetControlRef(), &callbacks);
DataBrowserCallbacks callbacks;
DataBrowserItemNotificationUPP itemUPP;
GetDataBrowserCallbacks(m_dbImpl->GetControlRef(), &callbacks);
#if wxUSE_DRAG_AND_DROP
if (m_genericImpl)
m_genericImpl->SetDropTarget( dropTarget );
#if wxUSE_DRAG_AND_DROP
if (m_genericImpl)
m_genericImpl->SetDropTarget( dropTarget );
if (m_dbImpl)
wxWindow::SetDropTarget( dropTarget );
#endif
if (m_dbImpl)
wxWindow::SetDropTarget( dropTarget );
#endif
#if wxUSE_DRAG_AND_DROP
if (m_genericImpl)
return m_genericImpl->GetDropTarget();
#if wxUSE_DRAG_AND_DROP
if (m_genericImpl)
return m_genericImpl->GetDropTarget();
if (m_dbImpl)
return wxWindow::GetDropTarget();
#endif
if (m_dbImpl)
return wxWindow::GetDropTarget();
#endif
{
wxMacListCtrlItem* item = (wxMacListCtrlItem*)itemOneID;
wxMacListCtrlItem* otherItem = (wxMacListCtrlItem*)itemTwoID;
{
wxMacListCtrlItem* item = (wxMacListCtrlItem*)itemOneID;
wxMacListCtrlItem* otherItem = (wxMacListCtrlItem*)itemTwoID;
// FIXME: This code causes a crash in wxPython for some reason
// and moreover, further testing shows that the column click event
// is only sent to the list ctrl after the native control has finished
// sorting items anyway. So just disable this for now.
// FIXME: This code causes a crash in wxPython for some reason
// and moreover, further testing shows that the column click event
// is only sent to the list ctrl after the native control has finished
// sorting items anyway. So just disable this for now.
//wxListCtrlCompare func = list->GetCompareFunc();
//long item1 = GetLineFromItem(item);
//long item2 = GetLineFromItem(otherItem);
//wxListCtrlCompare func = list->GetCompareFunc();
//long item1 = GetLineFromItem(item);
//long item2 = GetLineFromItem(otherItem);
//if (func != NULL && item->HasColumnInfo(colId) && otherItem->HasColumnInfo(colId))
// return func(item1, item2, list->GetCompareFuncData()) >= 0;
//if (func != NULL && item->HasColumnInfo(colId) && otherItem->HasColumnInfo(colId))
// return func(item1, item2, list->GetCompareFuncData()) >= 0;