ISECEditPresentationState Class

class ISECEditPresentationState

ISECEditPresentationState is an interface implemented by the controller class SECEditController for getting and setting attributes of the presentation state. The presentation state is comprised of the following attributes: the current selection state, the caret position, the find/replace state and the gutter width.

Defined in: ISECEditPresentationState.h

Class Members

Selection state

virtual BOOL GetColumnSelect() const

Queries whether the current selection, if any, is a column selection.

virtual BOOL GetSelection(SECEditLineColPair& lcpSel, BOOL bAllowVWS = FALSE) const

Retrieves the coordinates for the current selection.

virtual BOOL GetSelection(int& nStartLine, int& nStartCol, int& nEndLine, int& nEndCol, BOOL bAllowVWS = FALSE) const

Retrieves the coordinates for the current selection.

virtual SECEditSelectionType GetSelectionType() const

Returns the current selection type.

virtual BOOL IsSelecting() const

Queries whether text is currently selected.

virtual BOOL GetColumnSelectInProgress(CRect& rcSelect) const

Gets the rectangle in logical coordinates of a column select in progress

virtual BOOL GetShowSelAlways() const

Gets if a selection should be shown always or only if the window has focus

virtual BOOL GetSelectColumns(int nLine, int& nStartCol, int &nEndCol) const

Retrieves the starting and ending columns of the current column selection for the given line.

Find/replace state

virtual _SEC_FIND_REPLACE_STATE* GetFindReplaceState() const

Retrieves the global find/replace state information.

Gutter placement

virtual int GetGutterWidth() const

Retrieves the width of the gutter in logical units.

Caret position

virtual SECEditLineCol PointToLineCol(CPoint& pt, CDC* pDC, BOOL bPreceedTab = TRUE) const

Converts a logical point to line and column indices.

virtual SECEditLineCol PointToLineCol(CPoint& pt, BOOL bPreceedTab = TRUE) const

Converts a logical point to line and column indices.

virtual CPoint LineColToPoint(SECEditLineCol& lc, CDC* pDC) const

Converts line and column indices to a logical point.

virtual CPoint LineColToPoint(SECEditLineCol& lc) const

Converts line and column indices to a logical point.

Update

virtual void OnUpdate(sfl::ISubject* pSubject, sfl::IMessage* pMsg)

Handle notifications of change that may affect the presentation state