Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends

Editor Class Reference

Inheritance diagram for Editor:
Inheritance graph
[legend]
Collaboration diagram for Editor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool IsUnicodeMode () const
virtual sptr_t WndProc (unsigned int iMessage, uptr_t wParam, sptr_t lParam)

Public Attributes

int ctrlID
int errorStatus

Protected Types

enum  { autoScrollDelay = 200 }
enum  { selChar, selWord, selLine }
enum  { ddNone, ddInitial, ddDragging }
enum  { notPainting, painting, paintAbandoned }
enum  { eWrapNone, eWrapWord, eWrapChar }
enum  { wrapLineLarge = 0x7ffffff }

Protected Member Functions

bool AbandonPaint ()
void AddChar (char ch)
virtual void AddCharUTF (char *s, unsigned int len, bool treatAsDBCS=false)
void AddStyledText (char *buffer, int appendLength)
virtual void ButtonDown (Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt)
void ButtonMove (Point pt)
void ButtonUp (Point pt, unsigned int curTime, bool ctrl)
virtual void CancelModes ()
virtual bool CanPaste ()
void ChangeCaseOfSelection (bool makeUpperCase)
void ChangeSize ()
void CheckForChangeOutsidePaint (Range r)
void CheckModificationForWrap (DocModification mh)
virtual void ClaimSelection ()=0
SelectionPosition ClampPositionIntoDocument (SelectionPosition sp) const
void Clear ()
void ClearAll ()
void ClearDocumentStyle ()
void ClearSelection ()
int CodePage () const
virtual void Copy ()=0
virtual void CopyAllowLine ()
char * CopyRange (int start, int end)
void CopyRangeToClipboard (int start, int end)
void CopySelectionRange (SelectionText *ss, bool allowLineCopy=false)
void CopyText (int length, const char *text)
virtual void CopyToClipboard (const SelectionText &selectedText)=0
int CurrentPosition ()
void CursorUpOrDown (int direction, Selection::selTypes sel=Selection::noSel)
void Cut ()
virtual sptr_t DefWndProc (unsigned int iMessage, uptr_t wParam, sptr_t lParam)=0
void DelChar ()
void DelCharBack (bool allowLineStartDeletion)
virtual void DisplayCursor (Window::Cursor c)
int DisplayFromPosition (int pos)
virtual bool DragThreshold (Point ptStart, Point ptNow)
void DrawAnnotation (Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout *ll, int subLine)
void DrawBlockCaret (Surface *surface, ViewStyle &vsDraw, LineLayout *ll, int subLine, int xStart, int offset, int posCaret, PRectangle rcCaret, ColourAllocated caretColour)
void DrawCarets (Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout *ll, int subLine)
void DrawEOL (Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, int line, int lineEnd, int xStart, int subLine, int subLineStart, bool overrideBackground, ColourAllocated background, bool drawWrapMark, ColourAllocated wrapColour)
void DrawIndentGuide (Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight)
void DrawIndicators (Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under)
void DrawLine (Surface *surface, ViewStyle &vsDraw, int line, int lineVisible, int xStart, PRectangle rcLine, LineLayout *ll, int subLine)
void DrawWrapMarker (Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourAllocated wrapColour)
void DropAt (SelectionPosition position, const char *value, bool moving, bool rectangular)
void DropCaret ()
void DropGraphics ()
void Duplicate (bool forLine)
void DwellEnd (bool mouseMoved)
void EnsureCaretVisible (bool useMargin=true, bool vert=true, bool horiz=true)
void EnsureLineVisible (int lineDoc, bool enforcePolicy)
void Expand (int &line, bool doExpand)
void FilterSelections ()
virtual void Finalise ()
long FindText (uptr_t wParam, sptr_t lParam)
long FormatRange (bool draw, Sci_RangeToFormat *pfr)
virtual PRectangle GetClientRectangle ()
virtual int GetCtrlID ()
void GetHotSpotRange (int &hsStart, int &hsEnd)
PRectangle GetTextRectangle ()
int GetWhitespaceVisible ()
void GoToLine (int lineNo)
virtual bool HaveMouseCapture ()=0
void HorizontalScrollTo (int xPos)
bool Idle ()
void Indent (bool forwards)
virtual void Initialise ()=0
int InsertSpace (int position, unsigned int spaces)
void InvalidateCaret ()
void InvalidateRange (int start, int end)
void InvalidateSelection (SelectionRange newMain, bool invalidateWholeSelection=false)
void InvalidateStyleData ()
void InvalidateStyleRedraw ()
virtual int KeyCommand (unsigned int iMessage)
virtual int KeyDefault (int, int)
int KeyDown (int key, bool shift, bool ctrl, bool alt, bool *consumed=0)
void LayoutLine (int line, Surface *surface, ViewStyle &vstyle, LineLayout *ll, int width=LineLayout::wrapWidthInfinite)
int LineFromLocation (Point pt)
void LineSelection (int lineCurrent_, int lineAnchor_)
void LinesJoin ()
int LinesOnScreen ()
void LinesSplit (int pixelWidth)
int LinesToScroll ()
void LineTranspose ()
Point LocationFromPosition (SelectionPosition pos)
Point LocationFromPosition (int pos)
int MaxScrollPos ()
virtual bool ModifyScrollBars (int nMax, int nPage)=0
void MoveCaretInsideView (bool ensureVisible=true)
SelectionPosition MovePositionOutsideChar (SelectionPosition pos, int moveDir, bool checkLineEnd=true) const
int MovePositionOutsideChar (int pos, int moveDir, bool checkLineEnd=true) const
SelectionPosition MovePositionSoVisible (SelectionPosition pos, int moveDir)
SelectionPosition MovePositionSoVisible (int pos, int moveDir)
int MovePositionTo (int newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true)
int MovePositionTo (SelectionPosition newPos, Selection::selTypes sel=Selection::noSel, bool ensureVisible=true)
void NeedWrapping (int docLineStart=0, int docLineEnd=wrapLineLarge)
void NewLine ()
virtual void NotifyChange ()=0
void NotifyChar (int ch)
void NotifyDeleted (Document *document, void *userData)
virtual void NotifyDoubleClick (Point pt, bool shift, bool ctrl, bool alt)
void NotifyDwelling (Point pt, bool state)
virtual void NotifyFocus (bool focus)
void NotifyHotSpotClicked (int position, bool shift, bool ctrl, bool alt)
void NotifyHotSpotDoubleClicked (int position, bool shift, bool ctrl, bool alt)
void NotifyIndicatorClick (bool click, int position, bool shift, bool ctrl, bool alt)
void NotifyMacroRecord (unsigned int iMessage, uptr_t wParam, sptr_t lParam)
bool NotifyMarginClick (Point pt, bool shift, bool ctrl, bool alt)
void NotifyModified (Document *document, DocModification mh, void *userData)
void NotifyModifyAttempt (Document *document, void *userData)
void NotifyModifyAttempt ()
void NotifyNeedShown (int pos, int len)
void NotifyPainted ()
virtual void NotifyParent (SCNotification scn)=0
void NotifySavePoint (Document *document, void *userData, bool atSavePoint)
void NotifySavePoint (bool isSavePoint)
void NotifyStyleNeeded (Document *doc, void *userData, int endPos)
virtual void NotifyStyleToNeeded (int endStyleNeeded)
void NotifyUpdateUI ()
void NotifyZoom ()
void PageMove (int direction, Selection::selTypes sel=Selection::noSel, bool stuttered=false)
void Paint (Surface *surfaceWindow, PRectangle rcArea)
virtual bool PaintContains (PRectangle rc)
bool PaintContainsMargin ()
void PaintSelMargin (Surface *surface, PRectangle &rc)
void ParaUpOrDown (int direction, Selection::selTypes sel=Selection::noSel)
virtual void Paste ()=0
void PasteRectangular (SelectionPosition pos, const char *ptr, int len)
bool PointInSelection (Point pt)
bool PointInSelMargin (Point pt)
bool PointIsHotspot (Point pt)
Point PointMainCaret ()
int PositionFromLineX (int line, int x)
int PositionFromLocation (Point pt, bool canReturnInvalid=false, bool charPosition=false)
bool PositionInSelection (int pos)
bool PositionIsHotspot (int position)
bool RangeContainsProtected (int start, int end) const
virtual void ReconfigureScrollBars ()
PRectangle RectangleFromRange (int start, int end)
void Redo ()
void Redraw ()
void RedrawRect (PRectangle rc)
void RedrawSelMargin (int line=-1)
virtual void RefreshColourPalette (Palette &pal, bool want)
void RefreshPixMaps (Surface *surfaceWindow)
void RefreshStyleData ()
int ReplaceTarget (bool replacePatterns, const char *text, int length=-1)
LineLayoutRetrieveLineLayout (int lineNumber)
virtual void ScrollText (int linesToMove)
void ScrollTo (int line, bool moveThumb=true)
void SearchAnchor ()
long SearchInTarget (const char *text, int length)
long SearchText (unsigned int iMessage, uptr_t wParam, sptr_t lParam)
void SelectAll ()
ColourAllocated SelectionBackground (ViewStyle &vsDraw, bool main)
bool SelectionContainsProtected ()
bool SelectionEmpty ()
SelectionPosition SelectionEnd ()
SelectionPosition SelectionStart ()
void SetAnnotationHeights (int start, int end)
void SetAnnotationVisible (int visible)
void SetBraceHighlight (Position pos0, Position pos1, int matchStyle)
void SetDocPointer (Document *document)
void SetDragPosition (SelectionPosition newPos)
void SetEmptySelection (SelectionPosition currentPos_)
void SetEmptySelection (int currentPos_)
void SetFocusState (bool focusState)
virtual void SetHorizontalScrollPos ()=0
void SetHotSpotRange (Point *pt)
virtual bool SetIdle (bool)
void SetLastXChosen ()
virtual void SetMouseCapture (bool on)=0
void SetRectangularRange ()
void SetScrollBars ()
void SetSelection (SelectionPosition currentPos_)
void SetSelection (int currentPos_)
void SetSelection (int currentPos_, int anchor_)
void SetSelection (SelectionPosition currentPos_, SelectionPosition anchor_)
virtual void SetTicking (bool on)=0
void SetTopLine (int topLineNew)
virtual void SetVerticalScrollPos ()=0
void SetWhitespaceVisible (int view)
void ShowCaretAtCurrentPosition ()
SelectionPosition SPositionFromLineX (int lineDoc, int x)
SelectionPosition SPositionFromLocation (Point pt, bool canReturnInvalid=false, bool charPosition=false, bool virtualSpace=true)
virtual void StartDrag ()
int StartEndDisplayLine (int pos, bool start)
sptr_t StyleGetMessage (unsigned int iMessage, uptr_t wParam, sptr_t lParam)
void StyleSetMessage (unsigned int iMessage, uptr_t wParam, sptr_t lParam)
int SubstituteMarkerIfEmpty (int markerCheck, int markerDefault)
ColourAllocated TextBackground (ViewStyle &vsDraw, bool overrideBackground, ColourAllocated background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll)
int TextWidth (int style, const char *text)
void ThinRectangularRange ()
void Tick ()
void ToggleContraction (int line)
void Undo ()
virtual void UpdateSystemCaret ()
bool UserVirtualSpace () const
virtual bool ValidCodePage (int) const
int WrapCount (int line)
bool WrapLines (bool fullWrap, int priorityWrapLineStart)
bool WrapOneLine (Surface *surface, int lineToWrap)
int XFromPosition (SelectionPosition sp)
int XFromPosition (int pos)

