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

VCF::Scrollable Class Reference

This class is used to add scrolling support to a control. More...

#include <vcf/ApplicationKit/Scrollable.h>

Inheritance diagram for VCF::Scrollable:

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

Public Member Functions

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

Detailed Description

This class is used to add scrolling support to a control.

See also:
ScrollbarManager


Constructor & Destructor Documentation

VCF::Scrollable::Scrollable  )  [inline]
 

virtual VCF::Scrollable::~Scrollable  )  [inline, virtual]
 


Member Function Documentation

virtual bool VCF::Scrollable::getDiscreteHorzScroll  )  [pure virtual]
 

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

Returns:
true if the scrolling is discrete.

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::getDiscreteVertScroll  )  [pure virtual]
 

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getHorizontalLeftScrollSpace  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getHorizontalPosition  )  [pure 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()

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getHorizontalRightScrollSpace  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getHorizontalScrollbarHeight  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::getHorizontalScrollRects Rect scrollBounds,
Rect leftBounds = NULL,
Rect rightBounds = NULL
[pure 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

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::getKeepHorzScrollbarVisible  )  [pure virtual]
 

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

Returns:
true if they stay visible even when not needed

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::getKeepVertScrollbarVisible  )  [pure virtual]
 

Implemented in VCF::AbstractScrollable.

virtual Control* VCF::Scrollable::getScrollableControl  )  [pure virtual]
 

gets the control this scrollable has been assogiated to.

See also:
setScrollableControl()

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVerticalBottomScrollSpace  )  [pure virtual]
 

gets the height of the space below the vertical scrollbar.

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVerticalPosition  )  [pure 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()

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVerticalScrollbarWidth  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::getVerticalScrollRects Rect scrollBounds,
Rect topBounds = NULL,
Rect bottomBounds = NULL
[pure 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

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVerticalTopScrollSpace  )  [pure virtual]
 

gets the height of the space above the vertical scrollbar.

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVirtualViewHeight  )  [pure virtual]
 

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

See also:
setVirtualViewSize

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVirtualViewHorzStep  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVirtualViewVertStep  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual double VCF::Scrollable::getVirtualViewWidth  )  [pure virtual]
 

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

See also:
setVirtualViewSize

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::hasHorizontalScrollBar  )  [pure virtual]
 

tells if the orizontal scrolbar is ever visible

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::hasVerticalScrollBar  )  [pure virtual]
 

tells if the vertical scrolbar is ever visible

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::isHorizontalScrollbarVisible  )  [pure virtual]
 

tells if the horizontal scollbar is actually visible.

Implemented in VCF::AbstractScrollable.

virtual bool VCF::Scrollable::isVerticalScrollbarVisible  )  [pure virtual]
 

tells if the vertical scollbar is actually visible.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::recalcScrollPositions  )  [pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setDiscreteScroll const bool &  horzDiscrete,
const bool &  vertDiscrete
[pure 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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setHasHorizontalScrollbar const bool &  hashorizontalScrollbar  )  [pure virtual]
 

sets if the orizontal scrolbar is ever visible

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setHasVerticalScrollbar const bool &  hasVerticalScrollbar  )  [pure virtual]
 

sets if the vertical scrolbar is ever visible

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setHorizontalLeftScrollSpace const double &  leftScrollSpace  )  [pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setHorizontalPosition const double &  horzPosition  )  [pure 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()

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setHorizontalRightScrollSpace const double &  rightScrollSpace  )  [pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setKeepScrollbarsVisible const bool &  horzVisible,
const bool &  vertVisible
[pure 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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setScrollableControl Control scrollableControl  )  [pure 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()

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVerticalBottomScrollSpace const double &  bottomScrollSpace  )  [pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVerticalPosition const double &  vertPosition  )  [pure 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()

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVerticalTopScrollSpace const double &  topScrollSpace  )  [pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVirtualViewHeight const double &  virtualViewHeight  )  [pure virtual]
 

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

See also:
setVirtualViewSize

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVirtualViewHorzStep const double &  step  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVirtualViewSize const double &  width,
const double &  height
[pure 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.

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVirtualViewVertStep const double &  step  )  [pure virtual]
 

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

Implemented in VCF::AbstractScrollable.

virtual void VCF::Scrollable::setVirtualViewWidth const double &  virtualViewWidth  )  [pure virtual]
 

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

See also:
setVirtualViewSize

Implemented in VCF::AbstractScrollable.


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