UTFWin::IImageDrawable class

An abstract class that has the methods that a drawable that renders an image would require.

Base classes

class UTFWinObject

Derived classes

class ImageDrawable
A standard IDrawable that renders an image.

Public types

enum (anonymous) { kFlagFixedWidth = 1, kFlagFixedHeight = 2 }

Public static variables

static const uint32_t TYPE

Public static functions

static auto AddImageWindow(const ResourceKey& imageName, float offsetX, float offsetY, IWindow* pParentWindow) -> IWindow*
Creates an IWindow that will display the image with the name specified.

Public functions

auto ToDrawable() -> IDrawable* pure virtual
Get the IDrawable instance that represents this class.
void SetImage(Image* pImage) pure virtual
Sets the image to be shown.
auto GetImage() const -> Image* pure virtual
Gets the image to be shown.
auto GetImageDrawableFlags() const -> int pure virtual
Gets the flags used in this drawable.
void SetImageDrawableFlags(int flags) pure virtual
Sets the flags used in this drawable.
void SetImageDrawableFlag(int flag, bool bValue) pure virtual
Sets the specific drawable flag to the value given.
void SetTiling(ImageTiling tiling) pure virtual
Sets the tiling method that will be used in this drawable.
auto GetTiling() const -> ImageTiling pure virtual
Gets the tiling method that is being used in this drawable.
void SetScale(float fScale) pure virtual
Sets the scale of the image.
auto GetScale() const -> float pure virtual
Gets the scale of the image, as a float value.
void SetAlignmentHorizontal(AlignmentH alignment) pure virtual
Sets the horizontal alignment of the image.
auto GetAlignmentHorizontal() const -> AlignmentH pure virtual
Gets the horizontal alignment of the image.
void SetAlignmentVertical(AlignmentV alignment) pure virtual
Sets the vertical alignment of the image.
auto GetAlignmentVertical() const -> AlignmentV pure virtual
Gets the vertical alignment of the image.

Enum documentation

enum UTFWin::IImageDrawable::(anonymous)

Enumerators
kFlagFixedWidth

Preserves the original width of the image.

kFlagFixedHeight

Preserves the original height of the image.

Function documentation

static IWindow* UTFWin::IImageDrawable::AddImageWindow(const ResourceKey& imageName, float offsetX, float offsetY, IWindow* pParentWindow)

Creates an IWindow that will display the image with the name specified.

Parameters
imageName The ResourceKey of the image to display.
offsetX The X coordinate of the newly generated window, relative to its parent.
offsetY The Y coordinate of the newly generated window, relative to its parent.
pParentWindow The IWindow that will be the parent of the created window.
Returns The newly created window.

void UTFWin::IImageDrawable::SetImage(Image* pImage) pure virtual

Sets the image to be shown.

Parameters
pImage The image that will be used by this drawable.

int UTFWin::IImageDrawable::GetImageDrawableFlags() const pure virtual

Gets the flags used in this drawable.

The flags are the AbstractImageDrawable::kFlag... values.

void UTFWin::IImageDrawable::SetImageDrawableFlags(int flags) pure virtual

Sets the flags used in this drawable.

Parameters
flags The new flags value.

The flags are the AbstractImageDrawable::kFlag... values.

void UTFWin::IImageDrawable::SetImageDrawableFlag(int flag, bool bValue) pure virtual

Sets the specific drawable flag to the value given.

Parameters
flag The flag to set.
bValue The new bool value of the flag.

The possible flags are the AbstractImageDrawable::kFlag... values.

void UTFWin::IImageDrawable::SetTiling(ImageTiling tiling) pure virtual

Sets the tiling method that will be used in this drawable.

Parameters
tiling ImageTiling The tiling to use, in the ImageTiling enum.

void UTFWin::IImageDrawable::SetScale(float fScale) pure virtual

Sets the scale of the image.

Parameters
fScale The new scale value.

void UTFWin::IImageDrawable::SetAlignmentHorizontal(AlignmentH alignment) pure virtual

Sets the horizontal alignment of the image.

Parameters
alignment The new alignment value, in the enum AlignmentH.

void UTFWin::IImageDrawable::SetAlignmentVertical(AlignmentV alignment) pure virtual

Sets the vertical alignment of the image.

Parameters
alignment The new alignment value, in the enum AlignmentV.