MityDSP Documentation Index

MityDSP::tcGuiImage Class Reference

#include <ggui/gui_image.h>

Inheritance diagram for MityDSP::tcGuiImage:
MityDSP::tcGuiObject

List of all members.

Public Member Functions

 tcGuiImage (const char *name, tcBench *bench, int idd)
virtual ~tcGuiImage ()
virtual bool ParseXML (TiXmlElement *ahDom)
bool set_bitmap (const char *apFilename)
void create ()
void set_file (const char *file_name)
void set_trans_color (tsRgb color)
void set_section_count (int section_count)
virtual bool does_l_mouse ()
virtual void draw (tcGuiDspDisplay &pd)
void draw (tcGuiDspDisplay &pd, int x, int y)
void draw_section (tcGuiDspDisplay &pd, int x, int y, int offset)
int get_section_count ()

Static Public Member Functions

static void draw_default (tcGuiDspDisplay &pd, int x, int y)

Protected Attributes

GSTRING m_file_name
 source file name used to build image
bool m_has_trans
 has a color reserved as transparent
tsRgb m_trans_color
 the transparent color
const tcBitmap * m_bitmap
 the bitmap array data
int m_section_count
 the number of sections in the bitmap (tiled "horizontally")

Detailed Description

The tcGuiImage class is derived tcGuiObject class implementing image management.

See also:
tcGuiImage Page

Constructor & Destructor Documentation

tcGuiImage::tcGuiImage ( const char *  name,
tcBench bench,
int  idd 
)

Constructor

Parameters:
name Object ID name from the XML file.
bench The Controlling tcBench object for this widget.
name The windows control ID that we assigned to this control.
tcGuiImage::~tcGuiImage (  )  [virtual]

Destructor


Member Function Documentation

bool tcGuiImage::ParseXML ( TiXmlElement *  apElement  )  [virtual]

Parse common XML elements from the DOM.

Reimplemented from MityDSP::tcGuiObject.

bool tcGuiImage::set_bitmap ( const char *  apFilename  ) 

This routine sets the bitmap used for the image

Parameters:
pd reference to painting device context to render into.
x x location (screen coordinates) to draw to
y y location (screen coordinates) to draw to
void tcGuiImage::create (  )  [virtual]

This function creates the image control.

Note:
This function is called after all of the XML file settings are read.
the bitmap information is assumed to be stored in the same pixel depth as the active screen coordinates. No bitmap conversion is performed during creation.

Reimplemented from MityDSP::tcGuiObject.

void MityDSP::tcGuiImage::set_file ( const char *  file_name  )  [inline]
void MityDSP::tcGuiImage::set_trans_color ( tsRgb  color  )  [inline]
void MityDSP::tcGuiImage::set_section_count ( int  section_count  )  [inline]
virtual bool MityDSP::tcGuiImage::does_l_mouse (  )  [inline, virtual]

Reimplemented from MityDSP::tcGuiObject.

void tcGuiImage::draw ( tcGuiDspDisplay pd  )  [virtual]

This function draws the image to it's default position.

Parameters:
pd reference to painting device context to render into.

Reimplemented from MityDSP::tcGuiObject.

void tcGuiImage::draw ( tcGuiDspDisplay pd,
int  x,
int  y 
)

This function draws the image to the specified x/y location

Parameters:
pd reference to painting device context to render into.
x x location (screen coordinates) to draw to
y y location (screen coordinates) to draw to
void tcGuiImage::draw_section ( tcGuiDspDisplay pd,
int  x,
int  y,
int  offset 
)

This function draws a sub-section of an image to the specified location.

Parameters:
pd reference to painting device context to render into.
x x location (screen coordinates) to draw to
y y location (screen coordinates) to draw to
offset index number of section to display (0 <= index <= m_section_count)
Note:
if a bad offset is provided or the bitmap is not set, a red "X" is displayed on the screen.
void tcGuiImage::draw_default ( tcGuiDspDisplay pd,
int  x,
int  y 
) [static]

This routine draws a basic box with an "X" on the screen. It is primarily used to indicate a lack of bitmap information or an invalid section request.

Parameters:
pd reference to painting device context to render into.
x x location (screen coordinates) to draw to
y y location (screen coordinates) to draw to
int MityDSP::tcGuiImage::get_section_count (  )  [inline]

Member Data Documentation

source file name used to build image

has a color reserved as transparent

the transparent color

const tcBitmap* MityDSP::tcGuiImage::m_bitmap [protected]

the bitmap array data

the number of sections in the bitmap (tiled "horizontally")


  
Generated on Wed Mar 17 18:24:43 2010 for MityDSP Skinnable Graphics User Interface (GGUI) by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.