Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::AbstractScrollable Class Reference

Class AbstractScrollable documentation. More...

#include <vcf/ApplicationKit/AbstractScrollable.h>

Inheritance diagram for VCF::AbstractScrollable:

VCF::Scrollable VCF::Interface List of all members.

Public Member Functions

 AbstractScrollable ()
virtual ~AbstractScrollable ()
virtual void setHasVerticalScrollbar (const bool &hasVerticalScrollbar)
 sets if the vertical scrolbar is ever visible
virtual void setHasHorizontalScrollbar (const bool &hasHorizontalScrollbar)
 sets if the orizontal scrolbar is ever visible
virtual bool hasVerticalScrollBar ()
 tells if the vertical scrolbar is ever visible
virtual bool hasHorizontalScrollBar ()
 tells if the orizontal scrolbar is ever visible
virtual void setVirtualViewSize (const double &width, const double &height)
 sets the size (dimensions) of the area that needs to be displayed.
virtual void setVirtualViewHeight (const double &virtualViewHeight)
 sets the height of the area that needs to be displayed.
virtual double getVirtualViewHeight ()
 gets the height of the area that needs to be displayed.
virtual void setVirtualViewWidth (const double &virtualViewWidth)
 sets the width of the area that needs to be displayed.
virtual double getVirtualViewWidth ()
 gets the width of the area that needs to be displayed.
virtual void setVirtualViewHorzStep (const double &step)
 sets how many pixel we want to horizontally scroll the area to be displayed when pressing the arrows of the horizontal scrollbar.
virtual void setVirtualViewVertStep (const double &step)
 sets how many pixel we want to vertically scroll the area to be displayed when pressing the arrows of the vertical scrollbar.
virtual double getVirtualViewHorzStep ()
 tells how many pixel we want the area to be displayed will be vertically scrolled when pressing the arrows of the vertical scrollbar.
virtual double getVirtualViewVertStep ()
 tells how many pixel we want the area to be displayed will be vertically scrolled when pressing the arrows of the vertical scrollbar.
virtual bool isVerticalScrollbarVisible ()
 tells if the vertical scollbar is actually visible.
virtual bool isHorizontalScrollbarVisible ()
 tells if the horizontal scollbar is actually visible.
virtual void recalcScrollPositions ()
 recalculates all the positions and visibility status of all the scrollbars connected to a control.
virtual ControlgetScrollableControl ()
 gets the control this scrollable has been assogiated to.
virtual void setScrollableControl (Control *scrollableControl)
 sets the target control for the scrolling operation of the scrollable instance.
virtual void setVerticalPosition (const double &vertPosition)
 moves the scrollbox of a vertical scrollbar to the specified position.
virtual void setHorizontalPosition (const double &horzPosition)
 moves the scrollbox of a vertical scrollbar to the specified position.
virtual double getVerticalPosition ()
 gets the position of the scrollbox of a vertical scrollbar.
virtual double getHorizontalPosition ()
 gets the position of the scrollbox of a horizontal scrollbar.
virtual double getVerticalTopScrollSpace ()
 gets the height of the space above the vertical scrollbar.
virtual double getVerticalBottomScrollSpace ()
 gets the height of the space below the vertical scrollbar.
virtual void setVerticalTopScrollSpace (const double &topScrollSpace)
 the scrollbars are always inside the area to display.
virtual void setVerticalBottomScrollSpace (const double &bottomScrollSpace)
 the scrollbars are always inside the area to display.
virtual double getHorizontalLeftScrollSpace ()
 gets the width of the space on the left of the horizontal scrollbar.
virtual double getHorizontalRightScrollSpace ()
 gets the width of the space on the right of the horizontal scrollbar.
virtual void setHorizontalLeftScrollSpace (const double &leftScrollSpace)
 the scrollbars are always inside the area to display.
virtual void setHorizontalRightScrollSpace (const double &rightScrollSpace)
 the scrollbars are always inside the area to display.
virtual double getHorizontalScrollbarHeight ()
 gets the height ( the 'thickness' ) of an horizontal scrollbar.
virtual double getVerticalScrollbarWidth ()
 gets the width ( the 'thickness' ) of a vertical scrollbar.
virtual void getHorizontalScrollRects (Rect *scrollBounds, Rect *leftBounds=NULL, Rect *rightBounds=NULL)
 this will retrieves the values for three rectangular bounds, the bounds of the scroll bar portion, the bounds of the left most spacer, and the bounds of the right most spacer.
virtual void getVerticalScrollRects (Rect *scrollBounds, Rect *topBounds=NULL, Rect *bottomBounds=NULL)
 this will retrieves the values for three rectangular bounds, the bounds of the scroll bar portion, the bounds of the left most spacer, and the bounds of the right most spacer.
