GClasses
GClasses::GWidgetBulletGroup Class Reference

Detailed Description

This creates a whole group of bullets arranged either horizontally or vertically at regular intervals.

#include <GWidgets.h>

Inheritance diagram for GClasses::GWidgetBulletGroup:
GClasses::GWidgetGroup GClasses::GWidget

Public Member Functions

 GWidgetBulletGroup (GWidgetGroup *pParent, int x, int y, int w, int h, int count, int interval, bool vertical)
 "w" and "h" are the width and height of a single bullet hole. "count" is the number of bullet holes in the group. "interval" is the distance from the center of one bullet hole to the center of the next one. If "vertical" is true, they are arranged vertically starting at (x,y) downward. If "vertical" is false, they are arranged horizontally from (x,y) to the right. More...
 
virtual ~GWidgetBulletGroup ()
 
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y) More...
 
int selection ()
 Returns the index of the bullet hole with the dot in it. More...
 
void setSelection (int n)
 Sets which bullet hole has a dot in it. More...
 
virtual WidgetType type ()
 
- Public Member Functions inherited from GClasses::GWidgetGroup
 GWidgetGroup (GWidgetGroup *pParent, int x, int y, int w, int h)
 
virtual ~GWidgetGroup ()
 
GWidgetchildWidget (int n)
 
int childWidgetCount ()
 
virtual GWidgetAtomicfindAtomicWidget (int x, int y)
 
virtual bool isAtomic ()
 
virtual void onCanvasMouseDown (GWidgetCanvas *pCanvas, int button, int x, int y)
 
virtual void onCanvasMouseMove (GWidgetCanvas *pCanvas, int x, int y, bool bPressed)
 
virtual void onCanvasMouseUp (GWidgetCanvas *pCanvas, int button, int x, int y)
 
virtual void onChangeCheckBox (GWidgetCheckBox *pCheckBox)
 
virtual void onChar (char c)
 
virtual void onClickTab (GWidgetSliderTab *pTab)
 
virtual void onClickTextLabel (GWidgetTextLabel *pLabel)
 
virtual void onCustomEvent (GWidget *pWidget)
 
virtual void onDestroyWidget (GWidget *pWidget)
 
virtual void onHorizScroll (GWidgetHorizScrollBar *pScrollBar)
 
virtual void onHorizSliderMove (GWidgetHorizSlider *pSlider)
 
virtual void onPushTextButton (GWidgetTextButton *pButton)
 
virtual void onPushVCRButton (GWidgetVCRButton *pButton)
 
virtual void onReleaseImageButton (GWidgetImageButton *pButton)
 
virtual void onReleaseTextButton (GWidgetTextButton *pButton)
 
virtual void onSelectFilename (GWidgetFileSystemBrowser *pBrowser, const char *szFilename)
 
virtual void onSelectTextTab (GWidgetTextTab *pTab)
 
virtual void onSlideTab (GWidgetSliderTab *pTab, int dx, int dy)
 
virtual void onSpecialKey (int key)
 
virtual void onTextBoxPressEnter (GWidgetTextBox *pTextBox)
 
virtual void onTextBoxTextChanged (GWidgetTextBox *pTextBox)
 
virtual void onVertScroll (GWidgetVertScrollBar *pScrollBar)
 
virtual void onVertSliderMove (GWidgetVertSlider *pSlider)
 
- 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 onCheckBulletHole (GWidgetBulletHole *pBullet)
 
virtual void tattle (GWidget *pChild)
 
- Protected Member Functions inherited from GClasses::GWidgetGroup
void addWidget (GWidget *pWidget)
 
bool getDirtyBit (int nBit)
 
void setClean ()
 
void setDirtyBit (int nBit, bool bValue)
 

Protected Attributes

int m_nSelection
 
- Protected Attributes inherited from GClasses::GWidgetGroup
std::vector< unsigned int > m_dirtyBits
 
std::vector< GWidget * > m_dirtyChildren
 
std::vector< GWidget * > m_widgets
 
- 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::GWidgetBulletGroup::GWidgetBulletGroup ( GWidgetGroup pParent,
int  x,
int  y,
int  w,
int  h,
int  count,
int  interval,
bool  vertical 
)

"w" and "h" are the width and height of a single bullet hole. "count" is the number of bullet holes in the group. "interval" is the distance from the center of one bullet hole to the center of the next one. If "vertical" is true, they are arranged vertically starting at (x,y) downward. If "vertical" is false, they are arranged horizontally from (x,y) to the right.

virtual GClasses::GWidgetBulletGroup::~GWidgetBulletGroup ( )
virtual

Member Function Documentation

virtual void GClasses::GWidgetBulletGroup::draw ( GImage pCanvas,
int  x,
int  y 
)
virtual

Draws this widget on pCanvas at (x,y)

Implements GClasses::GWidget.

virtual void GClasses::GWidgetBulletGroup::onCheckBulletHole ( GWidgetBulletHole pBullet)
protectedvirtual

Reimplemented from GClasses::GWidgetGroup.

int GClasses::GWidgetBulletGroup::selection ( )
inline

Returns the index of the bullet hole with the dot in it.

void GClasses::GWidgetBulletGroup::setSelection ( int  n)

Sets which bullet hole has a dot in it.

virtual void GClasses::GWidgetBulletGroup::tattle ( GWidget pChild)
protectedvirtual

Reimplemented from GClasses::GWidgetGroup.

virtual WidgetType GClasses::GWidgetBulletGroup::type ( )
inlinevirtual

Implements GClasses::GWidget.

Member Data Documentation

int GClasses::GWidgetBulletGroup::m_nSelection
protected