Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CScrollBar Class Reference

Scrollbar widget for scrolling any. More...

#include <CUI.h>

Inheritance diagram for CScrollBar::

CWidget List of all members.

Public Methods

 CScrollBar (int x, int y, int height, CScrollable *target)
 Constructor - Takes x pos, y pos, height, and the target object to scroll. More...

 ~CScrollBar ()
 Destructor. More...

virtual int update (CInputEvent *e)
 Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not. More...

virtual void draw (CGfxScreen *S)
 Draw method - The widget should draw itslelf to the passed CGfxScreen. More...

virtual void setY (int y)
 Sets the y position of the widget. More...

void updateTarget ()

Public Attributes

CScrollablem_target

Detailed Description

Scrollbar widget for scrolling any.

A regular vertical scrollbar for scrolling any widget or object that impliments the CScrollable interface. Supports dragging, clicking, and paging.


Constructor & Destructor Documentation

CScrollBar::CScrollBar int    x,
int    y,
int    height,
CScrollable   target
 

Constructor - Takes x pos, y pos, height, and the target object to scroll.

CScrollBar::~CScrollBar  
 

Destructor.


Member Function Documentation

void CScrollBar::draw CGfxScreen   s [virtual]
 

Draw method - The widget should draw itslelf to the passed CGfxScreen.

This will be called when the screen is being redrawn. The widget should draw itself using its m_x and m_y members as a starting co-ordinate. The drawing should be all on the passed CGfxScreen or the front lcd screen with libdj.TextScreen

Reimplemented from CWidget.

void CScrollBar::setY int    y [virtual]
 

Sets the y position of the widget.

Reimplemented from CWidget.

int CScrollBar::update CInputEvent   e [virtual]
 

Update method - Recieves a CInputEvent, returns 1 if redraw is needed, 0 if not.

All keyboard and mouse (stylus) events are sent to this function. If the widget wants to trap the events, it can, and must return 1 if the screen needs to be redrawn and 0 if it does not (ie nothing happened or the action did not change the screen)

Reimplemented from CWidget.

void CScrollBar::updateTarget  
 


Member Data Documentation

CScrollable* CScrollBar::m_target
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 6 00:14:57 2001 for Dijinni by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001