Advanced Strategic Command
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ItemSelectorWidget Class Reference

#include <selectionwindow.h>

Inheritance diagram for ItemSelectorWidget:
Inheritance graph

Public Member Functions

 ItemSelectorWidget (PG_Widget *parent, const PG_Rect &r, SelectionItemFactory *itemFactory)
void constrainNames (bool constrain)
int getItemNum () const
void reLoad (bool show=false)
void resetNamesearch ()
 ~ItemSelectorWidget ()

Public Attributes

sigc::signal< void, const
SelectionWidget * > 
sigc::signal< void, ASCStringnameEntered
sigc::signal< bool > sigQuitModal

Protected Member Functions

bool moveSelection (int amount)
bool eventKeyDown (const SDL_KeyboardEvent *key)
void itemSelected (const SelectionWidget *w, bool mouse)
void markItem (const SelectionWidget *w)
bool isItemMarked (const SelectionWidget *w)
bool locateObject (const ASCString &name)
bool nameMatch (const SelectionWidget *selection, const ASCString &name)

Detailed Description

Definition at line 89 of file selectionwindow.h.

Constructor & Destructor Documentation

ItemSelectorWidget::ItemSelectorWidget ( PG_Widget *  parent,
const PG_Rect &  r,
SelectionItemFactory itemFactory 

Definition at line 225 of file selectionwindow.cpp.

References SelectionItemFactory::getDefaultItem(), markItem(), and reLoad().

ItemSelectorWidget::~ItemSelectorWidget ( )

Definition at line 297 of file selectionwindow.cpp.

Member Function Documentation

void ItemSelectorWidget::constrainNames ( bool  constrain)
bool ItemSelectorWidget::eventKeyDown ( const SDL_KeyboardEvent *  key)
int ItemSelectorWidget::getItemNum ( ) const

Definition at line 126 of file selectionwindow.h.

Referenced by ChooseTech::ok().

bool ItemSelectorWidget::isItemMarked ( const SelectionWidget w)

Definition at line 182 of file selectionwindow.cpp.

void ItemSelectorWidget::itemSelected ( const SelectionWidget w,
bool  mouse 

Definition at line 168 of file selectionwindow.cpp.

References SelectionItemFactory::itemSelected(), and sigItemSelected.

Referenced by eventKeyDown(), and reLoad().

bool ItemSelectorWidget::locateObject ( const ASCString name)

Definition at line 187 of file selectionwindow.cpp.

References markItem(), and nameMatch().

Referenced by eventKeyDown().

void ItemSelectorWidget::markItem ( const SelectionWidget w)

Definition at line 175 of file selectionwindow.cpp.

References SelectionItemFactory::itemMarked().

Referenced by ItemSelectorWidget(), locateObject(), and reLoad().

bool ItemSelectorWidget::moveSelection ( int  amount)

Definition at line 54 of file selectionwindow.cpp.

References resetNamesearch().

Referenced by eventKeyDown().

bool ItemSelectorWidget::nameMatch ( const SelectionWidget selection,
const ASCString name 

Definition at line 200 of file selectionwindow.cpp.

References SelectionWidget::getName(), and ASCString::toLower().

Referenced by eventKeyDown(), and locateObject().

void ItemSelectorWidget::reLoad ( bool  show = false)
void ItemSelectorWidget::resetNamesearch ( )

Definition at line 292 of file selectionwindow.cpp.

Referenced by moveSelection(), and ItemSelectorWindow::RunModal().

Member Data Documentation

sigc::signal<void,ASCString> ItemSelectorWidget::nameEntered
sigc::signal<void,const SelectionWidget*> ItemSelectorWidget::sigItemSelected

Definition at line 121 of file selectionwindow.h.

Referenced by itemSelected(), and ItemSelectorWindow::ItemSelectorWindow().

sigc::signal<bool> ItemSelectorWidget::sigQuitModal

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