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 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 &) |
Private Member Functions | |
---|---|
TInt | ActiveMarginWidth() |
void | DrawDottedRectangle(CGraphicsContext &, const TRect &) |
TBool | DrawLeftAndRight() |
TBool | DrawTopAndBottom() |
TInt | VisibleBlobWidth() |
Public Member Enumerations | |
---|---|
enum | TEdges { ENoEdges = 0x00, EEdgeLeft = 0x01, EEdgeRight = 0x02, EEdgeTop = 0x04, EEdgeBottom = 0x08 } |
enum | TFrameOverlayFlags { EFrameOverlayFlagBlobsInternal = 0x01, EFrameOverlayFlagShowBorder = 0x02, EFrameOverlayFlagTopBlobsDimmed = 0x04, EFrameOverlayFlagBottomBlobsDimmed = 0x08, EFrameOverlayFlagLeftBlobsDimmed = 0x10, EFrameOverlayFlagRightBlobsDimmed = 0x20 } |
Private Attributes | |
---|---|
TInt | iActiveBlobWidth |
TInt | iFlags |
TRect | iRect |
TInt | iVisibleBlobWidth |
void | DrawDottedRectangle | ( | CGraphicsContext & | aGc, |
const TRect & | aRect | |||
) | const [private] |
CGraphicsContext & aGc | |
const TRect & aRect |
IMPORT_C void | SetActiveBlobWidthInPixels | ( | const TInt | aWidth | ) |
const TInt aWidth |
IMPORT_C void | SetBlobWidthInPixels | ( | const TInt | aWidth | ) |
const TInt aWidth |
IMPORT_C void | SetVisibleBlobWidthInPixels | ( | const TInt | aWidth | ) |
const TInt aWidth |
IMPORT_C void | XorDraw | ( | CGraphicsContext & | aGc | ) | const |
CGraphicsContext & aGc |
IMPORT_C TInt | XyPosToEdges | ( | const TPoint & | aPos | ) | const |
const TPoint & aPos |
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 = 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.
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. |