CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csListBox Class Reference
[List box]

List box class is a rectangle which contains a number of list box items. More...

#include <csws/cslistbx.h>

Inheritance diagram for csListBox:

csComponent List of all members.

Public Member Functions

 csListBox (csComponent *iParent, int iStyle=CSLBS_DEFAULTVALUE, csListBoxFrameStyle iFrameStyle=cslfsThickRect)
 Create input line object.
 ~csListBox ()
 Destructor - cleans up the frame bitmap.
virtual bool HandleEvent (iEvent &Event)
 Handle external events and generate timeouts.
void PlaceItems (bool setscrollbars=true)
 Find a place for each menu item.
virtual bool SetRect (int xmin, int ymin, int xmax, int ymax)
 Resize child items on parent window resize.
void SuggestSize (int &w, int &h)
 Get the recommended size from the slice.
csComponentForEachItem (bool(*func)(csComponent *child, void *param), void *param=0, bool iSelected=true)
 For each listbox item call a function with a optional arg Function returns the first child on which func returnes 'true'.
virtual void SetState (int mask, bool enable)
 Override SetState method to disable scroll bars as well.
virtual bool SetFocused (csComponent *comp)
 Tell parent that a new item has been selected.
virtual void Insert (csComponent *comp)
 Set fPlaceItems since a item has been inserted.
virtual void Delete (csComponent *comp)
 Set fPlaceItems since a item has been removed.
void SetFrameBitmap (csPixmap *iFrameBitmap, bool iDelFrameBitmap=false)
 Set the frame bitmap (only useful when FrameStyle is cslfsBitmap).
void SetTexture (csPixmap *iTexture, bool iDelFrameBitmap=false)
 Set the background texture (only useful when FrameStyle is cslfsTextured).
void SetAlpha (uint8 iAlpha)
 Set the frame's alpha.
virtual char * GetSkinName ()
 Get the name of the skip slice for this component.
int GetListBoxStyle ()
 Get List box style.
csListBoxFrameStyle GetFrameStyle ()
 Get List box frame style.
void GetBorderSize (int *iBorderWidth, int *iBorderHeight)
 Get List box frame width and height.
int VerticalCount ()
 Get number of items that fits vertically.
csScrollBarGetHScroll ()
 Get the horizontal scroll bar.
csScrollBarGetVScroll ()
 Get the vertical scroll bar.
int GetDeltaX ()
 Get horizontal scrolling position.
int GetMaxDeltaX ()
 Get horizontal scrolling maximum.
bool GetPlaceItemsFlag ()
 Get place items before redraw flag.
csPixmapGetFrameBitmap ()
 Get frame bitmap or texture bitmap (same item, meaning just depends on FrameStyle).
uint8 GetAlpha ()
 Get the alpha for the listbox.

Protected Member Functions

void MakeItemVisible (csComponent *item)
 Make a listbox item visible (same as cscmdListBoxMakeVisible).

Detailed Description

List box class is a rectangle which contains a number of list box items.

List box can have only one selected item at a time (if CSLBS_MULTIPLESEL style is not specified) or have multiple selected items at a time (if that style flag is set).

Definition at line 293 of file cslistbx.h.


Constructor & Destructor Documentation

csListBox::csListBox csComponent iParent,
int  iStyle = CSLBS_DEFAULTVALUE,
csListBoxFrameStyle  iFrameStyle = cslfsThickRect
 

Create input line object.

csListBox::~csListBox  ) 
 

Destructor - cleans up the frame bitmap.


Member Function Documentation

virtual void csListBox::Delete csComponent comp  )  [virtual]
 

Set fPlaceItems since a item has been removed.

Reimplemented from csComponent.

csComponent* csListBox::ForEachItem bool(*)(csComponent *child, void *param)  func,
void *  param = 0,
bool  iSelected = true
 

For each listbox item call a function with a optional arg Function returns the first child on which func returnes 'true'.

uint8 csListBox::GetAlpha  )  [inline]
 

Get the alpha for the listbox.

Definition at line 421 of file cslistbx.h.

void csListBox::GetBorderSize int *  iBorderWidth,
int *  iBorderHeight
 

Get List box frame width and height.

int csListBox::GetDeltaX  )  [inline]
 

Get horizontal scrolling position.

Definition at line 405 of file cslistbx.h.

csPixmap* csListBox::GetFrameBitmap  )  [inline]
 

Get frame bitmap or texture bitmap (same item, meaning just depends on FrameStyle).

Definition at line 417 of file cslistbx.h.

csListBoxFrameStyle csListBox::GetFrameStyle  )  [inline]
 

Get List box frame style.

Definition at line 386 of file cslistbx.h.

References csListBoxFrameStyle.

csScrollBar* csListBox::GetHScroll  )  [inline]
 

Get the horizontal scroll bar.

Definition at line 397 of file cslistbx.h.

int csListBox::GetListBoxStyle  )  [inline]
 

Get List box style.

Definition at line 382 of file cslistbx.h.

int csListBox::GetMaxDeltaX  )  [inline]
 

Get horizontal scrolling maximum.

Definition at line 409 of file cslistbx.h.

bool csListBox::GetPlaceItemsFlag  )  [inline]
 

Get place items before redraw flag.

Definition at line 413 of file cslistbx.h.

virtual char* csListBox::GetSkinName  )  [inline, virtual]
 

Get the name of the skip slice for this component.

Reimplemented from csComponent.

Definition at line 373 of file cslistbx.h.

csScrollBar* csListBox::GetVScroll  )  [inline]
 

Get the vertical scroll bar.

Definition at line 401 of file cslistbx.h.

virtual bool csListBox::HandleEvent iEvent Event  )  [virtual]
 

Handle external events and generate timeouts.

Reimplemented from csComponent.

virtual void csListBox::Insert csComponent comp  )  [virtual]
 

Set fPlaceItems since a item has been inserted.

Reimplemented from csComponent.

void csListBox::MakeItemVisible csComponent item  )  [protected]
 

Make a listbox item visible (same as cscmdListBoxMakeVisible).

void csListBox::PlaceItems bool  setscrollbars = true  ) 
 

Find a place for each menu item.

void csListBox::SetAlpha uint8  iAlpha  ) 
 

Set the frame's alpha.

virtual bool csListBox::SetFocused csComponent comp  )  [virtual]
 

Tell parent that a new item has been selected.

Reimplemented from csComponent.

void csListBox::SetFrameBitmap csPixmap iFrameBitmap,
bool  iDelFrameBitmap = false
 

Set the frame bitmap (only useful when FrameStyle is cslfsBitmap).

virtual bool csListBox::SetRect int  xmin,
int  ymin,
int  xmax,
int  ymax
[virtual]
 

Resize child items on parent window resize.

Reimplemented from csComponent.

virtual void csListBox::SetState int  mask,
bool  enable
[virtual]
 

Override SetState method to disable scroll bars as well.

Reimplemented from csComponent.

void csListBox::SetTexture csPixmap iTexture,
bool  iDelFrameBitmap = false
 

Set the background texture (only useful when FrameStyle is cslfsTextured).

void csListBox::SuggestSize int &  w,
int &  h
[virtual]
 

Get the recommended size from the slice.

Reimplemented from csComponent.

int csListBox::VerticalCount  )  [inline]
 

Get number of items that fits vertically.

Definition at line 393 of file cslistbx.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1