本文整理汇总了C++中BrowseMarks类的典型用法代码示例。如果您正苦于以下问题:C++ BrowseMarks类的具体用法?C++ BrowseMarks怎么用?C++ BrowseMarks使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BrowseMarks类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
// ----------------------------------------------------------------------------
void ProjectData::DumpBrowse_Marks( const wxString hashType )
// ----------------------------------------------------------------------------
{
#if defined(LOGGING)
LOGIT( _T("--- DumpBrowseData ---[%s]"), hashType.c_str() );
FileBrowse_MarksHash* phash = &m_FileBrowse_MarksArchive;
if ( hashType == wxT("BookMarks") )
phash = &m_FileBook_MarksArchive;
FileBrowse_MarksHash& hash = *phash;
LOGIT( _T("Dump_%s Size[%d]"), hashType.c_str(), hash.size() );
for (FileBrowse_MarksHash::iterator it = hash.begin(); it != hash.end(); ++it)
{
wxString filename = it->first;
BrowseMarks* p = it->second;
LOGIT( _T("Filename[%s]%s*[%p]name[%s]"), filename.c_str(), hashType.c_str(), p, p->GetFilePath().c_str() );
if (p)
{ //dump the browse marks
p->Dump();
}
}
#endif
}
示例2: defined
// ----------------------------------------------------------------------------
void ProjectData::DumpHash( const wxString
#if defined(LOGGING)
hashType
#endif
)
// ----------------------------------------------------------------------------
{
#if defined(LOGGING)
FileBrowse_MarksHash* phash = &m_FileBrowse_MarksArchive;
if ( hashType == wxT("BookMarks") )
phash = &m_FileBook_MarksArchive;
FileBrowse_MarksHash& hash = *phash;
LOGIT( _T("--- DumpProjectHash ---[%s]Count[%d]"), hashType.c_str(), hash.size(), m_ProjectFilename.c_str() );
for (FileBrowse_MarksHash::iterator it = hash.begin(); it != hash.end(); it++)
{
wxString filename = it->first; //an Editor filename withing this project
BrowseMarks* p = it->second; // ptr to array of Editor Browse/Book mark cursor positions
LOGIT( _T("filename[%s]BrowseMark*[%p]name[%s]"), filename.c_str(), p, p->GetFilePath().c_str() );
}
#endif
}
示例3: GetPointerToBrowse_MarksArray
// ----------------------------------------------------------------------------
BrowseMarks* ProjectData::GetPointerToBrowse_MarksArray(FileBrowse_MarksHash& hash, wxString filePath)
// ----------------------------------------------------------------------------
{
// Return a pointer to a BrowseMarks array with this filePath
for (FileBrowse_MarksHash::iterator it = hash.begin(); it != hash.end(); it++)
{
BrowseMarks* p = it->second;
if ( p->GetFilePath() == filePath ) {return p;}
}
return 0;
}
示例4: RecordMarksFrom
// ----------------------------------------------------------------------------
void BrowseMarks::RecordMarksFrom(BrowseMarks& otherBrowse_Marks)
// ----------------------------------------------------------------------------
{
// get editor by filename in case the editor was close/opened again
//-EditorBase* eb = m_pEditorBase;
EditorBase* eb = m_pEdMgr->GetEditor(m_filePath);
#if defined(LOGGING)
if (not eb) asm("int3"); /*trap*/
#endif
if (not eb) return;
cbEditor* cbed = Manager::Get()->GetEditorManager()->GetBuiltinEditor(eb);
if (not cbed) return;
cbStyledTextCtrl* control = cbed->GetControl();
for (int i=0; i<MaxEntries; ++i)
{
int posn = otherBrowse_Marks.GetMark(i);
if ( posn != -1 )
{
#if defined(LOGGING)
///LOGIT( _T("RecordMarksFrom for[%d][%d]"),i,posn );
#endif
RecordMark( posn );
int line = control->LineFromPosition(posn);
//-control->MarkerAdd(line, BROWSETRACKER_MARKER);
control->MarkerAdd(line, GetBrowseMarkerId());
}
}
}
示例5: BrowseMarks
// ----------------------------------------------------------------------------
bool BrowseTrackerLayout::ParseBrowse_MarksString(const wxString& filename, wxString BrowseMarksString, FileBrowse_MarksHash& m_EdMarksArchive)
// ----------------------------------------------------------------------------
{
if (filename.IsEmpty()) return false;
if ( BrowseMarksString.IsEmpty() ) return false;
ProjectFile* pf = m_pProject->GetFileByFilename( filename, true, true);
if ( not pf ) return false;
wxString filenamePath = pf->file.GetFullPath();
// parse the comma delimited string
BrowseMarks* pEdPosnArchive = new BrowseMarks(filenamePath );
wxStringTokenizer tkz(BrowseMarksString, wxT(","));
while ( tkz.HasMoreTokens() )
{ long longnum;
tkz.GetNextToken().ToLong(&longnum);
pEdPosnArchive->RecordMark(longnum);
}//while
m_EdMarksArchive[filenamePath] = pEdPosnArchive;
return true;
}//ParseBrowse_MarksString
示例6: defined
void BrowseTrackerLayout::DumpBrowse_Marks( const wxString /*hashType*/, FileBrowse_MarksHash& /*m_FileBrowse_MarksArchive*/ )
#endif
// ----------------------------------------------------------------------------
{
#if defined(LOGGING)
LOGIT( _T("--- DumpBrowseData ---[%s]"), hashType.c_str() );
FileBrowse_MarksHash* phash = &m_FileBrowse_MarksArchive;
#if defined(LOGGING)
LOGIT( _T("Dump_%s Size[%lu]"), hashType.wx_str(), static_cast<unsigned long>(phash->size()) );
#endif
for (FileBrowse_MarksHash::iterator it = phash->begin(); it != phash->end(); ++it)
{
wxString filename = it->first;
BrowseMarks* p = it->second;
LOGIT( _T("Filename[%s]%s*[%p]name[%s]"), filename.c_str(), hashType.c_str(), p, p->GetFilePath().c_str() );
if (p)
{ //dump the browse marks
p->Dump();
}
}
#endif
}