TFrameOverlay Class Reference

class TFrameOverlay

A rectangular frame surrounding a picture with eight smaller, square areas (referred to as blobs) for moving and resizing the picture. A blob is located on each corner and at the centre of each side.

Each blob has a visible width and an active width. The active width allows easier manipulation of picture frames because the blobs may be small and difficult to manipulate with a pen. The active width should be set to be at least as large as the visible width.

A picture frame also has a set of flags which are used when drawing the frame. These control the frame border visibility, whether blobs should be drawn inside or outside the frame and whether the blobs should be filled using a solid brush style or using a NULL brush style, causing them to appear dimmed. For more information on brush styles. see CGraphicsContext::TBrushStyle.

Public Member Functions
TFrameOverlay()
IMPORT_C voidClearFlags(TInt)
TInt Flags()
TRect Rect()
const TRect &RefRect()
IMPORT_C voidSetActiveBlobWidthInPixels(const TInt)
IMPORT_C voidSetBlobWidthInPixels(const TInt)
IMPORT_C voidSetFlags(TInt)
IMPORT_C voidSetRect(const TRect &)
IMPORT_C voidSetVisibleBlobWidthInPixels(const TInt)
IMPORT_C voidXorDraw(CGraphicsContext &)
IMPORT_C TIntXyPosToEdges(const TPoint &)
Private Member Functions
TInt ActiveMarginWidth()
voidDrawDottedRectangle(CGraphicsContext &, const TRect &)
TBool DrawLeftAndRight()
TBool DrawTopAndBottom()
TInt VisibleBlobWidth()
Public Member Enumerations
enumTEdges { ENoEdges = 0x00, EEdgeLeft = 0x01, EEdgeRight = 0x02, EEdgeTop = 0x04, EEdgeBottom = 0x08 }
enumTFrameOverlayFlags {
EFrameOverlayFlagBlobsInternal = 0x01, EFrameOverlayFlagShowBorder = 0x02, EFrameOverlayFlagTopBlobsDimmed = 0x04, EFrameOverlayFlagBottomBlobsDimmed = 0x08, EFrameOverlayFlagLeftBlobsDimmed = 0x10, EFrameOverlayFlagRightBlobsDimmed = 0x20
}
Private Attributes
TInt iActiveBlobWidth
TInt iFlags
TRect iRect
TInt iVisibleBlobWidth

Constructor & Destructor Documentation

TFrameOverlay()

IMPORT_CTFrameOverlay()

Member Functions Documentation

ActiveMarginWidth()

TInt ActiveMarginWidth()const [private]

ClearFlags(TInt)

IMPORT_C voidClearFlags(TIntaFlag)

Parameters

TInt aFlag

DrawDottedRectangle(CGraphicsContext &, const TRect &)

voidDrawDottedRectangle(CGraphicsContext &aGc,
const TRect &aRect
)const [private]

Parameters

CGraphicsContext & aGc
const TRect & aRect

DrawLeftAndRight()

TBool DrawLeftAndRight()const [private]

DrawTopAndBottom()

TBool DrawTopAndBottom()const [private]

Flags()

TInt Flags()const [inline]

Rect()

TRect Rect()const [inline]

RefRect()

const TRect &RefRect()const [inline]

SetActiveBlobWidthInPixels(const TInt)

IMPORT_C voidSetActiveBlobWidthInPixels(const TIntaWidth)

Parameters

const TInt aWidth

SetBlobWidthInPixels(const TInt)

IMPORT_C voidSetBlobWidthInPixels(const TIntaWidth)

Parameters

const TInt aWidth

SetFlags(TInt)

IMPORT_C voidSetFlags(TIntaFlag)

Parameters

TInt aFlag

SetRect(const TRect &)

IMPORT_C voidSetRect(const TRect &aRect)

Parameters

const TRect & aRect

SetVisibleBlobWidthInPixels(const TInt)

IMPORT_C voidSetVisibleBlobWidthInPixels(const TIntaWidth)

Parameters

const TInt aWidth

VisibleBlobWidth()

TInt VisibleBlobWidth()const [private]

XorDraw(CGraphicsContext &)

IMPORT_C voidXorDraw(CGraphicsContext &aGc)const

Parameters

CGraphicsContext & aGc

XyPosToEdges(const TPoint &)

IMPORT_C TIntXyPosToEdges(const TPoint &aPos)const

Parameters

const TPoint & aPos

Member Enumerations Documentation

Enum TEdges

This enumeration is used by CTextView::SetXyPosL() and by TFrameOverlay::XyPosToEdges() to identify which active region of the picture frame a pixel position is in.

Enumerators

ENoEdges = 0x00

Not in an active region.

EEdgeLeft = 0x01

In active region around left edge.

EEdgeRight = 0x02

In active region around right edge.

EEdgeTop = 0x04

In active region around top edge.

EEdgeBottom = 0x08

In active region around bottom edge.

Enum TFrameOverlayFlags

Frame appearance flags.

Enumerators

EFrameOverlayFlagBlobsInternal = 0x01

Controls whether blobs are drawn inside or outside the frame border.

EFrameOverlayFlagShowBorder = 0x02

Controls whether the frame border is drawn or not.

EFrameOverlayFlagTopBlobsDimmed = 0x04

Controls whether the three blobs at the top of the frame are drawn dimmed.

EFrameOverlayFlagBottomBlobsDimmed = 0x08

Controls whether the three blobs at the bottom of the frame are drawn dimmed.

EFrameOverlayFlagLeftBlobsDimmed = 0x10

Controls whether the three blobs on the left hand side of the frame are drawn dimmed.

EFrameOverlayFlagRightBlobsDimmed = 0x20

Controls whether the three blobs on the right hand side of the frame are drawn dimmed.

Member Data Documentation

TInt iActiveBlobWidth

TInt iActiveBlobWidth[private]

TInt iFlags

TInt iFlags[private]

TRect iRect

TRect iRect[private]

TInt iVisibleBlobWidth

TInt iVisibleBlobWidth[private]