Static Protected Member Functions

static const char * StringFromEOLMode (int eolMode)
static sptr_t StringResult (sptr_t lParam, const char *val)

Protected Attributes

bool additionalCaretsBlink
bool additionalCaretsVisible
bool additionalSelectionTyping
Timer autoScrollTimer
Position braces [2]
int bracesMatchStyle
bool bufferedDraw
Caret caret
bool caretSticky
int caretXPolicy
int caretXSlop
 Ensure this many pixels visible on both sides of caret.
int caretYPolicy
int caretYSlop
 Ensure this many lines visible on both sides of caret.
int controlCharSymbol
bool convertPastes
ContractionState cs
int cursorMode
SelectionText drag
bool dropWentOutside
int dwellDelay
bool dwelling
bool endAtLastLine
int foldFlags
bool hasFocus
bool hideSelection
int highlightGuideColumn
bool horizontalScrollBarVisible
int hsEnd
int hsStart
Idler idler
enum Editor:: { ... }  inDragDrop
bool inOverstrike
KeyMap kmap
Point lastClick
unsigned int lastClickTime
int lastXChosen
int lengthForEncode
int lineAnchor
int lineWidthMaxSeen
LineLayoutCache llc
int modEventMask
bool mouseDownCaptures
bool multipleSelection
bool needUpdateUI
int originalAnchorPos
bool paintingAllText
enum Editor:: { ... }  paintState
Palette palette
Documentpdoc
SurfacepixmapIndentGuide
SurfacepixmapIndentGuideHighlight
SurfacepixmapLine
SurfacepixmapSelMargin
SurfacepixmapSelPattern
PositionCache posCache
SelectionPosition posDrag
SelectionPosition posDrop
int posTopLine
bool primarySelection
int printColourMode
int printMagnification
int printWrapState
Point ptMouseLast
PRectangle rcPaint
bool recordingMacro
int scrollWidth
int searchAnchor
int searchFlags
Selection sel
enum Editor:: { ... }  selectionType
bool stylesValid
int targetEnd
int targetStart
int theEdge
int ticksToDwell
Timer timer
int topLine
bool trackLineWidth
bool twoPhaseDraw
bool verticalScrollBarVisible
int virtualSpaceOptions
int visiblePolicy
int visibleSlop
ViewStyle vs
Window wMain
 The Scintilla parent window.
int wrapAddIndent
int wrapEnd
int wrapIndentMode
int wrapStart
enum Editor:: { ... }  wrapState
int wrapVisualFlags
int wrapVisualFlagsLocation
int wrapVisualStartIndent
int wrapWidth
int xCaretMargin
 Ensure this many pixels visible on both sides of caret.
int xOffset
 Horizontal scrolled amount in pixels.

Private Member Functions

 Editor (const Editor &)
Editoroperator= (const Editor &)

Friends

class AutoSurface
class SelectionLineIterator

Detailed Description

Definition at line 104 of file Editor.h.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index