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

VCF::ScrollbarManager Class Reference

The ScrollbarManager represents a component used for managing scrolbars for a target control. More...

#include <vcf/ApplicationKit/ScrollbarManager.h>

Inheritance diagram for VCF::ScrollbarManager:

VCF::Component VCF::ObjectWithCallbacks VCF::Object List of all members.

Public Member Functions

HorizontalScrolling ScrollbarManager ()
 ScrollbarManager (Component *owner)
 ScrollbarManager (const String &name, Component *owner)
 ScrollbarManager (const String &name)
virtual void afterCreate (ComponentEvent *event)
 override of the callback always called when a component is created.
ControlgetTarget ()
 gets the control containing the scrollbars and associated to them.
void setTarget (Control *target)
 assign the target control for the scrolling operations.
void setHasVerticalScrollbar (const bool &hasVerticalScrollbar)
 sets if the vertical scrolbar is ever visible
void setHasHorizontalScrollbar (const bool &hasHorizontalScrollbar)
 sets if the orizontal scrolbar is ever visible
bool hasVerticalScrollBar ()
 tells if the vertical scrolbar is ever visible
bool hasHorizontalScrollBar ()
 tells if the orizontal scrolbar is ever visible
double getVirtualViewHeight ()
 gets the height of the area that needs to be displayed.
double getVirtualViewWidth ()
 gets the width of the area that needs to be displayed.
void setVirtualViewHeight (const double &virtualViewHeight)
 sets the height of the area that needs to be displayed.
void setVirtualViewWidth (const double &virtualViewWidth)
 sets the width of the area that needs to be displayed.
void setVirtualViewSize (const double &virtualViewWidth, const double &virtualViewHeight)
 sets the size (dimensions) of the area that needs to be displayed.
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 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 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 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.
void setVerticalPosition (const double &vertPosition)
 moves the scrollbox of a vertical scrollbar to the specified position.
void setHorizontalPosition (const double &horzPosition)
 moves the scrollbox of a vertical scrollbar to the specified position.
double getVerticalPosition ()
 gets the position of the scrollbox of a vertical scrollbar.
double getHorizontalPosition ()
 gets the position of the scrollbox of a horizontal scrollbar.
double getVerticalTopScrollSpace ()
 gets the height of the space above the vertical scrollbar.
double getVerticalBottomScrollSpace ()
 gets the height of the space below the vertical scrollbar.
void setVerticalTopScrollSpace (const double &topScrollSpace)
 the scrollbars are always inside the area to display.
void setVerticalBottomScrollSpace (const double &bottomScrollSpace)
 the scrollbars are always inside the area to display.
double getHorizontalLeftScrollSpace ()
 gets the width of the space on the left of the horizontal scrollbar.
double getHorizontalRightScrollSpace ()
 gets the width of the space on the right of the horizontal scrollbar.
void setHorizontalLeftScrollSpace (const double &leftScrollSpace)
 the scrollbars are always inside the area to display.
void setHorizontalRightScrollSpace (const double &rightScrollSpace)
 the scrollbars are always inside the area to display.
void setKeepScrollbarsVisible (const bool &horzVisible, const bool &vertVisible)
 sets if we want the horizontal and vertical scrollbar always visible, even when not needed, or not.
bool getKeepVertScrollbarVisible ()
 tells if we choosed to have the vertical scrollbar always visible, even when not needed.
bool getKeepHorzScrollbarVisible ()
 tells if we choosed to have the horizontal scrollbar always visible, even when not needed.
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 getDiscreteVertScroll ()
 gets whether or not the scrolling on the vertical scrollbar needs to be discrete or not.
virtual bool getDiscreteHorzScroll ()
 gets whether or not the scrolling on the horizontal scrollbar needs to be discrete or not.

Public Attributes

VCF::Delegate ScrollDelegate
VerticalScrolling VCF::Delegate ScrollDelegate

Protected Member Functions

virtual ~ScrollbarManager ()

Protected Attributes

Scrollablescrollable_
Controltarget_

Detailed Description

The ScrollbarManager represents a component used for managing scrolbars for a target control.

The target control is specified and then a Scrollable instance is associated with the target. The manager componenent also exposes the Scrollable object's properties, allowing the developer to work with them at design time as well as programmatically.


Constructor & Destructor Documentation

HorizontalScrolling VCF::ScrollbarManager::ScrollbarManager  ) 
 

VCF::ScrollbarManager::ScrollbarManager Component owner  ) 
 

VCF::ScrollbarManager::ScrollbarManager const String name,
Component owner
 

VCF::ScrollbarManager::ScrollbarManager const String name  ) 
 

virtual VCF::ScrollbarManager::~ScrollbarManager  )  [protected, virtual]
 


Member Function Documentation

virtual void VCF::ScrollbarManager::afterCreate ComponentEvent event  )  [virtual]
 

override of the callback always called when a component is created.

