GClasses
GClasses::GWidgetTextTab Class Reference

Detailed Description

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

#include <GWidgets.h>

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

Public Member Functions

 GWidgetTextTab (GWidgetGroup *pParent, int x, int y, int w, int h, const char *szText, unsigned int cBackground=0xff6600aa)
 
virtual ~GWidgetTextTab ()
 
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y) More...
 
bool isSelected ()
 returns "true" if the tab is currently selected More...
 
void setSelected (bool selected)
 sets the tab as selected or not selected More...
 
void setText (const char *szText)
 sets the tab text More...
 
virtual WidgetType type ()
 
- Public Member Functions inherited from GClasses::GWidgetAtomic
 GWidgetAtomic (GWidgetGroup *pParent, int x, int y, int w, int h)
 
virtual ~GWidgetAtomic ()
 
virtual bool isAtomic ()
 
virtual bool isClickable ()
 
virtual void onChar (char c)
 
virtual void onGetFocus ()
 
virtual void onLoseFocus ()
 
virtual void onMouseMove (int dx, int dy)
 
virtual void onSpecialKey (int key)
 
- Public Member Functions inherited from GClasses::GWidget
 GWidget (GWidgetGroup *m_pParent, int x, int y, int w, int h)
 
virtual ~GWidget ()
 
int id ()
 
GWidgetGroupparent ()
 
GRectrect ()
 
void setPos (int x, int y)
 

Protected Member Functions

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

Protected Attributes

unsigned int m_cBackground
 
bool m_selected
 
std::string m_text
 
- Protected Attributes inherited from GClasses::GWidget
GWidgetCommonm_common
 
int m_nID
 
GWidgetGroupm_pParent
 
GRect m_rect
 

Additional Inherited Members

- Public Types inherited from GClasses::GWidget

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 
)
protectedvirtual

Reimplemented from GClasses::GWidgetAtomic.

bool GClasses::GWidgetTextTab::isSelected ( )
inline

returns "true" if the tab is currently selected

virtual void GClasses::GWidgetTextTab::release ( int  button)
protectedvirtual

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 ( )
inlinevirtual

Implements GClasses::GWidget.

Member Data Documentation

unsigned int GClasses::GWidgetTextTab::m_cBackground
protected
bool GClasses::GWidgetTextTab::m_selected
protected
std::string GClasses::GWidgetTextTab::m_text
protected