void ZoomText::OnIdle(wxIdleEvent& event) { event.Skip(); // sanity if(!m_classes.IsEmpty() || IsEmpty()) return; IEditor* editor = clGetManager()->GetActiveEditor(); if(!editor) return; if(m_classes.IsEmpty() && !editor->GetKeywordClasses().IsEmpty() && (editor->GetFileName().GetFullPath() == m_filename)) { // Sync between the keywords SetKeyWords(1, editor->GetKeywordClasses()); // classes SetKeyWords(3, editor->GetKeywordLocals()); // locals Colourise(0, GetLength()); } }
void ZoomText::OnTimer(wxTimerEvent& event) { // sanity if(!m_classes.IsEmpty() || IsEmpty()) { m_timer->Start(1000, true); return; } IEditor* editor = clGetManager()->GetActiveEditor(); if(!editor) { m_timer->Start(1000, true); return; } if(m_classes.IsEmpty() && !editor->GetKeywordClasses().IsEmpty() && (editor->GetFileName().GetFullPath() == m_filename)) { // Sync between the keywords SetKeyWords(1, editor->GetKeywordClasses()); // classes SetKeyWords(3, editor->GetKeywordLocals()); // locals Colourise(0, GetLength()); } m_timer->Start(1000, true); }