LScroller is a PowerPlant class that is used for scrolling views. Scroller views implement all the functionality of scroll bars, including creation, resizing, moving, hiding, showing, enabling and other operations. Sometimes you will see scrolling views referred to simply as "Scrollers" in the PowerPlant documentation.
The only functional difference between LActiveScroller and LScroller is that LActiveScroller supports dynamic scrolling of the view
Methods :
The methods in this class are:
Data Members:
The data members in this class are:
Operation:
The most important feature of a Scroller view is that it has only one subpane, which is a view. The subview may contain an arbitrary number of panes and views. The net effect is that the Scroller view may contain any number of panes of any type.
Source files:
Ancestors:
Purpose:
The constructor creates objects from the passed-in parameters.
Access:
Prototype:
LScroller();
LScroller( const LScroller &inOriginal );
LScroller( const SPaneInfo &inPaneInfo,
const SViewInfo &inViewInfo,
SInt16 inHorizBarLeftIndent,
SInt16 inHorizBarRightIndent,
SInt16 inVertBarTopIndent,
SInt16 inVertBarBottomIndent,
LView *inScrollingView );
LScroller( LStream *inStream );Parameters:
These constructors have the following parameters:
Purpose:
The destructor destroys the object.
Access:
Prototype:
virtual ~LScroller();
Purpose:
This method activates the Scroller, and show scroll bars that were hidden when deactivated. This method is an override of ActivateSelf() in the LPane class.
Purpose:
This method adjusts the scroll bars (value, min, and max) according to the current state of the Scroller and ScrollingView.
Access:
Prototype:
virtual void AdjustScrollBars();Parameters:
Return:
Purpose:
This method deactivates the Scroller. According to Mac OS Human Interface Guidelines, scroll bars in inactive windows are hidden. This method is an override of DeactivateSelf() in the LPane class.
Purpose:
This method draws a Scroller. This method is an override of DrawSelf() in the LPane class.
Purpose:
Expand a SubPane, which should be the Scroller's ScrollingView, to fill the interior of a Scroller. This method is an override of ExpandSubPane() in the LView class.
Purpose:
Finish creation of a Scroller by installing its ScrollingView. This method is an override of FinishCreateSelf() in the LPane class.
Purpose:
This method returns a Boolean indicating whether mHorizontalBar is nil or not.
Access:
Prototype:
Boolean HasHorizontalScrollBar();Parameters:
Return:
Boolean indicating mHorizontalBar != nil
Purpose:
This method returns a Boolean indicating whether mVerticalBar is nil or not.
Access:
Prototype:
Boolean HasVerticalScrollBar();Parameters:
Return:
Boolean indicating mVerticalBar != nil
Purpose:
Mac OS Toolbox callback function for the action to take while tracking a mouse click in a horizontal scroll bar.
Access:
Prototype:
static pascal void HorizSBarAction(Parameters:
ControlHandle inMacControl,
SInt16 inPart);
This method has the following parameters:
Return:
Purpose:
This method is called to scroll horizontally while clicking and holding inside the horizontal scroll bar.
Access:
Prototype:
virtual void HorizScroll( SInt16 inPart );Parameters:
This method has the following parameter:
Return:
Purpose:
This method installs a Scrolling View within this Scroller.
Access:
Prototype:
virtual void InstallView( LView *inScrollingView );Parameters:
This method has the following parameter:
Return:
Purpose:
This method responds to messages from Broadcasters. The ScrollBars of a Scroller broadcast a message after the user drags the thumb. This method is an override of the pure virtual method ListenToMessage() in the LListener class.
Access:
Prototype:
virtual void ListenToMessage( MessageT inMessage,Parameters:
void *ioParam);
This method has the following parameters:
Return:
Remarks:
You must supply an implementation for this method since it is a pure virtual in the base class.
Purpose:
Create standard Mac OS control objects for the horizontal and/or vertical scroll bars of a Scroller.
Access:
Prototype:
void MakeScrollBars( SInt16 inHorizBarLeftIndent,Parameters:
SInt16 inHorizBarRightIndent,
SInt16 inVertBarTopIndent,
SInt16 inVertBarBottomIndent );
This method has the following parameters:
Return:
Purpose:
Change the Frame size by the specified amounts. This method is an override of ResizeFrameBy() in the LPane class.
Purpose:
Adjust state when the Image of the ScrollingView changes. Scroll bar settings depend on the ScrollingView Image, so they must be adjusted to match the current state. This method is an override of SubImageChanged() in the LView class.
Access:
Prototype:
virtual void SubImageChanged( LView *inSubView );Parameters:
This method has the following parameter:
Return:
Purpose:
Mac OS Toolbox callback function for the action to take while tracking a mouse click in a vertical scroll bar.
Access:
Prototype:
static pascal void VertSBarAction(Parameters:
ControlHandle inMacControl,
SInt16 inPart);
This method has the following parameters:
Return:
Purpose:
This method is called to scroll vertically while clicking and holding inside the vertical scroll bar.
Access:
Prototype:
virtual void VertScroll( SInt16 inPart );Parameters:
This method has the following parameter:
Return:
Purpose:
This data member is a pointer to the ScrollingView.
Access:
Prototype:
LView *mScrollingView;
Purpose:
This data member is a pointer to the standard control that is a vertical scroll bar.
Access:
Prototype:
LStdControl *mVerticalBar;
Purpose:
This data member is a pointer to the standard control that is a horizontal scroll bar.
Access:
Prototype:
LStdControl *mHorizontalBar;
Purpose:
This data member is the resource ID of the ScrollingView.
Access:
Prototype:
PaneIDT mScrollingViewID;