GClasses

GClasses::GWidgetTextTab Class Reference

Represents a tab (like for tabbed menus, etc.) More...

#include <GWidgets.h>

Inheritance diagram for GClasses::GWidgetTextTab:
GClasses::GWidgetAtomic GClasses::GWidget

List of all members.

Public Member Functions

 GWidgetTextTab (GWidgetGroup *pParent, int x, int y, int w, int h, const char *szText, unsigned int cBackground=0xff6600aa)
virtual ~GWidgetTextTab ()
virtual WidgetType type ()
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y)
void setText (const char *szText)
 sets the tab text
bool isSelected ()
 returns "true" if the tab is currently selected
void setSelected (bool selected)
 sets the tab as selected or not selected

Protected Member Functions

virtual void grab (int button, int x, int y)
virtual void release (int button)

Protected Attributes

std::string m_text
unsigned int m_cBackground
bool m_selected

Detailed Description

Represents a tab (like for tabbed menus, etc.)


Constructor & Destructor Documentation

GClasses::GWidgetTextTab::GWidgetTextTab ( GWidgetGroup pParent,
int  x,
int  y,
int  w,
int  h,
const char *  szText,
unsigned int  cBackground = 0xff6600aa 
)
virtual GClasses::GWidgetTextTab::~GWidgetTextTab ( ) [virtual]

Member Function Documentation

virtual void GClasses::GWidgetTextTab::draw ( GImage pCanvas,
int  x,
int  y 
) [virtual]

Draws this widget on pCanvas at (x,y)

Implements GClasses::GWidget.

virtual void GClasses::GWidgetTextTab::grab ( int  button,
int  x,
int  y 
) [protected, virtual]

Reimplemented from GClasses::GWidgetAtomic.

bool GClasses::GWidgetTextTab::isSelected ( ) [inline]

returns "true" if the tab is currently selected

virtual void GClasses::GWidgetTextTab::release ( int  button) [protected, virtual]

Reimplemented from GClasses::GWidgetAtomic.

void GClasses::GWidgetTextTab::setSelected ( bool  selected)

sets the tab as selected or not selected

void GClasses::GWidgetTextTab::setText ( const char *  szText)

sets the tab text

virtual WidgetType GClasses::GWidgetTextTab::type ( ) [inline, virtual]

Implements GClasses::GWidget.


Member Data Documentation

unsigned int GClasses::GWidgetTextTab::m_cBackground [protected]
std::string GClasses::GWidgetTextTab::m_text [protected]