#include <frmframe.h>
Link against: form.lib
class TFrameOverlay |
Public Member Enumerations | |
---|---|
enum | TEdges { ENoEdges, EEdgeLeft, EEdgeRight, EEdgeTop, EEdgeBottom } |
enum | TFrameOverlayFlags { EFrameOverlayFlagBlobsInternal, EFrameOverlayFlagShowBorder, EFrameOverlayFlagTopBlobsDimmed, EFrameOverlayFlagBottomBlobsDimmed, ..., EFrameOverlayFlagRightBlobsDimmed } |
Public Member Functions | |
---|---|
TFrameOverlay() | |
IMPORT_C void | ClearFlags(TInt) |
TInt | Flags() |
TRect | Rect() |
const TRect & | RefRect() |
IMPORT_C void | SetActiveBlobWidthInPixels(const TInt) |
IMPORT_C void | SetBlobWidthInPixels(const TInt) |
IMPORT_C void | SetFlags(TInt) |
IMPORT_C void | SetRect(const TRect &) |
IMPORT_C void | SetVisibleBlobWidthInPixels(const TInt) |
IMPORT_C void | XorDraw(CGraphicsContext &) |
IMPORT_C TInt | XyPosToEdges(const TPoint &) |
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.
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.
Enumerator | Value | Description |
---|---|---|
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. |
Frame appearance flags.
Enumerator | Value | Description |
---|---|---|
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. |
IMPORT_C | TFrameOverlay | ( | ) |
This constructs a TFrameOverlay, clearing all flags and initializing both blob widths to zero.
IMPORT_C void | ClearFlags | ( | TInt | aFlag | ) |
Clears the flags specified from the frame's flag settings. For a description of the available flags, see the TFrameOverlayFlags enum.
Parameters | |
---|---|
aFlag | Flags to clear from the existing flag settings. |
TInt | Flags | ( | ) | const [inline] |
const TRect & | RefRect | ( | ) | const [inline] |
IMPORT_C void | SetActiveBlobWidthInPixels | ( | const TInt | aWidth | ) |
Sets the active blob width in pixels. The active blob width should normally be at least as large as the visible blob width.
Parameters | |
---|---|
aWidth | The active blob width in pixels. |
IMPORT_C void | SetBlobWidthInPixels | ( | const TInt | aWidth | ) |
Sets the visible and active blob widths to the same value in pixels.
Parameters | |
---|---|
aWidth | The visible and active blob width in pixels. |
IMPORT_C void | SetFlags | ( | TInt | aFlag | ) |
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 | |
---|---|
aFlag | Flags to add to the existing settings. |
IMPORT_C void | SetRect | ( | const TRect & | aRect | ) |
Sets the picture frame rectangle.
Parameters | |
---|---|
aRect | The picture frame rectangle. |
IMPORT_C void | SetVisibleBlobWidthInPixels | ( | const TInt | aWidth | ) |
Sets the visible blob width in pixels.
Parameters | |
---|---|
aWidth | The visible blob width in pixels. |
IMPORT_C void | XorDraw | ( | 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 | |
---|---|
aGc | The graphics context to draw to. |
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 | |
---|---|
aPos | A pixel position. |