SECEditSelection Class

class SECEditSelection: public SECEditLineColPair

This class is used to represent a section of selected text. The text selection is maintained as starting and ending line/column positions within the text.

Defined in: SECEditSelection.h

Class Members

Construction / initialization

EDIT_API SECEditSelection()

Constructor.

EDIT_API void InitSel(int nLine, int nCol, SECEditSelectionType type = secST_StreamSelect)

Initializes the selection.

EDIT_API void InitSel(SECEditLineCol lc, SECEditSelectionType type = secST_StreamSelect)

Initializes the selection.

Operations

EDIT_API void ClearSel()

Clears the selection positions.

EDIT_API BOOL ExtendSel(int nLine, int nCol, int* pStartLine = NULL, int* pEndLine = NULL)

Extends the selection to the given position.

EDIT_API BOOL ExtendSel(SECEditLineCol lc, int* pStartLine = NULL, int* pEndLine = NULL)

Extends the selection to the given position.

EDIT_API void GetAnchor(int& nAnchorLine, int& nAnchorCol) const

Returns the anchor position of the selection.

EDIT_API SECEditLineCol GetAnchor() const

Returns the anchor position of the selection.

EDIT_API SECEditLineColPair GetSelection() const

Returns the positions of the selection.

EDIT_API SECEditSelectionType GetSelectionType() const

Returns the selection type.

EDIT_API void GetSelEnd(int& nEndLine, int& nEndCol) const

Retrieves the ending position of the selection.

EDIT_API SECEditLineCol GetSelEnd() const

Retrieves the ending position of the selection.

EDIT_API void GetSelStart(int& nStartLine, int& nStartCol) const

Returns the starting position of the selection.

EDIT_API SECEditLineCol GetSelStart() const

Returns the starting position of the selection.

EDIT_API void GetTail(int& nTailLine, int& nTailCol) const

Returns the tail position of the selection.

EDIT_API SECEditLineCol GetTail() const

Returns the tail position of the selection.

EDIT_API BOOL IsTextSelected() const

Queries the selection state.

EDIT_API void SetSelection(SECEditLineCol lcSelStart, SECEditLineCol lcSelEnd, SECEditSelectionType type = secST_StreamSelect)

Sets the selection positions.

EDIT_API void SetSelection(int nStartLine, int nStartCol, int nEndLine, int nEndCol, SECEditSelectionType type = secST_StreamSelect)

Sets the selection positions.

EDIT_API void SetSelectionType(SECEditSelectionType type)

Sets the selection type.

Public data members

SECEditSelectionType m_SelectionType

The selection type.