// Check if the id is in the range assigned to MRU list entries.
const int id = event.GetId();
if ( id >= wxID_FILE1 &&
- id < wxID_FILE1 + m_fileHistory->GetBaseId() )
+ id < wxID_FILE1 + static_cast<int>(m_fileHistory->GetCount()) )
{
DoOpenMRUFile(id - wxID_FILE1);
}
m_templates.DeleteObject(temp);
}
+wxDocTemplate* wxDocManager::FindTemplate(const wxClassInfo* classinfo)
+{
+ for ( wxList::compatibility_iterator node = m_templates.GetFirst();
+ node;
+ node = node->GetNext() )
+ {
+ wxDocTemplate* t = wxStaticCast(node->GetData(), wxDocTemplate);
+ if ( t->GetDocClassInfo() == classinfo )
+ return t;
+ }
+
+ return NULL;
+}
+
// Add and remove a document from the manager's list
void wxDocManager::AddDocument(wxDocument *doc)
{