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

a very simple list widget that supports word-wrapping entries More...

#include <list.hpp>

Inheritance diagram for Gui::MWList:
Collaboration diagram for Gui::MWList:

Public Types

typedef
MyGUI::delegates::CMultiDelegate2
< const std::string &, int
EventHandle_StringInt
 
typedef
MyGUI::delegates::CMultiDelegate1
< MyGUI::Widget * > 
EventHandle_Widget
 

Public Member Functions

 MWList ()
 
void adjustSize ()
 
void addItem (const std::string &name)
 
void addSeparator ()
 add a seperator between the current and the next item. More...
 
void removeItem (const std::string &name)
 
unsigned int getItemCount ()
 
std::string getItemNameAt (unsigned int at)
 
void clear ()
 
MyGUI::Button * getItemWidget (const std::string &name)
 get widget for an item name, useful to set up tooltip More...
 
void scrollToTop ()
 
virtual void setPropertyOverride (const std::string &_key, const std::string &_value)
 

Public Attributes

EventHandle_StringInt eventItemSelected
 
EventHandle_Widget eventWidgetSelected
 

Protected Member Functions

void initialiseOverride ()
 
void redraw (bool scrollbarShown=false)
 
void onMouseWheelMoved (MyGUI::Widget *_sender, int _rel)
 
void onItemSelected (MyGUI::Widget *_sender)
 

Private Attributes

MyGUI::ScrollView * mScrollView
 
MyGUI::Widget * mClient
 
std::string mListItemSkin
 
std::vector< std::string > mItems
 
int mItemHeight
 

Detailed Description

a very simple list widget that supports word-wrapping entries

Note
if the width or height of the list changes, you must call adjustSize() method

Member Typedef Documentation

typedef MyGUI::delegates::CMultiDelegate2<const std::string&, int> Gui::MWList::EventHandle_StringInt
typedef MyGUI::delegates::CMultiDelegate1<MyGUI::Widget*> Gui::MWList::EventHandle_Widget

Constructor & Destructor Documentation

Gui::MWList::MWList ( )

Member Function Documentation

void Gui::MWList::addItem ( const std::string &  name)

Here is the caller graph for this function:

void Gui::MWList::addSeparator ( )

add a seperator between the current and the next item.

Here is the caller graph for this function:

void Gui::MWList::adjustSize ( )

Call after the size of the list changed, or items were inserted/removed

Here is the call graph for this function:

Here is the caller graph for this function:

void Gui::MWList::clear ( )

Here is the caller graph for this function:

unsigned int Gui::MWList::getItemCount ( )

Here is the caller graph for this function:

std::string Gui::MWList::getItemNameAt ( unsigned int  at)
Attention
if there are separators, this method will return "" at the place where the separator is
MyGUI::Button * Gui::MWList::getItemWidget ( const std::string &  name)

get widget for an item name, useful to set up tooltip

Here is the call graph for this function:

Here is the caller graph for this function:

void Gui::MWList::initialiseOverride ( )
protected

Here is the call graph for this function:

void Gui::MWList::onItemSelected ( MyGUI::Widget *  _sender)
protected

Here is the caller graph for this function:

void Gui::MWList::onMouseWheelMoved ( MyGUI::Widget *  _sender,
int  _rel 
)
protected

Here is the caller graph for this function:

void Gui::MWList::redraw ( bool  scrollbarShown = false)
protected

Here is the call graph for this function:

Here is the caller graph for this function:

void Gui::MWList::removeItem ( const std::string &  name)
void Gui::MWList::scrollToTop ( )

Here is the caller graph for this function:

void Gui::MWList::setPropertyOverride ( const std::string &  _key,
const std::string &  _value 
)
virtual

Member Data Documentation

EventHandle_StringInt Gui::MWList::eventItemSelected

Event: Item selected with the mouse. signature: void method(std::string itemName, int index)

EventHandle_Widget Gui::MWList::eventWidgetSelected

Event: Item selected with the mouse. signature: void method(MyGUI::Widget* sender)

MyGUI::Widget* Gui::MWList::mClient
private
int Gui::MWList::mItemHeight
private
std::vector<std::string> Gui::MWList::mItems
private
std::string Gui::MWList::mListItemSkin
private
MyGUI::ScrollView* Gui::MWList::mScrollView
private

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