Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SelectionWidget Class Reference

#include <selectionwindow.h>

Inheritance diagram for SelectionWidget:

Inheritance graph
[legend]
List of all members.

Public Types

typedef Loki::Functor< bool,
TYPELIST_1(const SelectionWidget *) 
SelectionCallBack )

Public Member Functions

void setSelectionCallback (SelectionCallBack *callBack)
virtual ~SelectionWidget ()
virtual ASCString getName () const =0

Public Attributes

SigC::Signal1< void, const
SelectionWidget * > 
itemSelected
SigC::Signal1< void, const
SelectionWidget * > 
itemMarked

Protected Member Functions

 SelectionWidget (PG_Widget *parent, const PG_Rect &rect)
bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
void eventBlit (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)
 overridable eventhandler to blit the widget contents to the screen
virtual void display (SDL_Surface *surface, const PG_Rect &src, const PG_Rect &dst)=0

Member Typedef Documentation

typedef Loki::Functor<bool, TYPELIST_1(const SelectionWidget*) SelectionWidget::SelectionCallBack)
 

Definition at line 43 of file selectionwindow.h.


Constructor & Destructor Documentation

SelectionWidget::SelectionWidget PG_Widget parent,
const PG_Rect rect
[inline, protected]
 

Definition at line 43 of file selectionwindow.h.

virtual SelectionWidget::~SelectionWidget  )  [inline, virtual]
 

Definition at line 56 of file selectionwindow.h.


Member Function Documentation

virtual void SelectionWidget::display SDL_Surface *  surface,
const PG_Rect src,
const PG_Rect dst
[protected, pure virtual]
 

Implemented in BuildingTypeBaseWidget, TechWidget, FileWidget, VehicleTypeBaseWidget, MapItemTypeWidget< MapItemType >, and MessageLineWidget.

Referenced by eventBlit().

void SelectionWidget::eventBlit SDL_Surface *  surface,
const PG_Rect src,
const PG_Rect dst
[protected, virtual]
 

overridable eventhandler to blit the widget contents to the screen

Parameters:
surface pointer to SDL_Surface to be blitted
src source rectangle (client coordinates)
dst destination rectangle (screen coordinates) Override this eventhandler to perform custom blitting behaviour (without drawing onto the widget surface).

Reimplemented from PG_Widget.

Definition at line 44 of file selectionwindow.cpp.

References display(), and PG_Application::GetScreen().

bool SelectionWidget::eventMouseButtonDown const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 34 of file selectionwindow.cpp.

References itemMarked, and PG_Widget::Update().

bool SelectionWidget::eventMouseButtonUp const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 25 of file selectionwindow.cpp.

References itemSelected.

virtual ASCString SelectionWidget::getName  )  const [pure virtual]
 

Implemented in BuildingTypeBaseWidget, TechWidget, FileWidget, VehicleTypeBaseWidget, MapItemTypeWidget< MapItemType >, and MessageLineWidget.

Referenced by ItemSelectorWidget::nameMatch().

void SelectionWidget::setSelectionCallback SelectionCallBack callBack  )  [inline]
 

Definition at line 52 of file selectionwindow.h.

Referenced by ItemSelectorWidget::reLoad().


Member Data Documentation

SigC::Signal1<void,const SelectionWidget*> SelectionWidget::itemMarked
 

Definition at line 62 of file selectionwindow.h.

Referenced by eventMouseButtonDown(), and ItemSelectorWidget::reLoad().

SigC::Signal1<void,const SelectionWidget*> SelectionWidget::itemSelected
 

Definition at line 61 of file selectionwindow.h.

Referenced by eventMouseButtonUp(), and ItemSelectorWidget::reLoad().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:20:32 2008 for Advanced Strategic Command by  doxygen 1.4.2