OpenGUI::Imageset Class Reference

#include <OpenGUI_Imageset.h>

Inheritance diagram for OpenGUI::Imageset:

OpenGUI::RefObject List of all members.

Detailed Description

Imagesets directly represent entire image files. They contain Imagery, which provide a usable window of the image file.


Public Types

typedef std::list< StringImageryList
 A string list used by Imageset::getImageryList().

Public Member Functions

ImageryPtr createImagery (String imageryName)
 Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the entire Imageset area.
ImageryPtr createImagery (String imageryName, FRect areaRect, IRect imagesetRect=IRect(0, 0, 0, 0))
 Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by areaRect (which is in standard UV coordinates).
ImageryPtr createImagery (String imageryName, IRect areaRect)
 Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by areaRect (which is in pixels).
ImageryPtr createImagery (const String imageryName, int top, int left, int height, int width)
 Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by top,left,height,width.
void destroyImagery (ImageryPtr imageryPtr)
 Destroys an Imagery object.
void destroyImagery (Imagery *pImagery)
 Destroys an Imagery object.
void destroyImagery (String name)
 Destroys an Imagery object.
void destroyAllImagery ()
 Destroys all Imagery within this Imageset.
ImageryPtr getImagery (String imageryName) const
 Returns a shared pointer to the Imagery object within this Imageset that has the given name. If the Imagery cannot be found, the returned Imagery pointer will be == 0.
ImageryList getImageryList () const
 Returns a list of all imagery currently defined within this imageset. Entries can be fed back into getImagery().
TexturePtr getTexture () const
 Returns the texture backing this Imageset.
const StringgetName () const
 Returns the name of this Imageset.
size_t getImageryCount () const
 returns the total number of Imagery defined under this Imageset


Member Typedef Documentation

typedef std::list<String> OpenGUI::Imageset::ImageryList
 

A string list used by Imageset::getImageryList().


Member Function Documentation

ImageryPtr OpenGUI::Imageset::createImagery const String  imageryName,
int  top,
int  left,
int  height,
int  width
[inline]
 

Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by top,left,height,width.

ImageryPtr OpenGUI::Imageset::createImagery String  imageryName,
IRect  areaRect
 

Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by areaRect (which is in pixels).

Note:
Multiple calls to this function with the same imageryName result in the destruction and recreation of the Imagery. Effectively, a redefinition.

ImageryPtr OpenGUI::Imageset::createImagery String  imageryName,
FRect  areaRect,
IRect  imagesetRect = IRect(0, 0, 0, 0)
 

Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the Imageset area defined by areaRect (which is in standard UV coordinates).

Note:
Multiple calls to this function with the same imageryName result in the destruction and recreation of the Imagery. Effectively, a redefinition.

ImageryPtr OpenGUI::Imageset::createImagery String  imageryName  ) 
 

Creates a new Imagery object from this Imageset and returns a shared pointer to the new Imagery. The new Imagery will encompass the entire Imageset area.

Note:
Multiple calls to this function with the same imageryName result in the destruction and recreation of the Imagery. Effectively, a redefinition.

void OpenGUI::Imageset::destroyAllImagery  ) 
 

Destroys all Imagery within this Imageset.

Note:
Preserves the "safe destruction" of Imagery, as defined in destroyImagery().

void OpenGUI::Imageset::destroyImagery String  name  ) 
 

Destroys an Imagery object.

See also:
void destroyImagery(ImageryPtr imageryPtr);

void OpenGUI::Imageset::destroyImagery Imagery pImagery  ) 
 

Destroys an Imagery object.

See also:
void destroyImagery(ImageryPtr imageryPtr);

void OpenGUI::Imageset::destroyImagery ImageryPtr  imageryPtr  ) 
 

Destroys an Imagery object.

This performs a "safe destruction" of the Imagery object. Since Imagery object references are handed out only by RefPtrs, the object will never truly destroy until all references to the Imagery object are deleted. This function does however disconnect the Imagery object from this Imageset. Since Imagery objects contain the RefPtr to the texture they use, the Imagery will be valid until all handles are destroyed.

ImageryPtr OpenGUI::Imageset::getImagery String  imageryName  )  const
 

Returns a shared pointer to the Imagery object within this Imageset that has the given name. If the Imagery cannot be found, the returned Imagery pointer will be == 0.

size_t OpenGUI::Imageset::getImageryCount  )  const
 

returns the total number of Imagery defined under this Imageset

Imageset::ImageryList OpenGUI::Imageset::getImageryList  )  const
 

Returns a list of all imagery currently defined within this imageset. Entries can be fed back into getImagery().

const String & OpenGUI::Imageset::getName  )  const
 

Returns the name of this Imageset.

TexturePtr OpenGUI::Imageset::getTexture  )  const
 

Returns the texture backing this Imageset.


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Sun Sep 9 02:00:21 2007