virtual void setKeepScrollbarsVisible (const bool &horzVisible, const bool &vertVisible)
 this allows you to control whether or not the scrollbars disappear when they are no longer needed.
virtual bool getKeepHorzScrollbarVisible ()
 gets whether or not the scrollbars disappear when they are no longer needed.
virtual bool getKeepVertScrollbarVisible ()
virtual void setDiscreteScroll (const bool &horzDiscrete, const bool &vertDiscrete)
 this allows you to control whether or not the scrolling needs to be discrete or not.
virtual bool getDiscreteHorzScroll ()
 gets whether or not the scrolling needs to be discrete or not.
virtual bool getDiscreteVertScroll ()
void setVerticalScrollingDelegate (Delegate *delegate)
void setHorizontalScrollingDelegate (Delegate *delegate)
DelegategetVerticalScrollingDelegate ()
DelegategetHorizontalScrollingDelegate ()

Protected Member Functions

void onControlResized (ControlEvent *event)

Protected Attributes

ControlResizeHandlerresizeHandler_
ScrollPeerscrollPeer_
ControlscrollableControl_
double virtualViewHorzStep_
double virtualViewVertStep_
double virtualViewHeight_
double virtualViewWidth_
bool hasHorzScrollbar_
bool hasVertScrollbar_
double vertPosition_
double horzPosition_
double topScrollSpace_
double bottomScrollSpace_
double leftScrollSpace_
double rightScrollSpace_
bool keepHorzScrollbarVisible_
bool keepVertScrollbarVisible_
bool discreteHorzScroll_
bool discreteVertScroll_
DelegatevertDelegate_
DelegatehorzDelegate_

Friends

class ControlResizeHandler

Classes

class  ControlResizeHandler

Detailed Description

Class AbstractScrollable documentation.

This class represents a basic implementation for controls that would like to be "scrollable".

See also:
Scrollable
Version:
1.0
Author:
Jim Crafton


Constructor & Destructor Documentation

VCF::AbstractScrollable::AbstractScrollable  ) 
 

virtual VCF::AbstractScrollable::~AbstractScrollable  )  [virtual]
 


Member Function Documentation

virtual bool VCF::AbstractScrollable::getDiscreteHorzScroll  )  [virtual]
 

gets whether or not the scrolling needs to be discrete or not.

Returns:
true if the scrolling is discrete.

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::getDiscreteVertScroll  )  [virtual]
 

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getHorizontalLeftScrollSpace  )  [inline, virtual]
 

gets the width of the space on the left of the horizontal scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getHorizontalPosition  )  [inline, virtual]
 

gets the position of the scrollbox of a horizontal scrollbar.

This position is always the one adjusted by the OS according to internal considerations.

See also:
ScrollPeer::getAdjustedPositions()

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getHorizontalRightScrollSpace  )  [inline, virtual]
 

gets the width of the space on the right of the horizontal scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getHorizontalScrollbarHeight  )  [virtual]
 

gets the height ( the 'thickness' ) of an horizontal scrollbar.

Implements VCF::Scrollable.

Delegate* VCF::AbstractScrollable::getHorizontalScrollingDelegate  )  [inline]
 

virtual void VCF::AbstractScrollable::getHorizontalScrollRects Rect scrollBounds,
Rect leftBounds = NULL,
Rect rightBounds = NULL
[virtual]
 

this will retrieves the values for three rectangular bounds, the bounds of the scroll bar portion, the bounds of the left most spacer, and the bounds of the right most spacer.

If a scroll bar has it's left and/or right scroll space set to 0, then the right and left bounds for the spacers may be null, or a rect of (0,0,0,0).

Parameters:
Rect scrollBounds, the bounds of the actual horizontal scroll bar rect, if this is NULL no value is returned
Rect leftBounds, the bounds of the left spacer rect, if this is NULL no value is set
Rect rightBounds, the bounds of the right spacer rect, if this is NULL no value is set

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::getKeepHorzScrollbarVisible  )  [virtual]
 

gets whether or not the scrollbars disappear when they are no longer needed.

Returns:
true if they stay visible even when not needed

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::getKeepVertScrollbarVisible  )  [virtual]
 

Implements VCF::Scrollable.

virtual Control* VCF::AbstractScrollable::getScrollableControl  )  [inline, virtual]
 

gets the control this scrollable has been assogiated to.

See also:
setScrollableControl()

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVerticalBottomScrollSpace  )  [inline, virtual]
 

gets the height of the space below the vertical scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVerticalPosition  )  [inline, virtual]
 

gets the position of the scrollbox of a vertical scrollbar.

