int LOFImportFileHandle::Import(TrackFactory *trackFactory, Track ***outTracks, int *outNumTracks, Tags *tags) { wxASSERT(mTextFile->IsOpened()); if(mTextFile->Eof()) { mTextFile->Close(); return eImportFailed; } wxString line = mTextFile->GetFirstLine(); while (!mTextFile->Eof()) { lofOpenFiles(&line); line = mTextFile->GetNextLine(); } // for last line lofOpenFiles(&line); // set any duration/offset factors for last window, as all files were called doDuration(); doScrollOffset(); // exited ok if(mTextFile->Close()) return eImportSuccess; return eImportFailed; }
wxString MyHtmlListBox::OnGetItem(size_t n) const { if ( !n && m_firstItemUpdated ) { return wxT("<h1><b>Just updated</b></h1>"); } #ifdef USE_HTML_FILE wxString s; if ( m_file.IsOpened() ) s = m_file[n]; return s; #else int level = n % 6 + 1; wxColour clr((unsigned char)(abs((int)n - 192) % 256), (unsigned char)(abs((int)n - 256) % 256), (unsigned char)(abs((int)n - 128) % 256)); wxString label = wxString::Format(wxT("<h%d><font color=%s>") wxT("Item</font> <b>%lu</b>") wxT("</h%d>"), level, clr.GetAsString(wxC2S_HTML_SYNTAX).c_str(), (unsigned long)n, level); if ( n == 1 ) { if ( !m_linkClicked ) label += wxT("<a href='1'>Click here...</a>"); else label += wxT("<font color='#9999ff'>Clicked here...</font>"); } return label; #endif }