- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UImageIcon Class Reference

An icon which uses an image as source. More...

#include <uimageicon.hpp>

Inheritance diagram for ufo::UImageIcon:

ufo::UIcon ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

 UImageIcon (const std::string &fileName)
 UImageIcon (UImage *image)
virtual void paintIcon (UGraphics *g, const URectangle &rect, const UStyleHints *hints, uint32_t widgetState=0)
virtual UDimension getIconSize () const

Detailed Description

An icon which uses an image as source.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UImageIcon::UImageIcon const std::string &  fileName  ) 
 

Creates an image icon with an image using the given file name.

Parameters:
fileName The file name of the desired image

ufo::UImageIcon::UImageIcon UImage image  ) 
 

Creates an icon displaying the given image.

Parameters:
image The image which should be displayed.


Member Function Documentation

virtual UDimension ufo::UImageIcon::getIconSize  )  const [virtual]
 

Returns:
The actual icon size

Implements ufo::UIcon.

virtual void ufo::UImageIcon::paintIcon UGraphics g,
const URectangle rect,
const UStyleHints hints,
uint32_t  widgetState = 0
[virtual]
 

Paints this icon on the given graphics object. If the size of the rectangle is empty or invalid, the actual icon size is used. Furthermore, the icon may ignore given sizes.

Parameters:
g The graphics object
rect The rectangle
hints Style hints which may be used to paint the icon
widgetState state flags

Implements ufo::UIcon.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt