Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: frmframe.h
Link against: form.lib

Class TFrameOverlay

TFrameOverlay

Support

Supported from 5.0

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.

Defined in TFrameOverlay:
ClearFlags(), EEdgeBottom, EEdgeLeft, EEdgeRight, EEdgeTop, EFrameOverlayFlagBlobsInternal, EFrameOverlayFlagBottomBlobsDimmed, EFrameOverlayFlagLeftBlobsDimmed, EFrameOverlayFlagRightBlobsDimmed, EFrameOverlayFlagShowBorder, EFrameOverlayFlagTopBlobsDimmed, ENoEdges, SetActiveBlobWidthInPixels(), SetBlobWidthInPixels(), SetFlags(), SetRect(), SetVisibleBlobWidthInPixels(), TEdges, TFrameOverlay(), TFrameOverlayFlags, XorDraw(), XyPosToEdges()


Construction


TFrameOverlay()

TFrameOverlay();

Description

Trivial default C++ constructor.

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

[Top]


Blob width


SetBlobWidthInPixels()

void SetBlobWidthInPixels(const TInt aWidth);

Description

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

Parameters

const TInt aWidth

The visible and active blob width in pixels.


SetVisibleBlobWidthInPixels()

void SetVisibleBlobWidthInPixels(const TInt aWidth);

Description

Sets the visible blob width in pixels.

Parameters

const TInt aWidth

The visible blob width in pixels.


SetActiveBlobWidthInPixels()

void SetActiveBlobWidthInPixels(const TInt aWidth);

Description

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

Parameters

const TInt aWidth

The active blob width in pixels.

[Top]


Drawing flags


SetFlags()

void SetFlags(TInt aFlag);

Description

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

TInt aFlag

Flags to add to the existing settings.


ClearFlags()

void ClearFlags(TInt aFlag);

Description

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

Parameters

TInt aFlag

Flags to clear from the existing flag settings.

[Top]


Picture frame rectangle


SetRect()

void SetRect(const TRect& aRect);

Description

Sets the picture frame rectangle.

Parameters

const TRect& aRect

The picture frame rectangle.

[Top]


Draw


XorDraw()

void XorDraw(CGraphicsContext& aGc) const;

Description

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

CGraphicsContext& aGc

The graphics context to draw to.

[Top]


Active area


XyPosToEdges()

TInt XyPosToEdges(const TPoint& aPos) const;

Description

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

const TPoint& aPos

A pixel position.

Return value

TInt

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.

[Top]


Enumerations


Enum TEdges

TEdges

Description

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.

ENoEdges

Not in an active region.

EEdgeLeft

In active region around left edge.

EEdgeRight

In active region around right edge.

EEdgeTop

In active region around top edge.

EEdgeBottom

In active region around bottom edge.


Enum TFrameOverlayFlags

TFrameOverlayFlags

Description

Frame appearance flags.

EFrameOverlayFlagBlobsInternal

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

EFrameOverlayFlagShowBorder

Controls whether the frame border is drawn or not.

EFrameOverlayFlagTopBlobsDimmed

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

EFrameOverlayFlagBottomBlobsDimmed

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

EFrameOverlayFlagLeftBlobsDimmed

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

EFrameOverlayFlagRightBlobsDimmed

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