]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ContractionState.h
1 // Scintilla source code edit control
2 // ContractionState.h - manages visibility of lines for folding
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
6 #ifndef CONTRACTIONSTATE_H
7 #define CONTRACTIONSTATE_H
11 int displayLine
; // position within set of visible lines
12 int docLine
; // inverse of displayLine
20 class ContractionState
{
21 void Grow(int sizeNew
);
22 enum { growSize
= 4000 };
25 mutable OneLine
*lines
;
28 void MakeValid() const;
31 virtual ~ContractionState();
35 int LinesInDoc() const;
36 int LinesDisplayed() const;
37 int DisplayFromDoc(int lineDoc
) const;
38 int DocFromDisplay(int lineDisplay
) const;
40 void InsertLines(int lineDoc
, int lineCount
);
41 void DeleteLines(int lineDoc
, int lineCount
);
43 bool GetVisible(int lineDoc
) const;
44 bool SetVisible(int lineDocStart
, int lineDocEnd
, bool visible
);
46 bool GetExpanded(int lineDoc
) const;
47 bool SetExpanded(int lineDoc
, bool expanded
);