class MASKING_DLL_DECLSPEC ScrollBox
This is a widget that can display something that is larger than the area of the widget on the screen.
Inheritance:
Public Methods
-
ScrollBox()
- Default constructor
-
int GetXOffset()
- get the horizontal scroll position
-
int GetYOffset()
- get the vertical scroll position
-
void SetScrollSize(int width, int height)
- Set the size of the scroll area.
-
void SetPos(int x, int y)
- set the horizontal & vertical scroll position.
-
void Center()
- scroll to the center of the scroll area
-
void SetScrollOption(int newhopt, int newvopt)
- set the horizontal and vertical scrollbars on, off or automatic.
-
int GetHScrollOption()
- returns ScrollBox::SCROLLER_OFF, ScrollBox::SCROLLER_AUTO or ScrollBox::SCROLLER_ON depending on the state of the Horizontal Scrollbar
-
int GetVScrollOption()
- returns ScrollBox::SCROLLER_OFF, ScrollBox::SCROLLER_AUTO or ScrollBox::SCROLLER_ON depending on the state of the Vertical Scrollbar
-
void SetHorizontalIncrement( int inc )
- Sets the increment value for horizontal scroller.
-
void SetVerticalIncrement( int inc )
- Sets the increment value for vertical scroller.
-
int GetHorizontalIncrement( void )
- Gets the increment value for horizontal scroller
-
int GetVerticalIncrement( void )
- Gets the increment value for vertical scroller
-
void ScrollTo(int x, int y)
- Scrolls to the specified position
-
void ScrollToX(int x)
- Scrolls to the specified position (horizontally)
-
void ScrollToY(int y)
- Scrolls to the specified position (horizontally)
Public Members
-
enum Possible Scrollbar states.
Protected Methods
-
virtual void DrawClientArea(Bitmap &dest, int xofst, int yofst)
- override this to provide a way to draw the content of your derived scrollbox
Documentation
This is a widget that can display something that is larger than the area of the widget on the screen.
It provides scrollbars to be able to scroll through the content of this widget.
everything that has optional (h and/or v) scrollbars should be derived from this.
The first thing you should do is override the DrawClientArea function to provide a way to
draw the content of your derived scrollbox.
virtual void DrawClientArea(Bitmap &dest, int xofst, int yofst)
-
override this to provide a way to draw the content of your derived scrollbox
enum Possible Scrollbar states.
-
Possible Scrollbar states.
SCROLLER_OFF
SCROLLER_ON
SCROLLER_AUTO
ScrollBox()
-
Default constructor
int GetXOffset()
-
get the horizontal scroll position
int GetYOffset()
-
get the vertical scroll position
void SetScrollSize(int width, int height)
-
Set the size of the scroll area. If this is more than the widget area and the scrollbar option is set to automatic,
scrollbars will appear automatically.
void SetPos(int x, int y)
-
set the horizontal & vertical scroll position.
note: perhaps this shoud be renamed to ScrollTo (x, y) or SetOffset (x, y)
void Center()
-
scroll to the center of the scroll area
void SetScrollOption(int newhopt, int newvopt)
-
set the horizontal and vertical scrollbars on, off or automatic. Use the enum values ScrollBox::SCROLLER_ON,
ScrollBox::SCROLLER_OFF or ScrollBox::SCROLLER_AUTO. In the last case scrollbars are on only if they are needed, i.e.
when the scroll area is larger than the widget area.
int GetHScrollOption()
-
returns ScrollBox::SCROLLER_OFF, ScrollBox::SCROLLER_AUTO or ScrollBox::SCROLLER_ON depending on
the state of the Horizontal Scrollbar
int GetVScrollOption()
-
returns ScrollBox::SCROLLER_OFF, ScrollBox::SCROLLER_AUTO or ScrollBox::SCROLLER_ON depending on
the state of the Vertical Scrollbar
void SetHorizontalIncrement( int inc )
-
Sets the increment value for horizontal scroller. Used when scrolling with the
keyboard (arrow keys) or by clicking on the scroller background. Inc must be a
positive value. Default is 1.
void SetVerticalIncrement( int inc )
-
Sets the increment value for vertical scroller. Used when scrolling with the
keyboard (arrow keys) or by clicking on the scroller background. Inc must be a
positive value. Default is 1.
int GetHorizontalIncrement( void )
-
Gets the increment value for horizontal scroller
int GetVerticalIncrement( void )
-
Gets the increment value for vertical scroller
void ScrollTo(int x, int y)
-
Scrolls to the specified position
void ScrollToX(int x)
-
Scrolls to the specified position (horizontally)
void ScrollToY(int y)
-
Scrolls to the specified position (horizontally)
- Direct child classes:
- TextArea
ListBoxEx
Alphabetic index Hierarchy of classes
Back to front page
|
page generated with DOC++