Reimplemented from VCF::Component.

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

gets whether or not the scrolling on the horizontal scrollbar needs to be discrete or not.

Returns:
true if the scrolling is discrete.

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

gets whether or not the scrolling on the vertical scrollbar needs to be discrete or not.

Returns:
true if the scrolling is discrete.

double VCF::ScrollbarManager::getHorizontalLeftScrollSpace  ) 
 

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

double VCF::ScrollbarManager::getHorizontalPosition  ) 
 

gets the position of the scrollbox of a horizontal scrollbar.

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

See also:
ScrollPeer::getAdjustedPositions()

double VCF::ScrollbarManager::getHorizontalRightScrollSpace  ) 
 

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

bool VCF::ScrollbarManager::getKeepHorzScrollbarVisible  ) 
 

tells if we choosed to have the horizontal scrollbar always visible, even when not needed.

bool VCF::ScrollbarManager::getKeepVertScrollbarVisible  ) 
 

tells if we choosed to have the vertical scrollbar always visible, even when not needed.

Control* VCF::ScrollbarManager::getTarget  )  [inline]
 

gets the control containing the scrollbars and associated to them.

This the control whose content will be moved by the scrollable, as for example the listbox or the text editor when it has scrollbars.

double VCF::ScrollbarManager::getVerticalBottomScrollSpace  ) 
 

gets the height of the space below the vertical scrollbar.

double VCF::ScrollbarManager::getVerticalPosition  ) 
 

gets the position of the scrollbox of a vertical scrollbar.

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

See also:
ScrollPeer::getAdjustedPositions()

double VCF::ScrollbarManager::getVerticalTopScrollSpace  ) 
 

gets the height of the space above the vertical scrollbar.

double VCF::ScrollbarManager::getVirtualViewHeight  ) 
 

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

See also:
setVirtualViewSize

virtual double VCF::ScrollbarManager::getVirtualViewHorzStep  )  [virtual]
 

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 VCF::ScrollbarManager::getVirtualViewVertStep  )  [virtual]
 

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

double VCF::ScrollbarManager::getVirtualViewWidth  ) 
 

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

See also:
setVirtualViewSize

bool VCF::ScrollbarManager::hasHorizontalScrollBar  ) 
 

tells if the orizontal scrolbar is ever visible

bool VCF::ScrollbarManager::hasVerticalScrollBar  ) 
 

tells if the vertical scrolbar is ever visible

virtual void VCF::ScrollbarManager::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

void VCF::ScrollbarManager::setHasHorizontalScrollbar const bool &  hasHorizontalScrollbar  ) 
 

sets if the orizontal scrolbar is ever visible

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

void VCF::ScrollbarManager::setHasVerticalScrollbar const bool &  hasVerticalScrollbar  ) 
 

sets if the vertical scrolbar is ever visible

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

void VCF::ScrollbarManager::setHorizontalLeftScrollSpace const double &  leftScrollSpace  ) 
 

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.

void VCF::ScrollbarManager::setHorizontalPosition const double &  horzPosition  ) 
 

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()

void VCF::ScrollbarManager::setHorizontalRightScrollSpace const double &  rightScrollSpace  ) 
 

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.

void VCF::ScrollbarManager::setKeepScrollbarsVisible const bool &  horzVisible,
const bool &  vertVisible
 

sets if we want the horizontal and vertical scrollbar always visible, even when not needed, or not.

void VCF::ScrollbarManager::setTarget Control target  ) 
 

assign the target control for the scrolling operations.

This is the control containing the scrollbars which are associated to it. It's content is scrolled by the scrollable.

void VCF::ScrollbarManager::setVerticalBottomScrollSpace const double &  bottomScrollSpace  ) 
 

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.

void VCF::ScrollbarManager::setVerticalPosition const double &  vertPosition  ) 
 

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()

void VCF::ScrollbarManager::setVerticalTopScrollSpace const double &  topScrollSpace  ) 
 

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.

void VCF::ScrollbarManager::setVirtualViewHeight const double &  virtualViewHeight  ) 
 

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

See also:
setVirtualViewSize

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

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

void VCF::ScrollbarManager::setVirtualViewSize const double &  virtualViewWidth,
const double &  virtualViewHeight
 

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.

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

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

void VCF::ScrollbarManager::setVirtualViewWidth const double &  virtualViewWidth  ) 
 

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

See also:
setVirtualViewSize


Member Data Documentation

Scrollable* VCF::ScrollbarManager::scrollable_ [protected]
 

VerticalScrolling VCF::Delegate VCF::ScrollbarManager::ScrollDelegate
 

Event Delegate:
HorizontalScrolling
event class: ScrollEvent

VCF::Delegate VCF::ScrollbarManager::ScrollDelegate
 

Event Delegate:
VerticalScrolling
event class: ScrollEvent

Control* VCF::ScrollbarManager::target_ [protected]
 


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