GClasses

GClasses::GWidgetBulletGroup Class Reference

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

#include <GWidgets.h>

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

List of all members.

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.
virtual ~GWidgetBulletGroup ()
virtual WidgetType type ()
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y)
void setSelection (int n)
 Sets which bullet hole has a dot in it.
int selection ()
 Returns the index of the bullet hole with the dot in it.

Protected Member Functions

virtual void onCheckBulletHole (GWidgetBulletHole *pBullet)
virtual void tattle (GWidget *pChild)

Protected Attributes

int m_nSelection

Detailed Description

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


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) [protected, virtual]

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) [protected, virtual]

Reimplemented from GClasses::GWidgetGroup.

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

Implements GClasses::GWidget.


Member Data Documentation