]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/ContractionState.h
0d7881c7b227c1ae2dc93ff23d51dca471c4a8c9
1 // Scintilla source code edit control
2 /** @file ContractionState.h
3 ** Manages visibility of lines for folding.
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef CONTRACTIONSTATE_H
9 #define CONTRACTIONSTATE_H
15 int displayLine
; ///< Position within set of visible lines
16 int docLine
; ///< Inverse of @a displayLine
26 class ContractionState
{
27 void Grow(int sizeNew
);
28 enum { growSize
= 4000 };
31 mutable OneLine
*lines
;
34 void MakeValid() const;
38 virtual ~ContractionState();
42 int LinesInDoc() const;
43 int LinesDisplayed() const;
44 int DisplayFromDoc(int lineDoc
) const;
45 int DocFromDisplay(int lineDisplay
) const;
47 void InsertLines(int lineDoc
, int lineCount
);
48 void DeleteLines(int lineDoc
, int lineCount
);
50 bool GetVisible(int lineDoc
) const;
51 bool SetVisible(int lineDocStart
, int lineDocEnd
, bool visible
);
53 bool GetExpanded(int lineDoc
) const;
54 bool SetExpanded(int lineDoc
, bool expanded
);