// FRMTVIEW.INL
//
// Copyright (c) 1997-1999 Symbian Ltd. All rights reserved.
//

inline TBool RScreenDisplay::IsLineCursor() const
	//
	//Returns ETrue if the line cursor margine has positive width
	//
	{
	
	return iDrawTextLayoutContext->IsGutterMargin();
	}

inline TRect RScreenDisplay::LineCursorMargin() const
	//
	{
	return iDrawTextLayoutContext->GutterMargin();

	}

inline TPoint RScreenDisplay::TopLeftTextArea() const
	//
	//Return the position in the window of the top left corner text display
	//
	{

	return iDrawTextLayoutContext->TopLeftTextArea();
	}

inline TCursor::TCursor(TCursorPosition& aCursorPos,RScreenDisplay& aDisplay)
	//
	:iDisplay(aDisplay), iCursorPos(aCursorPos),iDefaultTextCursor(ETrue)
	,iBasedOnCharBefore(ETrue),iFlashingCursorCurrentlyVisible(EFalse)
	,iSteadyCursorCurrentlyVisible(EFalse)
	,iCursorWidth(EFTextCursorWidth),iCursorType(TTextCursor::ETypeRectangle)
	{}

inline TUint TCursor::LineCursorVisibility()
	//
	{

	return iLineCursor;
	}

inline TUint TCursor::TextCursorVisibility()
	//
	{

	return iTextCursor;
	}


//CTextView

inline TBool CTextView::IsFormatting() const
	//
	//Return ETrue if there is background formatting going on
	//
	{

	return iLayout->IsBackgroundFormatting();
	}

inline TInt CTextView::TopViewRect() const
	//
	//Returns the y of the top of the ViewRect
	//
	{

	return iDrawTextLayoutContext.iViewRect.iTl.iY;
	}

inline void CTextView::DrawWithPreviousHighlight()
	//
	//So that (re)drawing will take place with the previous highlight
	//
	{

	iCursorPos.SetToPreviousHighlight();
	}

inline void CTextView::DrawWithCurrentHighlight()
	//
	//So that (re)drawing will take place with the current highlight
	//
	{

	iCursorPos.SetToCurrentHighlight();
	}