This position is always the one adjusted by the OS according to internal considerations.

See also:
ScrollPeer::getAdjustedPositions()

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVerticalScrollbarWidth  )  [virtual]
 

gets the width ( the 'thickness' ) of a vertical scrollbar.

Implements VCF::Scrollable.

Delegate* VCF::AbstractScrollable::getVerticalScrollingDelegate  )  [inline]
 

virtual void VCF::AbstractScrollable::getVerticalScrollRects Rect scrollBounds,
Rect topBounds = NULL,
Rect bottomBounds = NULL
[virtual]
 

this will retrieves the values for three rectangular bounds, the bounds of the scroll bar portion, the bounds of the left most spacer, and the bounds of the right most spacer.

If a scroll bar has it's left and/or right scroll space set to 0, then the right and left bounds for the spacers may be null, or a rect of (0,0,0,0).

Parameters:
Rect scrollBounds, the bounds of the actual vertical scroll bar rect, if this is NULL no value is set
Rect topBounds, the bounds of the top spacer rect, if this is NULL no value is set
Rect bottomBounds, the bounds of the bottom spacer rect, if this is NULL no value is set

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVerticalTopScrollSpace  )  [inline, virtual]
 

gets the height of the space above the vertical scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVirtualViewHeight  )  [inline, virtual]
 

gets the height of the area that needs to be displayed.

See also:
setVirtualViewSize

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVirtualViewHorzStep  )  [inline, virtual]
 

tells how many pixel we want the area to be displayed will be vertically scrolled when pressing the arrows of the vertical scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVirtualViewVertStep  )  [inline, virtual]
 

tells how many pixel we want the area to be displayed will be vertically scrolled when pressing the arrows of the vertical scrollbar.

Implements VCF::Scrollable.

virtual double VCF::AbstractScrollable::getVirtualViewWidth  )  [inline, virtual]
 

gets the width of the area that needs to be displayed.

See also:
setVirtualViewSize

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::hasHorizontalScrollBar  )  [inline, virtual]
 

tells if the orizontal scrolbar is ever visible

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::hasVerticalScrollBar  )  [inline, virtual]
 

tells if the vertical scrolbar is ever visible

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::isHorizontalScrollbarVisible  )  [virtual]
 

tells if the horizontal scollbar is actually visible.

Implements VCF::Scrollable.

virtual bool VCF::AbstractScrollable::isVerticalScrollbarVisible  )  [virtual]
 

tells if the vertical scollbar is actually visible.

Implements VCF::Scrollable.

void VCF::AbstractScrollable::onControlResized ControlEvent event  )  [protected]
 

virtual void VCF::AbstractScrollable::recalcScrollPositions  )  [virtual]
 

recalculates all the positions and visibility status of all the scrollbars connected to a control.

This function must be called after some changes have been made on the target, the size of the object to scroll, or any scrollbar.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setDiscreteScroll const bool &  horzDiscrete,
const bool &  vertDiscrete
[virtual]
 

this allows you to control whether or not the scrolling needs to be discrete or not.

By default this is false, ( i.e. rounded to the same amount indicated by getVirtualViewStep ).

Parameters:
bool visible, true if we want it visible

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setHasHorizontalScrollbar const bool &  hasHorizontalScrollbar  )  [inline, virtual]
 

sets if the orizontal scrolbar is ever visible

Parameters:
const bool& hasHorizontalScrollbar, false if it is never visible.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setHasVerticalScrollbar const bool &  hasVerticalScrollbar  )  [inline, virtual]
 

sets if the vertical scrolbar is ever visible

Parameters:
const bool& hasVerticalScrollbar, false if it is never visible.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setHorizontalLeftScrollSpace const double &  leftScrollSpace  )  [virtual]
 

the scrollbars are always inside the area to display.

this let us to create a space on the left of the horizontal scrollbar, which can be used to place other controls in there. As result of this the scrollbar will appear smaller.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setHorizontalPosition const double &  horzPosition  )  [virtual]
 

moves the scrollbox of a vertical scrollbar to the specified position.

Keep in mind that the final position may differ fom the specified one because the OS may change that actual position because of roundings and other considerations related to the position of other controls.

See also:
ScrollPeer::getAdjustedPositions()

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setHorizontalRightScrollSpace const double &  rightScrollSpace  )  [virtual]
 

the scrollbars are always inside the area to display.

this let us to create a space on the right of the horizontal scrollbar, which can be used to place other controls in there. As result of this the scrollbar will appear smaller.

Implements VCF::Scrollable.

void VCF::AbstractScrollable::setHorizontalScrollingDelegate Delegate delegate  )  [inline]
 

