SECEditViewport Class

class SECEditViewport: public MvcViewport

SECEditViewport is the view for Objective Edit.

The SECEditViewport class is a derivative of the MVC architecture that depends upon a model and has a controller. A viewport is conceptually similar to a CView class. It's most important difference is it isn't a window (or CWnd derivative). A CWnd class aggregates a viewport and delegates the rendering to the viewport class.

The SECEditCtrl and SECEditView classes aggregate the CWnd and CView classes through the SECEditCtrlWrapper_T and SECEditViewWrapper_T template classes, respectively.

Defined in: SECEditViewport.h

See Also

SECEditCtrl  SECEditCtrlWrapper_T  SECEditView  SECEditViewWrapper_T

Class Members

Construction/Destruction

 SECEditViewport()

SECEditViewport Constructor

virtual  ~SECEditViewport()

SECEditViewport Destructor

MvcViewport Overrides

virtual CPoint  OffsetLogOrigin(int xOff, int yOff)

Offsets the logical origin of this viewport

virtual CRect  Pan(int xOff, int yOff)

Pans the logical origin of this viewport

virtual CSize  GetVirtualSize() const

Gets the logical size of this viewport

virtual CPoint  SetLogOrigin(int x, int y)

Sets the logical origin of this viewport

inline CPoint  SetLogOrigin(const CPoint& ptLog)

Sets the logical origin of this viewport

virtual void  LPtoDP(LPPOINT lpPoints, int nCount = 1) const

Converts from Logical Points to Device Points

virtual void  LPtoDP(LPRECT lpRect) const

Converts from Logical Points to Device Points

virtual void  LPtoDP(LPSIZE lpSize) const

Converts from Logical Points to Device Points

virtual void  DPtoLP(LPPOINT lpPoints, int nCount = 1) const

Converts from Device Points to Logical Points

virtual void  DPtoLP(LPRECT lpRect) const

Converts from Device Points to Logical Points

virtual void  DPtoLP(LPSIZE lpSize) const

Converts from Device Points to Logical Points

virtual void  OnUpdate(sfl::IMvcSubject* pSubject, sfl::IMvcMessage* pMsg)

Handle notifications of change on the subject (SECEdit) this viewport is observing

virtual void  Draw(CDC* pDC)

Renders the data for this viewport

Attributes

virtual SECEditFontInfo*  GetFontInfo() const

Gets the Font and Coloring information for this viewport to use

virtual SECEdit*  GetEditModel() const

Returns a pointer to the SECEdit Model that this viewport observes

virtual SECEditController*  GetSECEditController() const

Returns a pointer to the SECEditController for this viewport

virtual ISECEditLangConfig*  GetLangPtr() const

Gets the Syntax and Language Settings this viewport is using

Operations

void  InvalidateLines(int nStartLine, int nEndLine = -1)

Invalidates a range of lines

Protected methods

virtual void  RenderGutter(CDC* pDC, const CRect& rcGutter) const

Fills the gutter background area

virtual void  DrawGutter(CRect rcInvalid) const

Draws the gutter area and any gutter marks

virtual void  DrawBreakpoint(int nLine, CDC* pDC, CRect rcMark) const

Draws a Breakpoint in the gutter

virtual void  DrawBookmark(int nLine, CDC* pDC, CRect rcMark) const

Draws a Bookmark in the gutter

virtual void  PreDrawMarks(int nLine, CDC* pDC, CRect rcMark) const

Called before any items are drawn in the gutter

virtual void  DrawMarks(int nLine, CDC* pDC, const CRect& rcMark) const

Called to draw the items in the gutter

virtual void DrawIndex(int nLine, CDC* pDC, const CRect& rcIndex) const

Called to draw the ittems in the Index section of gutter

virtual void  PostDrawMarks(int nLine, CDC* pDC, CRect rcMark) const

Called after the items have been drawn in the gutter

virtual CSize  DrawBlock(CDC* pDC, int nTabStops, int nLeftEdge, int nY, int nLeftEdgeOffset, LPCTSTR lpszText, int nLength, int nCol, int nLineNo, SECEditColorInfo* pFontInfo, BOOL bShowWhitespace = FALSE, BOOL bInSelection = FALSE, int nSelStartCol = 0, int nSelEndCol = 0) const

Prepares the viewport to render an individual block of text

virtual CSize  RenderBlockText(CDC* pDC, int nTabStops, int nLeftEdge, int nY, int nLeftEdgeOffset, LPCTSTR lpszText, int nLength, int nCol, int nLineNo, SECEditColorInfo* pFontInfo, BOOL bInSelection) const

Renders a block of text to the viewport. Override to customize the text rendering

virtual void  FillBackgroundRect(CDC* pDC, const CRect& rcBack, COLORREF clrBack) const

Draws the background space between the last line and the bottom of the window

virtual void  DrawColumnSelectInProgress(CDC* pDC) const

Draws the Column Selection when in progress

virtual ISECEditPresentationState*  GetPS() const

Gets the Presentation State for this viewport

virtual BOOL  CreateController()

Creates the controller for this viewport