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

CVirtualFrame

Methods Index

Heritage
Description
Usage
Public Data Members
Protected Data Members
Friends
Public Methods
Initializer and Destructor Methods
Methods Pertaining to the Scrolling Origin
Sizing Methods
Inherited Utilities
Protected Methods
Constructor Methods
Scrolling Method
Scroll Range Methods
Inherited Methods

CVirtualFrame


Heritage

Superclass: CSubview

Subclasses: CScroller


Description

CVirtualFrame is an abstract class that represents an area on the screen with a virtual size that is larger than its display area. Every virtual frame thus has two regions associated with it: a virtual region and a real visible region (display area) located inside a window or some other view. A CVirtualFrame object is a subview, so it can contain other nested views.


Usage

Objects are placed inside of a CVirtualFrame and registered as subviews. These objects are displayed inside the viewing rectangle relative to a virtual origin. As the origin changes, different areas of the virtual frame are displayed, revealing the subviews contained in the virtual frame.

You can set the virtual size of the frame manually using SetVirtualFrame. If this is not done, the virtual frame automatically sizes itself to enclose all of its subviews.

This is an abstract class that must be extended by derived classes that manipulate the scrolling by updating the origin (through the use of NScrollBars, for example).


Public Data Members

CPoint* itsViewOrigin; The origin of the virtual frame relative to the viewable rectangle
CRect* itsVirtualFrame; The virtual region


Protected Data Members

static double itsXProportion; Internal sizing variable
static double itsYProportion; Internal sizing variable

Friends

friend class CScroller


Public Methods

Initializer and Destructor Methods

BOOLEAN IVirtualFrame(BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);
virtual ~CVirtualFrame(void);

Methods Pertaining to the Scrolling Origin

virtual void SetScrollingOrigin(
const CPoint& theNewOrigin);
virtual CPoint& GetScrollingOrigin(void);

Sizing Methods

virtual void SetVirtualFrame(UNITS theNewWidth, UNITS theNewHeight);
virtual CRect GetVirtualFrame(void) const;
virtual void EnlargeToFit(const CRect& theRegionToInclude);
virtual void ShrinkToFit(void);

Inherited Utilities

virtual void Draw(const CRect& theClippingRegion);
virtual void Size(const CRect& theNewSize);
virtual CPoint GetGlobalOrigin(void) const;

Protected Methods

Constructor Methods

CVirtualFrame(CSubview* theEnclosure, 
const CRect& theRegion,
UNITS theVirtualWidth =0,
UNITS theVirtualHeight =0);
CVirtualFrame(const CVirtualFrame& theVirtualFrame);
CVirtualFrame& operator= (
const CVirtualFrame& theVirtualFrame);

Scrolling Method

virtual void ScrollViews(const CPoint& theNewOrigin);

Scroll Range Methods

Inherited Methods

virtual void AdjustScrollBars(void) = 0;
virtual void AddSubview(const CView* theSubview);


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

support@xvt.com


Visit our online help desk for tech support

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