Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: FRMFRAME.H
Link against: form.lib

Class TFrameOverlay

class TFrameOverlay;

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.

Members

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


Construction and destruction


TFrameOverlay()

IMPORT_C TFrameOverlay();

Description

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

[Top]


Member functions


SetBlobWidthInPixels()

IMPORT_C 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()

IMPORT_C void SetVisibleBlobWidthInPixels(const TInt aWidth);

Description

Sets the visible blob width in pixels.

Parameters

const TInt aWidth

The visible blob width in pixels.


SetActiveBlobWidthInPixels()

IMPORT_C 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.


SetFlags()

IMPORT_C 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()

IMPORT_C 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.


SetRect()

IMPORT_C void SetRect(const TRect &aRect);

Description

Sets the picture frame rectangle.

Parameters

const TRect &aRect

The picture frame rectangle.


XorDraw()

IMPORT_C 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.


XyPosToEdges()

IMPORT_C 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.


Rect()

inline TRect Rect() const;

Description

Return value

TRect


RefRect()

inline const TRect &RefRect() const;

Description

Return value

const TRect &


Flags()

inline TInt Flags() const;

Description

Return value

TInt

[Top]


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