void CCTestFrame::OnMarginClick(wxScintillaEvent& event) { if (event.GetMargin()==C_FOLDING_MARGIN) { int lineYpix = event.GetPosition(); int line = m_Control->LineFromPosition(lineYpix); m_Control->ToggleFold(line); } }
void CodeEditor::OnMarginClick(wxScintillaEvent &event) { if (event.GetMargin() == 1) { int lineClick = LineFromPosition(event.GetPosition()); int levelClick = GetFoldLevel(lineClick); if ((levelClick & wxSCI_FOLDLEVELHEADERFLAG) > 0) { ToggleFold (lineClick); } } }
void VObjEvtHandler::OnMarginClick ( wxScintillaEvent& event ) { wxScintilla* scintilla = wxDynamicCast( m_window, wxScintilla ); if ( scintilla != NULL ) { if ( event.GetMargin() == 1 ) { int lineClick = scintilla->LineFromPosition( event.GetPosition() ); int levelClick = scintilla->GetFoldLevel( lineClick ); if ( ( levelClick & wxSCI_FOLDLEVELHEADERFLAG ) > 0 ) { scintilla->ToggleFold( lineClick ); } } } event.Skip(); }
void OutputTabWindow::OnMarginClick(wxScintillaEvent& e) { if (m_sci && e.GetMargin() == 4) { m_sci->ToggleFold(m_sci->LineFromPosition(e.GetPosition())); } }