- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# CScrollbar Class Reference

a scrollbar control More...

`#include <cscrollview.h>`

Inheritance diagram for CScrollbar:

List of all members.

## Public Types
enum | { kHorizontal, kVertical }
## Public Member Functions
| CScrollbar (const CRect &size, CControlListener *listener, long tag, long style, const CRect &scrollSize)
virtual | ~CScrollbar ()
virtual void | setDrawer (IScrollbarDrawer *d)
virtual void | setScrollSize (const CRect &ssize)
virtual void | setStep (float newStep)
CRect & | getScrollSize (CRect &rect) const
float | getStep () const
virtual void | setFrameColor (const CColor &color)
virtual void | setScrollerColor (const CColor &color)
virtual void | setBackgroundColor (const CColor &color)
CColor | getFrameColor () const
CColor | getScrollerColor () const
CColor | getBackgroundColor () const
virtual void | draw (CDrawContext *pContext)
| called if the view should draw itself
virtual void | mouse (CDrawContext *pContext, CPoint &where, long buttons=-1)
| called if a mouse click event occurs
virtual bool | onWheel (CDrawContext *pContext, const CPoint &where, float distance)
| called if a mouse wheel event is happening over this view
## Protected Member Functions
void | drawBackground (CDrawContext *pContext)
void | drawScroller (CDrawContext *pContext, const CRect &size)
void | calculateScrollerLength ()
CRect | getScrollerRect ()
## Protected Attributes
long | style
CRect | scrollSize
CRect | scrollerArea
float | stepValue
CCoord | scrollerLength
CColor | frameColor
CColor | scrollerColor
CColor | backgroundColor
IScrollbarDrawer * | drawer

## Detailed Description

a scrollbar control

## Member Enumeration Documentation

anonymous enum

  | Enumerator:
  kHorizontal |
  kVertical |

## Constructor & Destructor Documentation

CScrollbar::CScrollbar | ( | const CRect & | size,
|  | CControlListener * | listener,
|  | long | tag,
|  | long | style,
|  | const CRect & | scrollSize
| ) |

CScrollbar::~CScrollbar | ( |  | ) | `[virtual]`

## Member Function Documentation

void CScrollbar::calculateScrollerLength | ( |  | ) | `[protected]`

void CScrollbar::draw | ( | CDrawContext * | pContext | ) | `[virtual]`

| called if the view should draw itself Implements CControl.

void CScrollbar::drawBackground | ( | CDrawContext * | pContext | ) | `[protected]`

void CScrollbar::drawScroller | ( | CDrawContext * | pContext,
|  | const CRect & | size
| ) | `[protected]`

CColor CScrollbar::getBackgroundColor | ( |  | ) | const`[inline]`

CColor CScrollbar::getFrameColor | ( |  | ) | const`[inline]`

CColor CScrollbar::getScrollerColor | ( |  | ) | const`[inline]`

CRect CScrollbar::getScrollerRect | ( |  | ) | `[protected]`

CRect& CScrollbar::getScrollSize | ( | CRect & | rect | ) | const`[inline]`

float CScrollbar::getStep | ( |  | ) | const`[inline]`

void CScrollbar::mouse | ( | CDrawContext * | pContext,
|  | CPoint & | where,
|  | long | buttons = `-1`
| ) | `[virtual]`

| called if a mouse click event occurs Reimplemented from CView.

bool CScrollbar::onWheel | ( | CDrawContext * | pContext,
|  | const CPoint & | where,
|  | float | distance
| ) | `[virtual]`

| called if a mouse wheel event is happening over this view Reimplemented from CView.

virtual void CScrollbar::setBackgroundColor | ( | const CColor & | color | ) | `[inline, virtual]`

virtual void CScrollbar::setDrawer | ( | IScrollbarDrawer * | d | ) | `[inline, virtual]`

virtual void CScrollbar::setFrameColor | ( | const CColor & | color | ) | `[inline, virtual]`

virtual void CScrollbar::setScrollerColor | ( | const CColor & | color | ) | `[inline, virtual]`

void CScrollbar::setScrollSize | ( | const CRect & | ssize | ) | `[virtual]`

virtual void CScrollbar::setStep | ( | float | newStep | ) | `[inline, virtual]`

## Member Data Documentation

CColor CScrollbar::backgroundColor`[protected]`

IScrollbarDrawer* CScrollbar::drawer`[protected]`

CColor CScrollbar::frameColor`[protected]`

CRect CScrollbar::scrollerArea`[protected]`

CColor CScrollbar::scrollerColor`[protected]`

CCoord CScrollbar::scrollerLength`[protected]`

CRect CScrollbar::scrollSize`[protected]`

float CScrollbar::stepValue`[protected]`

long CScrollbar::style`[protected]`

The documentation for this class was generated from the following files:

- cscrollview.h
- cscrollview.cpp

Empty

Copyright ©2006 Steinberg Media Technologies. All Rights Reserved.