sptk2 logo
SPTK Home Page

sptk::CScroll Class Reference
[GUI Classes]

Scroll area widget. More...

#include <CScroll.h>

Inheritance diagram for sptk::CScroll:

sptk::CLayoutManager sptk::CLayoutClient sptk::CTreeControl

List of all members.

Public Member Functions

 CScroll (const char *label=0, int layoutSize=10, CLayoutAlign layoutAlign=SP_ALIGN_TOP)
 Constructor in SPTK style.
virtual void resize (int x, int y, int w, int h)
 Resizes the group and inside widgets.
virtual void draw ()
 Custom draw() method.
virtual bool preferredSize (int &w, int &h)
 Computes the optimal group size.
virtual void clear ()
 Removes all the child widgets.
virtual void position (int X, int Y)
 Sets the position of the scrolled area.
int xposition () const
 Returns the x-position of the scrolled area.
int yposition () const
 Returns the y-position of the scrolled area.
int handle (int)
 Custom handle method.
std::string label () const
 Returns the current label.
void label (const char *lbl)
 Sets the new label.
void label (const std::string &lbl)
virtual std::string className () const
 Returns widget class name (internal SPTK RTTI).

Static Public Member Functions

static CLayoutClientcreator (CXmlNode *node)
 Creates a widget based on the XML node information.

Public Attributes

CScrollBar scrollbar
 Vertical scrollbar.
CScrollBar hscrollbar
 Horizontal scrollbar.


Detailed Description

Scroll area widget.

Extended version of FLTK Fl_Group that can be a layout manager and layout client at the same time.


Constructor & Destructor Documentation

sptk::CScroll::CScroll ( const char *  label = 0,
int  layoutSize = 10,
CLayoutAlign  layoutAlign = SP_ALIGN_TOP 
)

Constructor in SPTK style.

Parameters:
label const char *, label
layoutSize int, widget align in layout
layoutAlign CLayoutAlign, widget align in layout


Member Function Documentation

static CLayoutClient* sptk::CScroll::creator ( CXmlNode node  )  [static]

Creates a widget based on the XML node information.

Parameters:
node CXmlNode*, an XML node with widget information

void sptk::CScroll::label ( const std::string &  lbl  )  [inline]

Sets label for the group, makes an internal copy of the string

Parameters:
lbl const string&, new label

Reimplemented from sptk::CLayoutClient.

References label().

void sptk::CScroll::label ( const char *  lbl  )  [inline]

Sets the new label.

Parameters:
lbl const char*, new label

Reimplemented from sptk::CLayoutClient.

References label().

virtual bool sptk::CScroll::preferredSize ( int &  w,
int &  h 
) [virtual]

Computes the optimal group size.

Parameters:
w int&, input - width offered by the program, output - width required by widget
h int&, input - height offered by the program, output - height required by widget
Returns:
true if the size is stable (doesn't depend on input sizes)

Reimplemented from sptk::CLayoutClient.

virtual void sptk::CScroll::resize ( int  x,
int  y,
int  w,
int  h 
) [virtual]

Resizes the group and inside widgets.

Parameters:
x int, x-position
y int, y-position
w int, width
h int, height


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

Mon Mar 5 11:56:18 2012: SPTK 3.5.7