Advanced Strategic Command
Public Types | Public Member Functions | List of all members
MapItemTypeWidget< MapItemType > Class Template Reference

A MapItemTypeWidget show any kind of MapItemType in a SelectionWidget It is typically generated by a BaseMapItemTypeWidgetFactory. More...

#include <edselfnt.h>

Inheritance diagram for MapItemTypeWidget< MapItemType >:
Inheritance graph
[legend]

Public Types

typedef MapItemType ItemType
 
- Public Types inherited from SelectionWidget
typedef Loki::Functor< bool,
LOKI_TYPELIST_1(const
SelectionWidget *) > 
SelectionCallBack
 

Public Member Functions

 MapItemTypeWidget (PG_Widget *parent, const PG_Point &pos, const MapItemType *mapItemType)
 
ASCString getName () const
 
const ItemTypegetItem () const
 
void display (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 
- Public Member Functions inherited from SelectionWidget
void setSelectionCallback (SelectionCallBack *callBack)
 
virtual ~SelectionWidget ()
 
virtual int gap ()
 

Additional Inherited Members

- Public Attributes inherited from SelectionWidget
sigc::signal< void, const
SelectionWidget * > 
itemSelected
 
sigc::signal< void, const
SelectionWidget * > 
itemMarked
 
- Protected Member Functions inherited from SelectionWidget
 SelectionWidget (PG_Widget *parent, const PG_Rect &rect)
 
bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 
bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 
void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 

Detailed Description

template<class MapItemType>
class MapItemTypeWidget< MapItemType >

A MapItemTypeWidget show any kind of MapItemType in a SelectionWidget It is typically generated by a BaseMapItemTypeWidgetFactory.

Definition at line 56 of file edselfnt.h.

Member Typedef Documentation

template<class MapItemType>
typedef MapItemType MapItemTypeWidget< MapItemType >::ItemType

Definition at line 59 of file edselfnt.h.

Constructor & Destructor Documentation

template<class MapItemType>
MapItemTypeWidget< MapItemType >::MapItemTypeWidget ( PG_Widget *  parent,
const PG_Point &  pos,
const MapItemType mapItemType 
)
inline

Definition at line 61 of file edselfnt.h.

Member Function Documentation

template<class MapItemType>
void MapItemTypeWidget< MapItemType >::display ( SDL_Surface *  surface,
const PG_Rect &  src,
const PG_Rect &  dst 
)
inlinevirtual

Implements SelectionWidget.

Definition at line 76 of file edselfnt.h.

template<class MapItemType>
const ItemType* MapItemTypeWidget< MapItemType >::getItem ( ) const
inline

Definition at line 71 of file edselfnt.h.

Referenced by ProductionItemFactory::itemMarked(), and CargoItemFactory::itemSelected().

template<class MapItemType>
ASCString MapItemTypeWidget< MapItemType >::getName ( ) const
inlinevirtual

Implements SelectionWidget.

Definition at line 66 of file edselfnt.h.

References MapItemType::getName().


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