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

FX::FXScrollBar Class Reference

The scroll bar is used when a document has a larger content than may be made visible. More...

#include <FXScrollBar.h>

Inheritance diagram for FX::FXScrollBar:

FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject List of all members.

Public Types

enum  {
  ID_TIMEWHEEL = FXWindow::ID_LAST,
  ID_AUTOSCROLL,
  ID_LAST
}

Public Member Functions

 FXScrollBar (FXComposite *p, FXObject *tgt=NULL, FXSelector sel=0, FXuint opts=SCROLLBAR_VERTICAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
virtual FXint getDefaultWidth ()
virtual FXint getDefaultHeight ()
virtual void layout ()
void setRange (FXint r)
FXint getRange () const
void setPage (FXint p)
FXint getPage () const
void setLine (FXint l)
FXint getLine () const
void setPosition (FXint p)
FXint getPosition () const
void setHiliteColor (FXColor clr)
FXColor getHiliteColor () const
void setShadowColor (FXColor clr)
FXColor getShadowColor () const
void setBorderColor (FXColor clr)
FXColor getBorderColor () const
void setArrowColor (FXColor clr)
FXColor getArrowColor () const
FXuint getScrollbarStyle () const
void setScrollbarStyle (FXuint style)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXScrollBar ()

Detailed Description

The scroll bar is used when a document has a larger content than may be made visible.

The range is the total size of the document, the page is the part of the document which is visible. The size of the scrollbar thumb is adjusted to give feedback of the relative sizes of each. The scroll bar may be manipulated by the left mouse (normal scrolling), right mouse (vernier or fine-scrolling), or middle mouse (same as the left mouse only the scroll position can hop to the place where the click is made). Finally, if the mouse sports a wheel, the scroll bar can be manipulated by means of the mouse wheel as well. Holding down the Control-key during wheel motion will cause the scrolling to go faster than normal. While moving the scroll bar, a message of type SEL_CHANGED will be sent to the target, and the message data will reflect the current position of type FXint. At the end of the interaction, the scroll bar will send a message of type SEL_COMMAND to notify the target of the final position.

See also:


Constructor & Destructor Documentation

FX::FXScrollBar::FXScrollBar FXComposite p,
FXObject tgt = NULL,
FXSelector  sel = 0,
FXuint  opts = SCROLLBAR_VERTICAL,
FXint  x = 0,
FXint  y = 0,
FXint  w = 0,
FXint  h = 0
 

Construct scroll bar.

virtual FX::FXScrollBar::~FXScrollBar  )  [virtual]
 

Destructor.


Member Function Documentation

virtual FXint FX::FXScrollBar::getDefaultWidth  )  [virtual]
 

Return default width.

Reimplemented from FX::FXWindow.

virtual FXint FX::FXScrollBar::getDefaultHeight  )  [virtual]
 

Return default height.

Reimplemented from FX::FXWindow.

virtual void FX::FXScrollBar::layout  )  [virtual]
 

Perform layout.

Reimplemented from FX::FXWindow.

void FX::FXScrollBar::setRange FXint  r  ) 
 

Set content size range.

FXint FX::FXScrollBar::getRange  )  const [inline]
 

Return content size range.

void FX::FXScrollBar::setPage FXint  p  ) 
 

Set viewport page size.

FXint FX::FXScrollBar::getPage  )  const [inline]
 

Return page size.

void FX::FXScrollBar::setLine FXint  l  ) 
 

Set scoll increment for line.

FXint FX::FXScrollBar::getLine  )  const [inline]
 

Return line increment.

void FX::FXScrollBar::setPosition FXint  p  ) 
 

Change current scroll position.

FXint FX::FXScrollBar::getPosition  )  const [inline]
 

return scroll position

void FX::FXScrollBar::setHiliteColor FXColor  clr  ) 
 

Change highlight color.

FXColor FX::FXScrollBar::getHiliteColor  )  const [inline]
 

Return highlight color.

void FX::FXScrollBar::setShadowColor FXColor  clr  ) 
 

Change shadow color.

FXColor FX::FXScrollBar::getShadowColor  )  const [inline]
 

Return shadow color.

void FX::FXScrollBar::setBorderColor FXColor  clr  ) 
 

Return border color.

FXColor FX::FXScrollBar::getBorderColor  )  const [inline]
 

Change border color.

void FX::FXScrollBar::setArrowColor FXColor  clr  ) 
 

Return arrow color.

FXColor FX::FXScrollBar::getArrowColor  )  const [inline]
 

Return arrow color.

FXuint FX::FXScrollBar::getScrollbarStyle  )  const
 

Change the scrollbar style.

void FX::FXScrollBar::setScrollbarStyle FXuint  style  ) 
 

Get the current scrollbar style.

virtual void FX::FXScrollBar::save FXStream store  )  const [virtual]
 

Save to stream.

Reimplemented from FX::FXWindow.

virtual void FX::FXScrollBar::load FXStream store  )  [virtual]
 

Load from stream.

Reimplemented from FX::FXWindow.

Copyright © 1997-2004 Jeroen van der Zijp