diff options
Diffstat (limited to 'src/Editor.h')
-rw-r--r-- | src/Editor.h | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/src/Editor.h b/src/Editor.h index fd368df39..53da90906 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -14,17 +14,6 @@ namespace Scintilla { /** */ -class Caret { -public: - bool active; - bool on; - int period; - - Caret(); -}; - -/** - */ class Timer { public: bool ticking; @@ -160,136 +149,6 @@ struct WrapPending { } }; -struct PrintParameters { - int magnification; - int colourMode; - WrapMode wrapState; - PrintParameters(); -}; - -/** -* EditModel holds the state that needs to be seen by EditView. -*/ -class EditModel { - // Private so EditModel objects can not be copied - EditModel(const EditModel &); - EditModel &operator=(const EditModel &); - -public: - bool inOverstrike; - int xOffset; ///< Horizontal scrolled amount in pixels - bool trackLineWidth; - - SpecialRepresentations reprs; - Caret caret; - SelectionPosition posDrag; - Position braces[2]; - int bracesMatchStyle; - int highlightGuideColumn; - Selection sel; - bool primarySelection; - - int foldFlags; - ContractionState cs; - - // Hotspot support - Range hotspot; - - // Wrapping support - int wrapWidth; - - Document *pdoc; - - EditModel(); - ~EditModel(); - - virtual int TopLineOfMain() const = 0; - virtual Point GetVisibleOriginInMain() const = 0; - virtual int LinesOnScreen() const = 0; - virtual Range GetHotSpotRange() const = 0; -}; - -/** -* MarginView draws the margins. -*/ -class MarginView { -public: - // Highlight current folding block - HighlightDelimiter highlightDelimiter; - Surface *pixmapSelMargin; - Surface *pixmapSelPattern; - Surface *pixmapSelPatternOffset1; - - MarginView(); - - void DropGraphics(bool freeObjects); - void AllocateGraphics(const ViewStyle &vsDraw); - void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); - void PaintMargin(Surface *surface, int topLine, PRectangle rc, PRectangle rcMargin, - const EditModel &model, const ViewStyle &vs); -}; - -/** -* EditView draws the main text area. -*/ -class EditView { -public: - PrintParameters printParameters; - - bool hideSelection; - bool drawOverstrikeCaret; - - /** In bufferedDraw mode, graphics operations are drawn to a pixmap and then copied to - * the screen. This avoids flashing but is about 30% slower. */ - bool bufferedDraw; - /** In twoPhaseDraw mode, drawing is performed in two phases, first the background - * and then the foreground. This avoids chopping off characters that overlap the next run. */ - bool twoPhaseDraw; - - int lineWidthMaxSeen; - bool additionalCaretsBlink; - bool additionalCaretsVisible; - - Surface *pixmapLine; - Surface *pixmapIndentGuide; - Surface *pixmapIndentGuideHighlight; - - LineLayoutCache llc; - PositionCache posCache; - - EditView(); - - void DropGraphics(bool freeObjects); - void AllocateGraphics(const ViewStyle &vsDraw); - void RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw); - - LineLayout *RetrieveLineLayout(int lineNumber, const EditModel &model); - void LayoutLine(int line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, - const EditModel &model, int width = LineLayout::wrapWidthInfinite); - - Point LocationFromPosition(Surface *surface, SelectionPosition pos, int topLine, const EditModel &model, const ViewStyle &vs); - SelectionPosition SPositionFromLocation(Surface *surface, Point pt, bool canReturnInvalid, bool charPosition, bool virtualSpace, - const EditModel &model, const ViewStyle &vs); - SelectionPosition SPositionFromLineX(Surface *surface, int lineDoc, int x, const EditModel &model, const ViewStyle &vs); - int DisplayFromPosition(Surface *surface, int pos, const EditModel &model, const ViewStyle &vs); - int StartEndDisplayLine(Surface *surface, int pos, bool start, const EditModel &model, const ViewStyle &vs); - - void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); - void DrawEOL(Surface *surface, const ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, - int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, - ColourOptional background, const EditModel &model); - void DrawAnnotation(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine, const EditModel &model); - void DrawCarets(Surface *surface, const ViewStyle &vsDraw, int line, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine, const EditModel &model) const; - void DrawLine(Surface *surface, const ViewStyle &vsDraw, int line, int lineVisible, int xStart, - PRectangle rcLine, LineLayout *ll, int subLine, const EditModel &model); - void PaintText(Surface *surfaceWindow, PRectangle rcArea, PRectangle rcClient, - const EditModel &model, const ViewStyle &vsDraw); - long FormatRange(bool draw, Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, - const EditModel &model, const ViewStyle &vs); -}; - /** */ class Editor : public EditModel, public DocWatcher { |