MyGUI  3.2.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
MyGUI::ImageBox Class Reference

ImageBox properties. Skin childs. ImageBox widget description should be here. More...

#include <MyGUI_ImageBox.h>

+ Inheritance diagram for MyGUI::ImageBox:

Public Types

typedef RTTIBase Base
typedef ImageBox RTTIBase

Public Member Functions

virtual const std::string & getTypeName () const
virtual bool isType (const std::type_info &_type) const
template<typename Type >
bool isType () const
 ImageBox ()
void setImageInfo (const std::string &_texture, const IntCoord &_coord, const IntSize &_tile)
void setImageTexture (const std::string &_value)
void setImageRect (const IntRect &_value)
void setImageCoord (const IntCoord &_value)
void setImageTile (const IntSize &_value)
void setImageIndex (size_t _index)
size_t getImageIndex () const
IntSize getImageSize () const
size_t getItemCount () const
 Get number of items.
void setItemSelect (size_t _index)
 Select specified _index.
size_t getItemSelect () const
 Get index of selected item (ITEM_NONE if none selected)
void resetItemSelect ()
 Reset item selection.
void insertItem (size_t _index, const IntCoord &_item)
 Insert an item into a list at a specified position.
void addItem (const IntCoord &_item)
 Add an item to the end of a list.
void setItem (size_t _index, const IntCoord &_item)
 Replace an item at a specified position.
void deleteItem (size_t _index)
 Delete item at a specified position.
void deleteAllItems ()
 Delete all items.
void addItemFrame (size_t _index, const IntCoord &_item)
void insertItemFrame (size_t _index, size_t _indexFrame, const IntCoord &_item)
void addItemFrameDuplicate (size_t _index, size_t _indexSourceFrame)
void insertItemFrameDuplicate (size_t _index, size_t _indexFrame, size_t _indexSourceFrame)
void setItemFrame (size_t _index, size_t _indexFrame, const IntCoord &_item)
void deleteItemFrame (size_t _index, size_t _indexFrame)
void deleteAllItemFrames (size_t _index)
void setItemFrameRate (size_t _index, float _rate)
float getItemFrameRate (size_t _index)
bool setItemResource (const std::string &_name)
void setItemGroup (const std::string &_value)
void setItemName (const std::string &_value)
void setItemResourcePtr (ResourceImageSetPtr _resource)
void setItemResourceInfo (const ImageIndexInfo &_info)
ResourceImageSetPtr getItemResource () const
void setItemResourceInfo (ResourceImageSetPtr _resource, const std::string &_group, const std::string &_name)

Static Public Member Functions

static const std::string & getClassTypeName ()

Protected Member Functions

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

Detailed Description

ImageBox properties. Skin childs. ImageBox widget description should be here.

Definition at line 21 of file MyGUI_ImageBox.h.


Member Typedef Documentation

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.


Constructor & Destructor Documentation

Definition at line 21 of file MyGUI_ImageBox.cpp.


Member Function Documentation

void MyGUI::ImageBox::addItem ( const IntCoord _item)

Add an item to the end of a list.

Definition at line 524 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::addItemFrame ( size_t  _index,
const IntCoord _item 
)

Add frame

Parameters:
_indexImage item index
_itemFrame coordinates at image texture

Definition at line 244 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::addItemFrameDuplicate ( size_t  _index,
size_t  _indexSourceFrame 
)

Add copy of frame (similar to ImageBox::addItemFrame but we copy frame coordinates)

Parameters:
_indexImage item index
_indexSourceFrameFrame index of frame that we copying

Definition at line 265 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::deleteAllItemFrames ( size_t  _index)

Delete all frames

Parameters:
_indexImage item index

Definition at line 237 of file MyGUI_ImageBox.cpp.

Delete all items.

Definition at line 188 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::deleteItem ( size_t  _index)

Delete item at a specified position.

Definition at line 175 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::deleteItemFrame ( size_t  _index,
size_t  _indexFrame 
)

Delete frame

Parameters:
_indexImage item index
_indexFrameFrame index that we delete

Definition at line 309 of file MyGUI_ImageBox.cpp.

static const std::string& MyGUI::ImageBox::getClassTypeName ( ) [inline, static]

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.

Get current tile index

Definition at line 449 of file MyGUI_ImageBox.cpp.

Get size of currently used image

Definition at line 454 of file MyGUI_ImageBox.cpp.

Get number of items.

Definition at line 509 of file MyGUI_ImageBox.cpp.

float MyGUI::ImageBox::getItemFrameRate ( size_t  _index)

Get item frame rate

Parameters:
_indexImage item index

Definition at line 258 of file MyGUI_ImageBox.cpp.

Get current items resource used in ImageBox

Definition at line 529 of file MyGUI_ImageBox.cpp.

