[Classes] [Prev] [Next] [Methods]

CAttachmentFrame

Methods Index

Heritage
Description
Usage
Enums
Attachment Points
Public Data Members
Friends
Protected Data Members
Public Methods
Contructor and Destructor Methods
Registration Methods
CDragSink Overridden Methods
CDragSink Methods Overridden for Drag and Drop Support
CSubview Overridden Methods
Protected Methods

CAttachmentFrame


Heritage

Superclass: CDragSink, CSubview

Subclasses: None

Helper Class: CAttachment


Description

CAttachmentFrame is a special type of Subview which can have CAttachments attached to it.


Usage

CAttachmentFrame works with CAttachment serving as a special enclosure of views as they are attached to different areas of a window or enclosure.

When you construct an attachment frame, you specify the sides to which views can be attached. Since CAttachment is also a type of CDragSink, it automatically supports drag-and-drop as a means of attaching views to different locations.

CAttachmentFrame manages two separate types of regions. The first consists of attachment regions located on the sides of the attachment frame. These regions grow and shrink as objects are attached or removed from the CAttachmentFrame.

The second managed region consists of the client area - the center portion of the attachment which can also grow or shrink as its surrounding attachment regions change size. The client area of the attachment frame is represented by a special CSubview object. CAttachmentFrame creates a CSubview to represent the client region, but you can also create your own client subview object and registered with the attachment frame through a call to SetClientSubview().

CAttachmentFrame has a one-to-many association with CAttachment. The association is managed. Upon destruction, CAttachmentFrame destroys any attached CAttachments.


Enums

Attachment Points

ATTACH_NONE = 0x0,
ATTACH_TOP = 0x1,
ATTACH_BOTTOM = 0x2,
ATTACH_LEFT = 0x4,
ATTACH_RIGHT = 0x8,
ATTACH_ALL = 0xF

These represent the available sides of attachment. To represent more than one attachment point, you may union the values.


Public Data Members

Friends

friend class CAttachment


Protected Data Members

RWGSlist(
CAttachment)
itsAttachments; List of registered attachments
AttachmentPoint itsAttachmentPoints Union of supported attachment sides
unsigned short itIsSuspended; Suspension state flag
unsigned short itsResumeBehavior; Suspension state flag
BOOLEAN itsClientSubviewDrawsBackground; Used to optimize refreshes
AttachmentPoint itsLastDragAttachmentPoint; Used to optimize refreshes
CRect itsLastDragRect; Used to optimize refreshes
CRect itsClientRect; Size of frame client area
CEnvironment itsInvertEnvironment; Used during drag events


Public Methods

Contructor and Destructor Methods

CAttachmentFrame(
CWindow* theEnclosingWindow,
AttachmentPoint theAttachmentPoints = ATTACH_TOP);
CAttachmentFrame(
CSubview* theEnclosure,
const CRect& theRegion,
AttachmentPoint theAttachmentPoints = ATTACH_TOP);
CAttachmentFrame(const CAttachmentFrame& theAttachmentFrame);
CAttachmentFrame& operator=(const CAttachmentFrame& theAttachmentFrame);
virtual ~CAttachmentFrame(void);

Registration Methods

virtual void AddAttachment(CAttachment* theAttachment);
virtual void RemoveAttachment(
CAttachment* theAttachment,
BOOLEAN willInvalidateAndArrange = TRUE);
virtual void SetAttachmentPoints(AttachmentPoint theAttachmentPoints);
virtual AttachmentPoint GetAttachmentPoints() const;
virtual void ArrangeAttachments(void);
virtual void SetAttachmentEnvironment(
const CEnvironment& theNewEnvironment,
BOOLEAN isUpdate = FALSE);
virtual void SetAttachmentFont(
const CFont &theNewFont,
BOOLEAN isUpdate = FALSE);
void SetClientSubview(CSubview *theClientSubview);
CSubview* GetClientSubview(void) const;
void HasOpaqueClientSubview(
BOOLEAN theClientSubviewDrawsBackground);
void Suspend(void);
void Resume(void);
BOOLEAN IsSuspended(void) const;

CDragSink Overridden Methods

virtual BOOLEAN IsInSink(CPoint theLocation);
virtual void DoDrop(
CPoint theLocation,
short theButton,
BOOLEAN isShift,
BOOLEAN isControl,
long theDragCommand,
void* theDragData);
virtual void DoEnter(
CPoint theLocation,
short theButton,
BOOLEAN isShift,
BOOLEAN isControl,
long theDragCommand,
void* theDragData);
virtual void DoLeave(
CPoint theLocation,
short theButton,
BOOLEAN isShift,
BOOLEAN isControl,
long theDragCommand,
void* theDragData);
virtual void DoDrag(
CPoint theLocation,
short theButton,
BOOLEAN isShift,
BOOLEAN isControl,
long theDragCommand,
void* theDragData);
virtual CView* GetOwner();

CDragSink Methods Overridden for Drag and Drop Support

virtual void Draw(const CRect& theClippingRegion);
virtual void DoSize(const CRect& theNewSize);

CSubview Overridden Methods

virtual void SetEnvironment(
const CEnvironment& theNewEnvironment,
BOOLEAN isUpdate = FALSE);
virtual void DoSetEnvironment(
const CEnvironment& theNewEnvironment,
BOOLEAN isUpdate = FALSE);
virtual void SetFont(
const CFont &theNewFont,
BOOLEAN isUpdate = FALSE);
virtual void DoSetFont(
const CFont &theNewFont,
BOOLEAN isUpdate = FALSE);
virtual void DoSetGlue(GLUETYPE theGlue); virtual void DoSetDragging(BOOLEAN isDraggable); virtual void DoSetSizing(BOOLEAN isSizable);

Protected Methods

void GetAttachmentSizes(
RWOrdered &theList
AttachmentPoint theAttachmentPoint);
void SetAttachmentSizes(
RWOrdered &theList,
CPoint theOffset,
AttachmentPoint theAttachmentPoint);
void RemoveWhiteSpace(AttachmentPoint theAttachmentPoint);
void SizeClientSubviewAndInvalidate(const CRect &theNewFrame);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.