Snoke
MenuItem Class Reference

#include <menu.h>

Inheritance diagram for MenuItem:
Collaboration diagram for MenuItem:

Public Member Functions

void draw ()
 
 MenuItem (const char *name, int x, int y, int width, int height)
 
- Public Member Functions inherited from Widget
void _parent (Widget *parentWidget)
 
WidgetfirstChild ()
 
WidgetlastChild ()
 
Widgetparent ()
 
void _next (Widget *nextWidget)
 
Widgetnext ()
 
void _previous (Widget *previousWidget)
 
Widgetprevious ()
 
void add (Widget *child)
 
unsigned short childLength ()
 
std::vector< Widget * > children ()
 
bool event (unsigned char name)
 
void listener (unsigned char name, Listener function)
 
void dispatch (unsigned char name)
 
 Widget ()
 

Private Attributes

int x
 
int y
 
int width
 
int height
 
const char * name
 

Additional Inherited Members

- Public Attributes inherited from Widget
WidgetparentWidget
 
Widgetstart
 
Widgetending
 
WidgetnextWidget
 
WidgetpreviousWidget
 
unsigned short length
 
unsigned char events
 
std::map< unsigned char, std::list< Listener > > listeners
 

Detailed Description

Describes menu button

Parameters
{constchar*} name - text drawn at the button

Definition at line 12 of file menu.h.

Constructor & Destructor Documentation

MenuItem::MenuItem ( const char *  name,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 14 of file menu.cpp.

Here is the caller graph for this function:

Member Function Documentation

void MenuItem::draw ( )
virtual

Draws menu item

Reimplemented from Widget.

Definition at line 6 of file menu.cpp.

Member Data Documentation

int MenuItem::height
private

Definition at line 15 of file menu.h.

const char* MenuItem::name
private

Definition at line 16 of file menu.h.

int MenuItem::width
private

Definition at line 15 of file menu.h.

int MenuItem::x
private

Definition at line 15 of file menu.h.

int MenuItem::y
private

Definition at line 15 of file menu.h.


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