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

CScroller

Methods Index

Heritage
Description
Usage
Environment
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Scroller Utilities
Inherited Horizontal and Vertical Scrolling Methods
Inherited Utilities
Overridden Methods
Protected Methods
Inherited Methods
Other Methods

CScroller


Heritage

Superclass: CVirtualFrame

Subclasses: CListBox


Description

CScroller attaches scrollbars to the visible area of the virtual frame; it is a virtual frame with scrollbars. Objects nested inside a scroller scroll automatically as the user manipulates the scrollbars. When users drag or size objects inside a scroller, the contents scroll automatically as the object is dragged beyond the visible borders.


Usage

Create a CScroller object, initialize it, and place objects inside it (see CVirtualFrame). You must call the initializer prior to using the CScroller object in order to establish the following:


Environment

The scroller border is drawn with the pen; you can set the pen color, pattern, and width. The scroller background is drawn with the brush. The brush pattern has been disabled and is always PAT_SOLID, even if you give it another setting. You can define the brush color, however. The color of the scrollbars is system-defined.


Protected Data Members

NScrollBar *itsHScrollBar; Horizontal scrollbar
NScrollBar *itsVScrollBar; Vertical scrollbar
BOOLEAN itUsesWinScrollBars Flag used to determine whether scroller uses XVT window's scrollbars
BOOLEAN itIsThumbtracking; Whether thumbtracking is supported
CPoint* itsIntViewOrigin Internal origin (scrolling offset)
static RWOrdered itsUpdateViewList Views that need update after scrolling event.


Public Methods

Constructor, Destructor, and Initializer Methods

CScroller(CSubview* theEnclosure, 
const CRect& theRegion,
UNITS theVirtualWidth = 0,
UNITS theVirtualHeight = 0);
CScroller(CWindow* theScrollableWindow, 
UNITS theVirtualWidth = 0,
UNITS theVirtualHeight = 0);
CScroller(const CScroller& theScroller);
CScroller& operator=(const CScroller& theScroller);
virtual ~CScroller(void);
BOOLEAN IScroller(
BOOLEAN hasHorizontalScrollBar = TRUE,
BOOLEAN hasVerticalScrollBar = TRUE,
BOOLEAN isThumbTracking = FALSE,
UNITS theLineIncrement = 10,
UNITS thePageIncrement = 50,
BOOLEAN isVisible = TRUE,
long theGlue = NULLSTICKY);

Scroller Utilities

virtual void SetHIncrements(UNITS theLineIncrement, UNITS thePageIncrement);
virtual void SetVIncrements(UNITS theLineIncrement, UNITS thePageIncrement);
virtual UNITS GetHLineIncrement(void) const;
virtual UNITS GetVLineIncrement(void) const;
virtual UNITS GetHPageIncrement(void) const;
virtual UNITS GetVPageIncrement(void) const;
virtual void SetThumbtracking(BOOLEAN isThumbTracking);
virtual BOOLEAN IsThumbtracking(void) const;
static BOOLEAN RegisterForUpdate(CView* theView);

Inherited Horizontal and Vertical Scrolling Methods

The following two methods are called when a scrollbar receives a scrolling event. The event propagates from the scrollbar to the CScroller object. theEventType designates the kind of scroll: line up, line down, page up, or page down (the terms "up" and "down" are used for both horizontal and vertical scrolling, though the effects are different for horizontal scrolling). theThumbPosition is the numerical value for placement of the thumb when either thumb repositioning or dynamic thumb tracking is used. This method responds to the scrollbar event by scrolling the views contained inside the scroller.

virtual void VScroll(SCROLL_CONTROL theEventType, UNITS theThumbPosition);
virtual void HScroll(SCROLL_CONTROL theEventType, UNITS theThumbPosition);

Inherited Utilities

virtual void ScrollViews)const CPoint& theNewOrigin);
virtual CPoint AutoScroll(UNITS horizontalChange, UNITS verticalChange);
virtual void Key(const CKey& the key);
virtual void AddSubview(const CView* theSubview);
virtual CPoint GetGlobalOrigin(void) const;
virtual CRect GetClippedFrame(void) const;

Overridden Methods

The following methods have been overridden to operate on CScroller and its scrollbars:

virtual void Size(const CRect& theRect);
virtual void Draw(const CRect& theClipping);
virtual void DoDraw(
const CRect& theClippingRegion = MAXRect);
virtual void PrintDraw(
const CRect& theClipping = MAXRect);
virtual void SetOrigin(const CPoint& theDeltaPoint);
virtual void Show();
virtual void Hide();
virtual void Enable();
virtual void Disable();
virtual void SetEnvironment( 
const CEnvironment& theEnvironment,
BOOLEAN isUpdate);
virtual void SetEnclosure(CSubview* theEnclosure);

Protected Methods

Inherited Methods

virtual void AdjustScrollBars(void);

Other Methods

CRect GetInitialFrame(CSubview* theEnclosure, 
const CRect& theRegion,
BOOLEAN hasHorizontalScrollBar,
BOOLEAN hasVerticalScrollBar) const;
CRect GetInnerFrame(void) const;
static RWOrdered & GetUpdateViewList(void);
static void ProcessViewUpdate(void);


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

support@xvt.com


Visit our online help desk for tech support

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