MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / FoldExpand

Method FoldExpand

scintilla/src/Editor.cxx:7160–7184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7158}
7159
7160void Editor::FoldExpand ( int line, int action, int level )
7161{
7162 bool expanding = action == SC_FOLDACTION_EXPAND;
7163 if ( action == SC_FOLDACTION_TOGGLE ) {
7164 expanding = !cs.GetExpanded ( line );
7165 }
7166 SetFoldExpanded ( line, expanding );
7167 if ( expanding && ( cs.HiddenLines() == 0 ) )
7168 // Nothing to do
7169 {
7170 return;
7171 }
7172 int lineMaxSubord = pdoc->GetLastChild ( line, level & SC_FOLDLEVELNUMBERMASK );
7173 line++;
7174 cs.SetVisible ( line, lineMaxSubord, expanding );
7175 while ( line <= lineMaxSubord ) {
7176 int levelLine = pdoc->GetLevel ( line );
7177 if ( levelLine & SC_FOLDLEVELHEADERFLAG ) {
7178 SetFoldExpanded ( line, expanding );
7179 }
7180 line++;
7181 }
7182 SetScrollBars();
7183 Redraw();
7184}
7185
7186int Editor::ContractedFoldNext ( int lineStart )
7187{

Callers

nothing calls this directly

Calls 5

HiddenLinesMethod · 0.80
GetLastChildMethod · 0.80
SetVisibleMethod · 0.80
GetExpandedMethod · 0.45
GetLevelMethod · 0.45

Tested by

no test coverage detected