OpenMW
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
MWGui::Widgets::MWList Class Reference

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

#include <list.hpp>

List of all members.

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.
void removeItem (const std::string &name)
bool hasItem (const std::string &name)
unsigned int getItemCount ()
std::string getItemNameAt (unsigned int at)
void clear ()
MyGUI::Widget * getItemWidget (const std::string &name)
 get widget for an item name, useful to set up tooltip

Public Attributes

EventHandle_StringInt eventItemSelected
EventHandle_Widget eventWidgetSelected

Protected Member Functions

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

Private Attributes

MWGui::Widgets::MWScrollViewmScrollView
MyGUI::Widget * mClient
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> MWGui::Widgets::MWList::EventHandle_StringInt
typedef MyGUI::delegates::CMultiDelegate1<MyGUI::Widget*> MWGui::Widgets::MWList::EventHandle_Widget

Constructor & Destructor Documentation


Member Function Documentation

void MWGui::Widgets::MWList::addItem ( const std::string &  name)

add a seperator between the current and the next item.

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

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

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

bool MWGui::Widgets::MWList::hasItem ( const std::string &  name)
void MWGui::Widgets::MWList::onItemSelected ( MyGUI::Widget *  _sender) [protected]
void MWGui::Widgets::MWList::onMouseWheel ( MyGUI::Widget *  _sender,
int  _rel 
) [protected]
void MWGui::Widgets::MWList::redraw ( bool  scrollbarShown = false) [protected]
void MWGui::Widgets::MWList::removeItem ( const std::string &  name)

Member Data Documentation

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

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

MyGUI::Widget* MWGui::Widgets::MWList::mClient [private]
std::vector<std::string> MWGui::Widgets::MWList::mItems [private]

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