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

 SECEditSelection()

Constructor.

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

Initializes the selection.

void  InitSel(SECEditLineCol lc, SECEditSelectionType type = secST_StreamSelect)

Initializes the selection.

Operations

void  ClearSel()

Clears the selection positions.

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

Extends the selection to the given position.

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

Extends the selection to the given position.

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

Returns the anchor position of the selection.

SECEditLineCol  GetAnchor() const

Returns the anchor position of the selection.

SECEditLineColPair  GetSelection() const

Returns the positions of the selection.

SECEditSelectionType  GetSelectionType() const

Returns the selection type.

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

Retrieves the ending position of the selection.

SECEditLineCol  GetSelEnd() const

Retrieves the ending position of the selection.

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

Returns the starting position of the selection.

SECEditLineCol  GetSelStart() const

Returns the starting position of the selection.

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

Returns the tail position of the selection.

SECEditLineCol  GetTail() const

Returns the tail position of the selection.

BOOL  IsTextSelected() const

Queries the selection state.

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

Sets the selection positions.

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

Sets the selection positions.

void  SetSelectionType(SECEditSelectionType type)

Sets the selection type.

Public data members

SECEditSelectionType  m_SelectionType

The selection type.