| 7158 | } |
| 7159 | |
| 7160 | void 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 | |
| 7186 | int Editor::ContractedFoldNext ( int lineStart ) |
| 7187 | { |
nothing calls this directly
no test coverage detected