sptk2 logo
SPTK Home Page

sptk::CBox Class Reference
[GUI Classes]

Simple text viewer. More...

#include <CBox.h>

Inheritance diagram for sptk::CBox:

sptk::CInput sptk::CControl sptk::CLayoutClient sptk::CSplitter

List of all members.

Public Member Functions

 CBox (const char *label=0, int layoutSize=10, CLayoutAlign layoutAlign=SP_ALIGN_TOP)
 Constructor in SPTK style.
virtual CVariant data () const
 Universal data connection, returns data from control.
virtual void data (const CVariant v)
 Universal data connection, sets data from control.
virtual CControlKind kind () const
 Returns the control kind, SPTK-style RTTI.
virtual std::string className () const
 Returns the control class name, SPTK-style RTTI.
virtual Fl_Font textFont () const
 Returns the text font type.
virtual void textFont (Fl_Font f)
 Sets the text font type.
virtual uchar textSize () const
 Returns the text font size.
virtual void textSize (uchar s)
 Sets the input text font size.
virtual uint32_t textAlign () const
 Returns the text alignment.
virtual void textAlign (uint32_t align)
 Sets the text alignment.
virtual int totalHeight (int ww=0) const
 Computes totalHeight for the text inside.
virtual void draw ()
 Custom draw method.
virtual bool preferredSize (int &w, int &h)
 Computes the optimal widget size.
virtual void resize (int x, int y, int w, int h)
 Resizes the control and inside widgets.
int handle (int event)
 Custom handle() to support drag event.
bool dragable () const
 Returns flag that allows to drag a window, if true.
void dragable (bool df)
 Sets flag that allows to drag a window, if true.

Static Public Member Functions

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


Detailed Description

Simple text viewer.

Multiple line text box (read-only)


Constructor & Destructor Documentation

sptk::CBox::CBox ( 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

virtual CControlKind sptk::CBox::kind (  )  const [inline, virtual]

Returns the control kind, SPTK-style RTTI.

See also:
CControlKind for more information

Reimplemented from sptk::CInput.

References sptk::DCV_BOX.

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

Computes the optimal widget 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::CInput.

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

Resizes the control and inside widgets.

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

Reimplemented from sptk::CControl.


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

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