GImageList Class Reference

A list of images/icons all the same size. More...

#include <GToolBar.h>

Inheritance diagram for GImageList:

GMemDC GSurface

List of all members.

Public Member Functions

 GImageList (int TileX, int TileY, GSurface *pDC=NULL)
 Create the image list.
int TileX ()
 Returns the width of each image.
int TileY ()
 Returns the height of each image.
int GetItems ()
 Gets the number of images in the list.
GRectGetBounds ()
void Update (int Flags)
void Draw (GSurface *pDest, int x, int y, int Image, int Flags=0)
 Draw an image onto a graphics surface.


Detailed Description

A list of images/icons all the same size.

Currently the image list treats the pixel at (0,0) as the transparent colour key.


Constructor & Destructor Documentation

GImageList::GImageList ( int  TileX,
int  TileY,
GSurface pDC = NULL 
)

Create the image list.

Parameters:
TileX  The width of each tile
TileY  The height of each tile
pDC  Initial data for the images

References GSurface::AlphaDC(), GdcRGB::B, B32, GMemDC::Blt(), GdcRGB::G, G32, GSurface::Get(), GSurface::GetBits(), GetBounds(), GSurface::HasAlpha(), IsAlpha, GPalette::MatchRgb(), GSurface::Palette(), GdcRGB::R, R32, Rgb24, GMemDC::Unlock(), GSurface::X(), and GSurface::Y().


Member Function Documentation

void GImageList::Draw ( GSurface pDest,
int  x,
int  y,
int  Image,
int  Flags = 0 
)

Draw an image onto a graphics surface.

Parameters:
pDest  The output surface
x  The x coord to draw the top-left corner
y  The y coord to draw the top-left corner
Image  A 0 based index into the list to draw
Flags  Drawing options
See also:
The defines starting at IMGLST_SELECTED in GToolBar.h

References A32, GSurface::Applicator(), GSurface::Blt(), CBit(), GSurface::Colour(), GDC_ALPHA, GSurface::Get(), GSurface::GetBits(), GPalette::GetSize(), GApplicator::GetVar(), GScreenDC::Handle(), IMGLST_DISABLED, GSurface::IsScreen(), LC_LIGHT, LC_LOW, LgiApp, GRect::Offset(), GSurface::Op(), GSurface::Set(), GRect::X(), GRect::x1, GRect::Y(), GRect::y1, and GRect::ZOff().

GRect * GImageList::GetBounds (  ) 

Finds the bounds of valid data for each image and returns it in an array valid from 0 to GetItems()-1.

References GSurface::Get(), and GetItems().

Referenced by GImageList().

void GImageList::Update ( int  Flags  )  [virtual]

Notifies the image list that it's image data has changed and it should flush any cached info about the images

Reimplemented from GSurface.


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

Generated on Wed Dec 1 15:41:03 2010 for Lgi by  doxygen 1.5.7.1