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

NScrollBar

Methods Index

Heritage
Description
Usage
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Scrollbar Utilities
Multiple Owner Utilities
Static Utility Methods
Inherited Utilities
Inherited Scrolling Methods
TDI Enabling Methods
Protected Methods

NScrollBar


Heritage

Superclass: CNativeView

Subclasses: NWinScrollBar


Description

NScrollBar objects provide scrollbars that have the look-and-feel of scrollbars in the native window manager. An NScrollBar object sends HScroll and VScroll (horizontal and vertical scroll) messages to its owner, which must in turn do what is necessary to scroll the objects. By default, a scrollbar's owner is its enclosure.


Usage

Create an instance of this class and initialize it. The scrollbar updates its thumb automatically and informs its owner of the event. This class does not use the commands set by SetCommand or SetDoubleCommand.


Protected Data Members

UNITS itsPos; The scrollbar's position
UNITS itsMinPosition; Range start
UNITS itsMaxPosition; Range stop
UNITS itsThumbSize; Size of the scrollbar thumb
UNITS itsLineIncrement; How much, in pixels, to increment on a line scroll
UNITS itsPageIncrement; How much, in pixels, to increment on a page scroll
CView* itsOwner; Delegate events to owner
RWOrdered itsOwnerCol Pointers to owning CView* objects


Public Methods

Constructor, Destructor, and Initializer Methods

NScrollBar(CSubview* theEnclosure, 
const CRect& theRegion,
DIRECTION theDirection,
long theAttributes = 0L);
NScrollBar(CSubview* theEnclosure, 
long theContainerId, long theId);
NScrollBar(const NScrollBar& theScrollBar);
NScrollBar& operator=(const NScrollBar& theCSrollBar);
virtual ~NScrollBar();
BOOLEAN IScrollBar(
UNITS theMinPosition = 0,
UNITS theMaxPosition = 0,
UNITS theCurrentPosition = 0,
UNITS theLineIncrement = 1,
UNITS thePageIncrement = 20,
BOOLEAN isEnabled = TRUE,
BOOLEAN isVisible = TRUE,
GLUETYPE theGlue = NULLSTICKY);

Scrollbar Utilities

virtual void SetRange(UNITS theMinPosition, 
UNITS theMaxPosition,
UNITS theCurrentPosition = SAME);
virtual UNITS GetMinPosition(void) const;
virtual UNITS GetMaxPosition(void) const;
virtual void SetPosition(UNITS theNewPosition);
virtual UNITS GetPosition(void) const;
virtual void SetIncrements(UNITS theLineIncrements, UNITS thePageIncrements);
virtual UNITS GetLineIncrement(void) const;
virtual UNITS GetPageIncrement(void) const;
virtual void SetOwner(CView* theOwner);
virtual CView* GetOwner(void) const;
virtual void SetThumbSize(UNITS theThumbSize);
virtual UNITS GetThumbSize(void) const;

Multiple Owner Utilities

These methods allow a scrollbar to send scroll events to multiple owners.

void InsertOwner(CView* theOwner);
void RemoveOwner(CView* theOwner);
virtual const RWOrdered* GetOwners() const;

Static Utility Methods

static int NativeWidth(void);
static int NativeHeight(void);

Inherited Utilities

virtual void DoHit(CONTROL_INFO theControlInfo);
virtual void Size(const CRect& theNewSize);
virtual const CStringRW GetTitle(void) const;

Inherited Scrolling Methods

The following two methods are called when a scrollbar receives a scrolling event. The event propagates from the scrollbar to its enclosure. 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. These methods respond to the scrollbar event by scrolling the views contained inside the scroller.

virtual void VScroll(SCROLL_CONTROL theEventType, UNITS thePosition);
virtual void HScroll(SCROLL_CONTROL theEventType, UNITS thePosition);
virtual void Show(void);

TDI Enabling Methods

virtual void DoUpdateModel(long theControllerId, 
long theCommand, const CModel* theModel);
virtual void DoCommand(long theCommand, 
void* theData = NULL);

Protected Methods

NScrollBar(WINDOW theCreatedControl, 
CSubview* theEnclosure, const CRect& theRegion,
DIRECTION theDirection);
virtual SCROLL_TYPE GetSBType(void) const;


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

support@xvt.com


Visit our online help desk for tech support

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