CrystalSpace

Public API Reference

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

csNotebook Class Reference
[Notebook]

A notebook (also called "property sheet") is a collection of dialogs enclosed in a single window. More...

#include <csws/csnotebk.h>

Inheritance diagram for csNotebook:

csComponent List of all members.

Public Member Functions

 csNotebook (csComponent *iParent, int iStyle=CSNBS_DEFAULTVALUE)
 Create a notebook component with given parent and style.
virtual ~csNotebook ()
 Destroy the notebook object.
virtual void Draw ()
 Draw the notebook.
virtual bool HandleEvent (iEvent &Event)
 Handle external events.
virtual bool SetRect (int xmin, int ymin, int xmax, int ymax)
 Reposition knobs on resize.
int GetStyle ()
 Query notebook style.
void SetStyle (int iStyle)
 Change notebook style on-the-fly.
bool AddPrimaryTab (csComponent *iComponent, const char *iText, const char *iInfo=0, csComponent *iBefore=0)
 Add a primary tab: page info can differ from page title.
bool AddSecondaryTab (csComponent *iComponent, const char *iInfo, csComponent *iBefore=0)
 Add a secondary tab (no page title).
bool AddPrimaryTab (csComponent *iComponent, csPixmap *iPixmap, bool iDeletePixmap=true, const char *iInfo=0, csComponent *iBefore=0)
 Same but use a pixmap as tab label rather than a text string.
bool DeleteTab (size_t iIndex)
 Delete a tab and associated component by index.
bool DeleteTab (csComponent *iComponent)
 Delete a tab and associated component.
bool SelectTab (size_t iIndex)
 Select a particular tab (by index).
bool SelectTab (csComponent *iComponent)
 Select a particular tab (by component).

Protected Member Functions

void PlaceGadgets ()
 Reposition current page, forward/backward buttons etc.
bool AddTab (cspPageData *iPageData, const char *iInfo, csComponent *iBefore)
 Common part for AddXXXTab ().
void GetClientRect (csRect &oRect)
 Compute client rectangle size.
int InfoHeight ()
 Compute the height of information line.
bool GetTabSize (size_t iTab, int &oW, int &oH)
 Compute the size of a single tab.
bool InsideTab (size_t iIndex, int x, int y)
 Check if given x,y lies inside a tab.
size_t FindPage (csComponent *iComponent)
 Find page index given page pointer.

Protected Attributes

int tabx
 Secondary data (can be derived from other data but is cached for speed).
int taby
 Secondary data (can be derived from other data but is cached for speed).
int tabw
 Secondary data (can be derived from other data but is cached for speed).
int tabh
 Secondary data (can be derived from other data but is cached for speed).

Detailed Description

A notebook (also called "property sheet") is a collection of dialogs enclosed in a single window.

The dialogs are divided into several groups, each group gets its own "tab" on one of the sides of the notebook. By clicking the "tab" you switch to that group of dialogs, every group can consist of several dialogs that are switched with a minor arrow control in one of the corners of the notebook.

Definition at line 136 of file csnotebk.h.


Constructor & Destructor Documentation

csNotebook::csNotebook csComponent iParent,
int  iStyle = CSNBS_DEFAULTVALUE
 

Create a notebook component with given parent and style.

virtual csNotebook::~csNotebook  )  [virtual]
 

Destroy the notebook object.


Member Function Documentation

bool csNotebook::AddPrimaryTab csComponent iComponent,
csPixmap iPixmap,
bool  iDeletePixmap = true,
const char *  iInfo = 0,
csComponent iBefore = 0
 

Same but use a pixmap as tab label rather than a text string.

bool csNotebook::AddPrimaryTab csComponent iComponent,
const char *  iText,
const char *  iInfo = 0,
csComponent iBefore = 0
 

Add a primary tab: page info can differ from page title.

bool csNotebook::AddSecondaryTab csComponent iComponent,
const char *  iInfo,
csComponent iBefore = 0
 

Add a secondary tab (no page title).

bool csNotebook::AddTab cspPageData *  iPageData,
const char *  iInfo,
csComponent iBefore
[protected]
 

Common part for AddXXXTab ().

bool csNotebook::DeleteTab csComponent iComponent  ) 
 

Delete a tab and associated component.

bool csNotebook::DeleteTab size_t  iIndex  ) 
 

Delete a tab and associated component by index.

virtual void csNotebook::Draw  )  [virtual]
 

Draw the notebook.

Reimplemented from csComponent.

size_t csNotebook::FindPage csComponent iComponent  )  [protected]
 

Find page index given page pointer.

void csNotebook::GetClientRect csRect oRect  )  [protected]
 

Compute client rectangle size.

int csNotebook::GetStyle  )  [inline]
 

Query notebook style.

Definition at line 194 of file csnotebk.h.

bool csNotebook::GetTabSize size_t  iTab,
int &  oW,
int &  oH
[protected]
 

Compute the size of a single tab.

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

Handle external events.

Reimplemented from csComponent.

int csNotebook::InfoHeight  )  [protected]
 

Compute the height of information line.

bool csNotebook::InsideTab size_t  iIndex,
int  x,
int  y
[protected]
 

Check if given x,y lies inside a tab.

void csNotebook::PlaceGadgets  )  [protected]
 

Reposition current page, forward/backward buttons etc.

bool csNotebook::SelectTab csComponent iComponent  ) 
 

Select a particular tab (by component).

bool csNotebook::SelectTab size_t  iIndex  ) 
 

Select a particular tab (by index).

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

Reposition knobs on resize.

Reimplemented from csComponent.

void csNotebook::SetStyle int  iStyle  ) 
 

Change notebook style on-the-fly.


Member Data Documentation

int csNotebook::tabh [protected]
 

Secondary data (can be derived from other data but is cached for speed).

Definition at line 221 of file csnotebk.h.

int csNotebook::tabw [protected]
 

Secondary data (can be derived from other data but is cached for speed).

Definition at line 221 of file csnotebk.h.

int csNotebook::tabx [protected]
 

Secondary data (can be derived from other data but is cached for speed).

Definition at line 221 of file csnotebk.h.

int csNotebook::taby [protected]
 

Secondary data (can be derived from other data but is cached for speed).

Definition at line 221 of file csnotebk.h.


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