-void wxFileHistory::AddFilesToMenu()
-{
- if (m_fileHistoryN > 0)
- {
- wxNode* node = m_fileMenus.First();
- while (node)
- {
- wxMenu* menu = (wxMenu*) node->Data();
- menu->AppendSeparator();
- int i;
- for (i = 0; i < m_fileHistoryN; i++)
- {
- if (m_fileHistory[i])
- {
- wxString buf;
- buf.Printf(s_MRUEntryFormat, i+1, m_fileHistory[i]);
- menu->Append(wxID_FILE1+i, buf);
- }
- }
- node = node->Next();
- }
- }
-}
-
-void wxFileHistory::AddFilesToMenu(wxMenu* menu)
-{
- if (m_fileHistoryN > 0)
- {
- menu->AppendSeparator();
- int i;
- for (i = 0; i < m_fileHistoryN; i++)
- {
- if (m_fileHistory[i])
- {
- wxString buf;
- buf.Printf(s_MRUEntryFormat, i+1, m_fileHistory[i]);
- menu->Append(wxID_FILE1+i, buf);
- }
- }
- }
-}
-
-// ----------------------------------------------------------------------------
-// Permits compatibility with existing file formats and functions that
-// manipulate files directly
-// ----------------------------------------------------------------------------
-
-#if wxUSE_STD_IOSTREAM
-bool wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream)
-{
- FILE *fd1;
- int ch;
-
- if ((fd1 = wxFopen (filename.fn_str(), _T("rb"))) == NULL)
- return FALSE;
-
- while ((ch = getc (fd1)) != EOF)
- stream << (unsigned char)ch;
-
- fclose (fd1);
- return TRUE;