virtual void VCF::AbstractScrollable::setKeepScrollbarsVisible const bool &  horzVisible,
const bool &  vertVisible
[virtual]
 

this allows you to control whether or not the scrollbars disappear when they are no longer needed.

By default this is false, which means that the scrollabars will disappear when the virtual width or height is less than the control's actual width or height. If this is true, then the scrollbars will stay visible, but become disabled.

Parameters:
bool visible, true if we want it visible

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setScrollableControl Control scrollableControl  )  [virtual]
 

sets the target control for the scrolling operation of the scrollable instance.

At this point the scrollbars will be resized with the control and it's content will be scrolled by the scrollable.

See also:
ScrollbarManager::setTarget()

Control::setScrollable()

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVerticalBottomScrollSpace const double &  bottomScrollSpace  )  [virtual]
 

the scrollbars are always inside the area to display.

this let us to create a space on the bottom of the vertical scrollbar, which can be used to place other controls in there. As result of this the scrollbar will appear smaller.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVerticalPosition const double &  vertPosition  )  [virtual]
 

moves the scrollbox of a vertical scrollbar to the specified position.

Keep in mind that the final position may differ fom the specified one because the OS may change that actual position because of roundings and other considerations related to the position of other controls.

See also:
ScrollPeer::getAdjustedPositions()

Implements VCF::Scrollable.

void VCF::AbstractScrollable::setVerticalScrollingDelegate Delegate delegate  )  [inline]
 

virtual void VCF::AbstractScrollable::setVerticalTopScrollSpace const double &  topScrollSpace  )  [virtual]
 

the scrollbars are always inside the area to display.

this let us to create a space on the top of the vertical scrollbar, which can be used to place other controls in there. As result of this the scrollbar will appear smaller.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVirtualViewHeight const double &  virtualViewHeight  )  [inline, virtual]
 

sets the height of the area that needs to be displayed.

See also:
setVirtualViewSize

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVirtualViewHorzStep const double &  step  )  [inline, virtual]
 

sets how many pixel we want to horizontally scroll the area to be displayed when pressing the arrows of the horizontal scrollbar.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVirtualViewSize const double &  width,
const double &  height
[virtual]
 

sets the size (dimensions) of the area that needs to be displayed.

For example if we want to show an image, this size will be set the same as the size of the image. The name virtual comes from the fact that it can be partly hidden. This area can be larger of the area actually displayed, and in this case the scrollbars will appear if not visible.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVirtualViewVertStep const double &  step  )  [inline, virtual]
 

sets how many pixel we want to vertically scroll the area to be displayed when pressing the arrows of the vertical scrollbar.

Implements VCF::Scrollable.

virtual void VCF::AbstractScrollable::setVirtualViewWidth const double &  virtualViewWidth  )  [inline, virtual]
 

sets the width of the area that needs to be displayed.

See also:
setVirtualViewSize

Implements VCF::Scrollable.


Friends And Related Function Documentation

friend class ControlResizeHandler [friend]
 


Member Data Documentation

double VCF::AbstractScrollable::bottomScrollSpace_ [protected]
 

bool VCF::AbstractScrollable::discreteHorzScroll_ [protected]
 

bool VCF::AbstractScrollable::discreteVertScroll_ [protected]
 

bool VCF::AbstractScrollable::hasHorzScrollbar_ [protected]
 

bool VCF::AbstractScrollable::hasVertScrollbar_ [protected]
 

Delegate* VCF::AbstractScrollable::horzDelegate_ [protected]
 

double VCF::AbstractScrollable::horzPosition_ [protected]
 

bool VCF::AbstractScrollable::keepHorzScrollbarVisible_ [protected]
 

bool VCF::AbstractScrollable::keepVertScrollbarVisible_ [protected]
 

double VCF::AbstractScrollable::leftScrollSpace_ [protected]
 

ControlResizeHandler* VCF::AbstractScrollable::resizeHandler_ [protected]
 

double VCF::AbstractScrollable::rightScrollSpace_ [protected]
 

Control* VCF::AbstractScrollable::scrollableControl_ [protected]
 

ScrollPeer* VCF::AbstractScrollable::scrollPeer_ [protected]
 

double VCF::AbstractScrollable::topScrollSpace_ [protected]
 

Delegate* VCF::AbstractScrollable::vertDelegate_ [protected]
 

double VCF::AbstractScrollable::vertPosition_ [protected]
 

double VCF::AbstractScrollable::virtualViewHeight_ [protected]
 

double VCF::AbstractScrollable::virtualViewHorzStep_ [protected]
 

double VCF::AbstractScrollable::virtualViewVertStep_ [protected]
 

double VCF::AbstractScrollable::virtualViewWidth_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information