Esempio n. 1
0
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);
    }
}
Esempio n. 2
0
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);
		}
	}
}
Esempio n. 3
0
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();
}
Esempio n. 4
0
void OutputTabWindow::OnMarginClick(wxScintillaEvent& e)
{
	if (m_sci && e.GetMargin() == 4) {
		m_sci->ToggleFold(m_sci->LineFromPosition(e.GetPosition()));
	}
}