]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/ContractionState.h
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
17 int height
; ///< Number of display lines needed to show all of the line
27 class ContractionState
{
28 void Grow(int sizeNew
);
29 enum { growSize
= 4000 };
31 mutable int linesInDisplay
;
32 mutable OneLine
*lines
;
34 mutable int *docLines
;
35 mutable int sizeDocLines
;
37 void MakeValid() const;
41 virtual ~ContractionState();
45 int LinesInDoc() const;
46 int LinesDisplayed() const;
47 int DisplayFromDoc(int lineDoc
) const;
48 int DocFromDisplay(int lineDisplay
) const;
50 void InsertLines(int lineDoc
, int lineCount
);
51 void DeleteLines(int lineDoc
, int lineCount
);
53 bool GetVisible(int lineDoc
) const;
54 bool SetVisible(int lineDocStart
, int lineDocEnd
, bool visible
);
56 bool GetExpanded(int lineDoc
) const;
57 bool SetExpanded(int lineDoc
, bool expanded
);
59 int GetHeight(int lineDoc
) const;
60 bool SetHeight(int lineDoc
, int height
);