#include <ed_mapcomponent.h>
Inheritance diagram for MapComponent:

Public Member Functions | |
| MapComponent (const MapItemType *item) | |
| const MapItemType * | getItemType () const |
| virtual int | displayWidth () const=0 |
| virtual int | displayHeight () const=0 |
| virtual void | display (Surface &s, const SPoint &pos) const =0 |
| virtual bool | supportMultiFieldPlacement () const |
| void | displayClip (PG_Widget *parent, SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst) const |
| virtual ASCString | getName () const |
Static Public Attributes | |
| static const int | fontHeight = 20 |
Protected Member Functions | |
| virtual Surface & | getClippingSurface () const=0 |
| int | getPlayer () const |
Protected Attributes | |
| const MapItemType * | mapItem |
It is the abstract class on which the Brush edit function operates
Definition at line 54 of file ed_mapcomponent.h.
| MapComponent::MapComponent | ( | const MapItemType * | item | ) |
Definition at line 49 of file ed_mapcomponent.cpp.
References SelectionHolder::playerChanged, and selection.
| virtual Surface& MapComponent::getClippingSurface | ( | ) | const [protected, pure virtual] |
Implemented in BasicItem< Item >, BuildingItem, BasicItem< VehicleType >, BasicItem< TerrainType >, BasicItem< MineType >, and BasicItem< ObjectType >.
Referenced by displayClip().
| int MapComponent::getPlayer | ( | void | ) | const [inline, protected] |
Definition at line 61 of file ed_mapcomponent.h.
| const MapItemType* MapComponent::getItemType | ( | ) | const [inline] |
Definition at line 65 of file ed_mapcomponent.h.
References mapItem.
Referenced by displayClip(), and Maped_MainScreenWidget::selectionChanged().
| virtual int MapComponent::displayWidth | ( | ) | const [pure virtual] |
Implemented in BasicItem< Item >, BuildingItem, BasicItem< VehicleType >, BasicItem< TerrainType >, BasicItem< MineType >, and BasicItem< ObjectType >.
Referenced by displayClip(), and SelectionItemWidget::eventDraw().
| virtual int MapComponent::displayHeight | ( | ) | const [pure virtual] |
Implemented in BasicItem< Item >, BuildingItem, BasicItem< VehicleType >, BasicItem< TerrainType >, BasicItem< MineType >, and BasicItem< ObjectType >.
Referenced by displayClip(), and SelectionItemWidget::eventDraw().
Implemented in VehicleItem, BuildingItem, ObjectItem, TerrainItem, and MineItem.
Referenced by displayClip(), and SelectionItemWidget::eventDraw().
| virtual bool MapComponent::supportMultiFieldPlacement | ( | ) | const [inline, virtual] |
Implements Placeable.
Reimplemented in BuildingItem.
Definition at line 69 of file ed_mapcomponent.h.
| void MapComponent::displayClip | ( | PG_Widget * | parent, | |
| SDL_Surface * | surface, | |||
| const PG_Rect & | src, | |||
| const PG_Rect & | dst | |||
| ) | const |
Definition at line 101 of file edselfnt.cpp.
References Surface::createSurface(), display(), displayHeight(), displayWidth(), fontHeight, getClippingSurface(), getItemType(), and getName().
| virtual ASCString MapComponent::getName | ( | ) | const [inline, virtual] |
Implements Placeable.
Reimplemented in BasicItem< Item >, BuildingItem, BasicItem< VehicleType >, BasicItem< TerrainType >, BasicItem< MineType >, and BasicItem< ObjectType >.
Definition at line 71 of file ed_mapcomponent.h.
References MapItemType::getName(), and mapItem.
Referenced by displayClip().
const MapItemType* MapComponent::mapItem [protected] |
const int MapComponent::fontHeight = 20 [static] |
1.5.1