int CompareDirectory(Item const &item) const
    {
        int c = directory.CompareTo(item.directory);
        if (c)
            return c;
        c = filename.CompareTo(item.filename);

        if (c)
            return c;
        return Compare(line, item.line);
    }
 int CompareFile(Item const &item) const
 {
     int c = filename.CompareTo(item.filename);
     if (c)
         return c;
     return Compare(line, item.line);
 }
Esempio n. 3
0
wxTreeItemId panelSearchResult::FindItem( wxTreeItemId root, const wxString& sSearchFor ) {
	wxTreeItemIdValue cookie;
	wxTreeItemId      item = treeResults->GetFirstChild( root, cookie );
    wxString sData;

	while( item.IsOk() ) {
	    
        // Get the item text
        sData = treeResults->GetItemText(item);

        // Check if it matches
		if( ! sSearchFor.CompareTo(sData) )
			return item;
		
        // Check next item
		item = treeResults->GetNextChild( root, cookie);
	}
 
	// Not found
	wxTreeItemId dummy;
	return dummy;
}