// get the colour to be used for drawing the rules
wxColour GetRuleColour() const
{
-#ifdef __WXMAC__
- return *wxWHITE;
-#else
return wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
-#endif
}
private:
// end of the current column
int xpos = 0;
- // find the column where this event occured
+ // find the column where this event occurred
int col,
countCol = m_owner->GetColumnCount();
for (col = 0; col < countCol; col++)
wxSOLID
);
- wxSize sz = size;
- sz.y = 25;
-
SetScrollbars( 0, 0, 0, 0, 0, 0 );
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
HighlightAll( false );
ReverseHighlight(m_lineSelectSingleOnUp);
}
- else if (m_lastOnSame)
+ if (m_lastOnSame)
{
if ((current == m_current) &&
(hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
- HasFlag(wxLC_EDIT_LABELS) )
+ HasFlag(wxLC_EDIT_LABELS) )
{
m_renameTimer->Start( 100, true );
}
}
else
{
- // This is neccessary , because after a DnD operation in
+ // This is necessary, because after a DnD operation in
// from and to ourself, the up event is swallowed by the
// DnD code. So on next non-up event (which means here and
// now) m_lineSelectSingleOnUp should be reset.
m_lineLastClicked = current;
size_t oldCurrent = m_current;
+ bool oldWasSelected = IsHighlighted(m_current);
+
bool cmdModifierDown = event.CmdDown();
if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
{
}
// forceClick is only set if the previous click was on another item
- m_lastOnSame = !forceClick && (m_current == oldCurrent);
+ m_lastOnSame = !forceClick && (m_current == oldCurrent) && oldWasSelected;
}
}
return;
}
- wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
- _T("invalid list ctrl item index in SetItem") );
+ wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
+ _T("invalid list ctrl item index in SetItem") );
size_t oldCurrent = m_current;
size_t item = (size_t)litem; // safe because of the check above
return info.GetBackgroundColour();
}
+void wxGenericListCtrl::SetItemFont( long item, const wxFont &f )
+{
+ wxListItem info;
+ info.m_itemId = item;
+ info.SetFont( f );
+ m_mainWin->SetItem( info );
+}
+
+wxFont wxGenericListCtrl::GetItemFont( long item ) const
+{
+ wxListItem info;
+ info.m_itemId = item;
+ m_mainWin->GetItem( info );
+ return info.GetFont();
+}
+
int wxGenericListCtrl::GetSelectedItemCount() const
{
return m_mainWin->GetSelectedItemCount();