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

PG_ListBoxBaseItem Class Reference

#include <pglistboxbaseitem.h>

Inheritance diagram for PG_ListBoxBaseItem:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_ListBoxBaseItem (PG_Widget *parent, Uint16 height, void *userdata=NULL)
 ~PG_ListBoxBaseItem ()
void SetUserData (void *userdata)
void * GetUserData ()
bool IsSelected ()
void Select (bool select=true)
PG_ListBoxGetParent ()
 Get the parentwidget of a widget.

Protected Member Functions

void eventSizeWidget (Uint16 w, Uint16 h)
 Callback for the SizeWidget event.
void eventMouseEnter ()
 eventhandler for mouse movements.
void eventMouseLeave ()
 eventhandler for mouse movements.
bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
void eventHide ()
 overridable eventhandler called whenever the widget gets hidden.

Protected Attributes

void * my_userdata
bool my_selected
bool my_hover

Constructor & Destructor Documentation

PG_ListBoxBaseItem::PG_ListBoxBaseItem PG_Widget parent,
Uint16  height,
void *  userdata = NULL
 

Definition at line 32 of file pglistboxbaseitem.cpp.

References PG_Label::GetIndent(), GetParent(), my_hover, my_selected, my_userdata, PG_Label::SetAlignment(), and PG_Label::SetIndent().

PG_ListBoxBaseItem::~PG_ListBoxBaseItem  ) 
 

Definition at line 44 of file pglistboxbaseitem.cpp.

References GetParent(), and PG_Rect::next().


Member Function Documentation

void PG_ListBoxBaseItem::eventHide  )  [protected, virtual]
 

overridable eventhandler called whenever the widget gets hidden.

Reimplemented from PG_Widget.

Definition at line 98 of file pglistboxbaseitem.cpp.

References my_hover.

bool PG_ListBoxBaseItem::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.

Reimplemented in ListBoxImageItem< SelectionType >.

Definition at line 102 of file pglistboxbaseitem.cpp.

References GetParent(), PG_Widget::GetParent(), IsSelected(), PG_Rect::my_height, and Select().

void PG_ListBoxBaseItem::eventMouseEnter  )  [protected, virtual]
 

eventhandler for mouse movements.

This overrideable handler is called everytime the mouse cursor is entering the widget area.

Reimplemented from PG_Widget.

Definition at line 87 of file pglistboxbaseitem.cpp.

References my_hover, and PG_Widget::Update().

void PG_ListBoxBaseItem::eventMouseLeave  )  [protected, virtual]
 

eventhandler for mouse movements.

This overrideable handler is called everytime the mouse cursor is leaving the widget area.

Reimplemented from PG_Widget.

Definition at line 92 of file pglistboxbaseitem.cpp.

References PG_Widget::eventMouseLeave(), my_hover, and PG_Widget::Update().

void PG_ListBoxBaseItem::eventSizeWidget Uint16  w,
Uint16  h
[protected, virtual]
 

Callback for the SizeWidget event.

Parameters:
w new width
h new height This virtual function can be used to implement custom behavior for SizeWidget events.

Reimplemented from PG_Widget.

Reimplemented in PG_ListBoxItem.

Definition at line 83 of file pglistboxbaseitem.cpp.

PG_ListBox * PG_ListBoxBaseItem::GetParent  ) 
 

Get the parentwidget of a widget.

Returns:
a pointer to the parentwidget or NULL if there is no parentwidget

Reimplemented from PG_Widget.

Definition at line 131 of file pglistboxbaseitem.cpp.

References PG_Widget::GetParent().

Referenced by eventMouseButtonUp(), ListBoxImageItem< SelectionType >::eventMouseButtonUp(), PG_ListBoxBaseItem(), Select(), and ~PG_ListBoxBaseItem().

void * PG_ListBoxBaseItem::GetUserData  ) 
 

Definition at line 63 of file pglistboxbaseitem.cpp.

References my_userdata.

bool PG_ListBoxBaseItem::IsSelected  ) 
 

Definition at line 67 of file pglistboxbaseitem.cpp.

References my_selected.

Referenced by eventMouseButtonUp(), PG_ListBox::GetSelectedItems(), and PlayerSelector::getSelectedPlayers().

void PG_ListBoxBaseItem::Select bool  select = true  ) 
 

Definition at line 71 of file pglistboxbaseitem.cpp.

References GetParent(), my_selected, and PG_Widget::Update().

Referenced by EventEditor::EventEditor(), eventMouseButtonUp(), NewStringChooser::NewStringChooser(), PG_ListBox::SelectFirstItem(), PG_ListBox::SelectItem(), PG_ListBox::SelectNextItem(), PG_ListBox::SelectPrevItem(), and SetListBoxItemAtts().

void PG_ListBoxBaseItem::SetUserData void *  userdata  ) 
 

Definition at line 59 of file pglistboxbaseitem.cpp.

References my_userdata.

Referenced by PG_ColumnItem::PG_ColumnItem().


Member Data Documentation

bool PG_ListBoxBaseItem::my_hover [protected]
 

Definition at line 90 of file pglistboxbaseitem.h.

Referenced by PG_ListBoxItem::eventBlit(), eventHide(), eventMouseEnter(), eventMouseLeave(), and PG_ListBoxBaseItem().

bool PG_ListBoxBaseItem::my_selected [protected]
 

Definition at line 88 of file pglistboxbaseitem.h.

Referenced by PG_ListBoxItem::eventBlit(), IsSelected(), PG_ListBoxBaseItem(), and Select().

void* PG_ListBoxBaseItem::my_userdata [protected]
 

Definition at line 86 of file pglistboxbaseitem.h.

Referenced by GetUserData(), PG_ListBoxBaseItem(), and SetUserData().


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