Get index of selected item (ITEM_NONE if none selected)

Definition at line 514 of file MyGUI_ImageBox.cpp.

virtual const std::string& MyGUI::ImageBox::getTypeName ( ) const [inline, virtual]

Get type name as string

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.

void MyGUI::ImageBox::insertItem ( size_t  _index,
const IntCoord _item 
)

Insert an item into a list at a specified position.

Definition at line 194 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::insertItemFrame ( size_t  _index,
size_t  _indexFrame,
const IntCoord _item 
)

Insert frame

Parameters:
_indexImage item index
_indexFrameFrame index where we insert frame
_itemFrame coordinates at image texture

Definition at line 274 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::insertItemFrameDuplicate ( size_t  _index,
size_t  _indexFrame,
size_t  _indexSourceFrame 
)

Insert copy of frame (similar to ImageBox::insertItemFrame but we copy frame coordinates)

Parameters:
_indexImage item index
_indexFrameFrame index where we insert frame
_indexSourceFrameFrame index of frame that we copying

Definition at line 286 of file MyGUI_ImageBox.cpp.

template<typename Type >
bool MyGUI::ImageBox::isType ( ) const [inline]

Compare with selected type

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.

virtual bool MyGUI::ImageBox::isType ( const std::type_info &  _type) const [inline, virtual]

Compare with selected type

Reimplemented from MyGUI::Widget.

Definition at line 25 of file MyGUI_ImageBox.h.

Reset item selection.

Definition at line 519 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageCoord ( const IntCoord _value)

Set _coord - part of texture where we take tiles

Definition at line 65 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageIndex ( size_t  _index)

Set current tile index

Parameters:
_index- tile index
Remarks:
Tiles in file start numbering from left to right and from top to bottom.
For example:
				+---+---+---+
				| 0 | 1 | 2 |
				+---+---+---+
				| 3 | 4 | 5 |
				+---+---+---+
			

Definition at line 444 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageInfo ( const std::string &  _texture,
const IntCoord _coord,
const IntSize _tile 
)

Definition at line 37 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageRect ( const IntRect _value)

Set _rect - part of texture where we take tiles

Definition at line 75 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageTexture ( const std::string &  _value)

Definition at line 88 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setImageTile ( const IntSize _value)

Set _tile size

Definition at line 52 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItem ( size_t  _index,
const IntCoord _item 
)

Replace an item at a specified position.

Definition at line 206 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemFrame ( size_t  _index,
size_t  _indexFrame,
const IntCoord _item 
)

Change frame

Parameters:
_indexImage item index
_indexFrameFrame index to change
_itemFrame coordinates at image texture

Definition at line 299 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemFrameRate ( size_t  _index,
float  _rate 
)

Set item frame rate

Parameters:
_indexImage item index
_rateDuration of one frame in seconds

Definition at line 251 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemGroup ( const std::string &  _value)

Select current item group

Definition at line 395 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemName ( const std::string &  _value)

Select current item mane

Definition at line 405 of file MyGUI_ImageBox.cpp.

bool MyGUI::ImageBox::setItemResource ( const std::string &  _name)

Select current items resource used in ImageBox

Parameters:
_nameResource name
Returns:
false if resource with such name not exist

Definition at line 345 of file MyGUI_ImageBox.cpp.

Set current item

Definition at line 320 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemResourceInfo ( ResourceImageSetPtr  _resource,
const std::string &  _group,
const std::string &  _name 
)

Select current item resource, group and name

Definition at line 415 of file MyGUI_ImageBox.cpp.

Select current items resource used in ImageBox

Parameters:
_resourceResource pointer

Definition at line 352 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setItemSelect ( size_t  _index)

Select specified _index.

Definition at line 459 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::setPropertyOverride ( const std::string &  _key,
const std::string &  _value 
) [protected, virtual]
Properties:
ImageTexture is ImageBox property with type string. Текстура для виджета.
Properties:
ImageCoord is ImageBox property with type int int int int. Координаты в текстуре.
Properties:
ImageTile is ImageBox property with type int int. Размер тайла текстуры.
Properties:
ImageIndex is ImageBox property with type size_t. Индекс тайла в текстуре.
Properties:
ImageResource is ImageBox property with type string. Имя ресурса картинки.
Properties:
ImageGroup is ImageBox property with type string. Имя группы картинки в ресурсе.
Properties:
ImageName is ImageBox property with type string. Имя картинки в группе ресурса.

Reimplemented from MyGUI::Widget.

Definition at line 470 of file MyGUI_ImageBox.cpp.

void MyGUI::ImageBox::shutdownOverride ( ) [protected, virtual]

Reimplemented from MyGUI::Widget.

Definition at line 30 of file MyGUI_ImageBox.cpp.


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