if (result == kControlButtonPart){
DataBrowserPropertyID col;
GetDataBrowserSortProperty(controlRef, &col);
-
+
DataBrowserTableViewColumnIndex column = 0;
verify_noerr( GetDataBrowserTableViewColumnPosition( controlRef, col, &column ) );
-
+
le.m_col = column;
// FIXME: we can't use the sort property for virtual listctrls
// so we need to find a better way to determine which column was clicked...
{
int id = event.GetId();
wxObject* obj = event.GetEventObject();
-
+
// even though we use a generic list ctrl underneath, make sure
// we present ourselves as wxListCtrl.
event.SetEventObject( m_list );
void wxListCtrl::OnChar(wxKeyEvent& event)
{
-
+
if (m_dbImpl)
{
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetId() );
le.SetEventObject(this);
le.m_code = event.GetKeyCode();
le.m_itemIndex = -1;
-
+
if (m_current == -1)
{
// if m_current isn't set, check if there's been a selection
// made before continuing
m_current = GetNextItem(-1, wxLIST_NEXT_BELOW, wxLIST_STATE_SELECTED);
}
-
+
// We need to determine m_current ourselves when navigation keys
// are used. Note that PAGEUP and PAGEDOWN do not alter the current
// item on native Mac ListCtrl, so we only handle up and down keys.
m_current -= 1;
else
m_current = 0;
-
+
break;
case WXK_DOWN:
m_current += 1;
else
m_current = GetItemCount() - 1;
-
+
break;
}
delete m_imageListState;
delete m_renameTimer;
-
+
WX_CLEAR_LIST(wxColumnList, m_colsInfo);
}
if (m_dbImpl)
{
wxASSERT_MSG( col < (int)m_colsInfo.GetCount(), wxT("invalid column index in wxMacListCtrlItem") );
-
+
long mask = item.GetMask();
{
wxListItem listItem;
if (m_genericImpl)
return m_genericImpl->GetSubItemRect(item, subItem, rect, code);
- // TODO: implement for DataBrowser implementation
+ // TODO: implement for DataBrowser implementation
return false;
}
DataBrowserTableViewColumnID col = 0;
verify_noerr( m_dbImpl->GetColumnIDFromIndex( 0, &col ) );
-
+
Rect bounds;
DataBrowserPropertyPart part = kDataBrowserPropertyEnclosingPart;
if ( code == wxLIST_RECT_LABEL )
if ( !IsVirtual() )
id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line);
- if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line))
+ if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line))
return line;
if ( (state == wxLIST_STATE_DONTCARE ) )
if ( !IsVirtual() )
id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line);
- if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line))
+ if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line))
return line;
if ( (state == wxLIST_STATE_DONTCARE ) )
just = teFlushRight;
}
m_dbImpl->InsertColumn(col, type, item.GetText(), just, width);
-
+
wxListItem* listItem = new wxListItem(item);
m_colsInfo.Insert( col, listItem );
SetColumn(col, item);
wxString text;
wxFont font = wxNullFont;
int imgIndex = -1;
-
+
DataBrowserTableViewColumnIndex listColumn = 0;
GetColumnPosition( property, &listColumn );
-
+
wxListCtrl* list = wxDynamicCast( GetWXPeer() , wxListCtrl );
wxMacListCtrlItem* lcItem;
wxColour color = *wxBLACK;
{
item = (wxMacListCtrlItem *) itemID;
}
-
+
// we want to depend on as little as possible to make sure tear-down of controls is safe
if ( message == kDataBrowserItemRemoved )
{
}
}
}
-
+
void wxMacDataBrowserListCtrlControl::MacInsertItem( unsigned int n, wxListItem* item )
{
-
+
wxMacDataItemBrowserControl::MacInsert(n, new wxMacListCtrlItem() );
MacSetColumnInfo(n, 0, item);
}