OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MWGui::SpellView Class Reference

Displays a SpellModel in a list widget. More...

#include <spellview.hpp>

Inheritance diagram for MWGui::SpellView:
Collaboration diagram for MWGui::SpellView:

Classes

struct  LineInfo
 tracks a row in the spell view More...
 

Public Types

typedef
MyGUI::delegates::CMultiDelegate1
< SpellModel::ModelIndex
EventHandle_ModelIndex
 

Public Member Functions

 SpellView ()
 
void setShowCostColumn (bool show)
 Should the cost/chance column be shown? More...
 
void setHighlightSelected (bool highlight)
 
void setModel (SpellModel *model)
 Takes ownership of model. More...
 
SpellModelgetModel ()
 
void update ()
 
void incrementalUpdate ()
 simplified update called each frame More...
 
virtual void initialiseOverride ()
 
virtual void setSize (const MyGUI::IntSize &_value)
 
virtual void setCoord (const MyGUI::IntCoord &_value)
 
void resetScrollbars ()
 

Static Public Member Functions

static void registerComponents ()
 Register needed components with MyGUI's factory manager. More...
 

Public Attributes

EventHandle_ModelIndex eventSpellClicked
 Fired when a spell was clicked. More...
 

Private Types

enum  { NoSpellIndex = -1 }
 magic number indicating LineInfo does not correspond to an item in mModel More...
 

Private Member Functions

void layoutWidgets ()
 
void addGroup (const std::string &label1, const std::string &label2)
 
void adjustSpellWidget (const Spell &spell, SpellModel::ModelIndex index, MyGUI::Widget *widget)
 
void onSpellSelected (MyGUI::Widget *_sender)
 
void onMouseWheelMoved (MyGUI::Widget *_sender, int _rel)
 
SpellModel::ModelIndex getSpellModelIndex (MyGUI::Widget *_sender)
 

Private Attributes

MyGUI::ScrollView * mScrollView
 
std::auto_ptr< SpellModelmModel
 
std::vector< LineInfomLines
 
bool mShowCostColumn
 
bool mHighlightSelected
 

Static Private Attributes

static const char * sSpellModelIndex = "SpellModelIndex"
 

Detailed Description

Displays a SpellModel in a list widget.

Member Typedef Documentation

typedef MyGUI::delegates::CMultiDelegate1<SpellModel::ModelIndex> MWGui::SpellView::EventHandle_ModelIndex

Member Enumeration Documentation

anonymous enum
private

magic number indicating LineInfo does not correspond to an item in mModel

Enumerator
NoSpellIndex 

Constructor & Destructor Documentation

MWGui::SpellView::SpellView ( )

Member Function Documentation

void MWGui::SpellView::addGroup ( const std::string &  label1,
const std::string &  label2 
)
private

Here is the caller graph for this function:

void MWGui::SpellView::adjustSpellWidget ( const Spell spell,
SpellModel::ModelIndex  index,
MyGUI::Widget *  widget 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

SpellModel * MWGui::SpellView::getModel ( )

Here is the caller graph for this function:

SpellModel::ModelIndex MWGui::SpellView::getSpellModelIndex ( MyGUI::Widget *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::incrementalUpdate ( )

simplified update called each frame

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::initialiseOverride ( )
virtual
void MWGui::SpellView::layoutWidgets ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::onMouseWheelMoved ( MyGUI::Widget *  _sender,
int  _rel 
)
private

Here is the caller graph for this function:

void MWGui::SpellView::onSpellSelected ( MyGUI::Widget *  _sender)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::registerComponents ( )
static

Register needed components with MyGUI's factory manager.

Here is the caller graph for this function:

void MWGui::SpellView::resetScrollbars ( )

Here is the caller graph for this function:

void MWGui::SpellView::setCoord ( const MyGUI::IntCoord &  _value)
virtual

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::setHighlightSelected ( bool  highlight)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::setModel ( SpellModel model)

Takes ownership of model.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::setShowCostColumn ( bool  show)

Should the cost/chance column be shown?

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::setSize ( const MyGUI::IntSize &  _value)
virtual

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::SpellView::update ( )

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

EventHandle_ModelIndex MWGui::SpellView::eventSpellClicked

Fired when a spell was clicked.

bool MWGui::SpellView::mHighlightSelected
private
std::vector< LineInfo > MWGui::SpellView::mLines
private
std::auto_ptr<SpellModel> MWGui::SpellView::mModel
private
MyGUI::ScrollView* MWGui::SpellView::mScrollView
private
bool MWGui::SpellView::mShowCostColumn
private
const char * MWGui::SpellView::sSpellModelIndex = "SpellModelIndex"
staticprivate

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