TFrameOverlay Class Reference

#include <frmframe.h>

Link against: form.lib

class TFrameOverlay

Detailed Description

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.

Member Enumeration 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.

EnumeratorValueDescription
ENoEdges0x00

Not in an active region.

EEdgeLeft0x01

In active region around left edge.

EEdgeRight0x02

In active region around right edge.

EEdgeTop0x04

In active region around top edge.

EEdgeBottom0x08

In active region around bottom edge.

Enum TFrameOverlayFlags

Frame appearance flags.

EnumeratorValueDescription
EFrameOverlayFlagBlobsInternal0x01

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

EFrameOverlayFlagShowBorder0x02

Controls whether the frame border is drawn or not.

EFrameOverlayFlagTopBlobsDimmed0x04

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

EFrameOverlayFlagBottomBlobsDimmed0x08

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

EFrameOverlayFlagLeftBlobsDimmed0x10

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

EFrameOverlayFlagRightBlobsDimmed0x20

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

Constructor & Destructor Documentation

TFrameOverlay ( )

IMPORT_CTFrameOverlay()

This constructs a TFrameOverlay, clearing all flags and initializing both blob widths to zero.

Member Function Documentation

ClearFlags ( TInt )

IMPORT_C voidClearFlags(TIntaFlag)

Clears the flags specified from the frame's flag settings. For a description of the available flags, see the TFrameOverlayFlags enum.

Parameters
aFlagFlags to clear from the existing flag settings.

Flags ( )

TInt Flags()const [inline]

Rect ( )

TRect Rect()const [inline]

Deprecated

Deprecated

RefRect ( )

const TRect &RefRect()const [inline]

SetActiveBlobWidthInPixels ( const TInt )

IMPORT_C voidSetActiveBlobWidthInPixels(const TIntaWidth)

Sets the active blob width in pixels. The active blob width should normally be at least as large as the visible blob width.

Parameters
aWidthThe active blob width in pixels.

SetBlobWidthInPixels ( const TInt )

IMPORT_C voidSetBlobWidthInPixels(const TIntaWidth)

Sets the visible and active blob widths to the same value in pixels.

Parameters
aWidthThe visible and active blob width in pixels.

SetFlags ( TInt )

IMPORT_C voidSetFlags(TIntaFlag)

Sets the flags which control how the frame is drawn. Adds the flags specified to the existing flag settings, which are preserved. For a description of the available flags, see the TFrameOverlayFlags enum.

Parameters
aFlagFlags to add to the existing settings.

SetRect ( const TRect & )

IMPORT_C voidSetRect(const TRect &aRect)

Sets the picture frame rectangle.

Parameters
aRectThe picture frame rectangle.

SetVisibleBlobWidthInPixels ( const TInt )

IMPORT_C voidSetVisibleBlobWidthInPixels(const TIntaWidth)

Sets the visible blob width in pixels.

Parameters
aWidthThe visible blob width in pixels.

XorDraw ( CGraphicsContext & )

IMPORT_C voidXorDraw(CGraphicsContext &aGc)const

Draws the picture frame and blobs to a graphics context using the frame's flag settings. If drawn, the frame is represented by a dotted line. The operation uses a draw mode of CGraphicsContext::EDrawModeNOTSCREEN so that the colour of each pixel which is drawn over is inverted. The frame's coordinates are set using SetRect().

Parameters
aGcThe graphics context to draw to.

XyPosToEdges ( const TPoint & )

IMPORT_C TIntXyPosToEdges(const TPoint &aPos)const

Gets the active region in which a pixel position is located.

Note: Adjacent active regions overlap at the corners of the picture frame, so that a pixel position may be located within more than one active region.

Parameters
aPosA pixel position.
Return Value
The active area(s) within which the position specified is located. Zero if not located within any active area. For details, see the TEdges enumeration, described below.