TabbedArea Class Reference

#include <tabbedarea.h>

List of all members.


Detailed Description

A tabbed area, the same as the guichan tabbed area in 0.8, but extended.

Definition at line 36 of file tabbedarea.h.


Public Member Functions

 TabbedArea ()
 Constructor.
void draw (gcn::Graphics *graphics)
 Draw the tabbed area.
int getNumberOfTabs () const
 Return how many tabs have been created.
TabgetTab (const std::string &name) const
 Return tab with specified name as caption.
gcn::Widget * getWidget (const std::string &name) const
 Returns the widget with the tab that has specified caption.
void addTab (const std::string &caption, gcn::Widget *widget)
 Add a tab.
void removeTab (Tab *tab)
 Overload the remove tab function as it's broken in guichan 0.8.
void logic ()
 Overload the logic function since it's broken in guichan 0.8.
int getContainerHeight () const
void setSelectedTab (unsigned int index)
void setSelectedTab (gcn::Tab *tab)

Private Types

typedef std::vector< std::pair
< gcn::Tab *, gcn::Widget * > > 
TabContainer

Member Typedef Documentation

typedef std::vector< std::pair<gcn::Tab*, gcn::Widget*> > TabbedArea::TabContainer [private]

Definition at line 96 of file tabbedarea.h.


Constructor & Destructor Documentation

TabbedArea::TabbedArea (  ) 

Constructor.

Definition at line 27 of file tabbedarea.cpp.


Member Function Documentation

void TabbedArea::draw ( gcn::Graphics *  graphics  ) 

Draw the tabbed area.

Definition at line 50 of file tabbedarea.cpp.

int TabbedArea::getNumberOfTabs (  )  const

Return how many tabs have been created.

Todo:
Remove this method when upgrading to Guichan 0.9.0

Definition at line 32 of file tabbedarea.cpp.

Tab * TabbedArea::getTab ( const std::string &  name  )  const

Return tab with specified name as caption.

Definition at line 37 of file tabbedarea.cpp.

gcn::Widget * TabbedArea::getWidget ( const std::string &  name  )  const

Returns the widget with the tab that has specified caption.

Definition at line 58 of file tabbedarea.cpp.

void TabbedArea::addTab ( const std::string &  caption,
gcn::Widget *  widget 
)

Add a tab.

Overridden since it needs to create an instance of Tab instead of gcn::Tab.

Parameters:
caption The Caption to display
widget The widget to show when tab is selected

Definition at line 72 of file tabbedarea.cpp.

void TabbedArea::removeTab ( Tab tab  ) 

Overload the remove tab function as it's broken in guichan 0.8.

Definition at line 81 of file tabbedarea.cpp.

void TabbedArea::logic (  ) 

Overload the logic function since it's broken in guichan 0.8.

Definition at line 131 of file tabbedarea.cpp.

int TabbedArea::getContainerHeight (  )  const [inline]

Definition at line 87 of file tabbedarea.h.

void TabbedArea::setSelectedTab ( unsigned int  index  )  [inline]

Definition at line 90 of file tabbedarea.h.

void TabbedArea::setSelectedTab ( gcn::Tab *  tab  ) 

Definition at line 136 of file tabbedarea.cpp.


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

Generated on Sun Apr 26 17:30:44 2009 for The Mana World by  doxygen 1.5.5