Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CAUGuiGraphic Class Reference

Graphics, not just Images. More...

#include <CAUGuiTools.h>

Inheritance diagram for CAUGuiGraphic:

CAUGuiItem CAUGuiCroppingImage CAUGuiHandleImage CAUGuiSpinImage List of all members.

Public Member Functions

 CAUGuiGraphic (char *pngFileName)
 trivial graphic made up from .png resource file

 CAUGuiGraphic (char *pngFileName, UInt32 numFrames)
 stacked image (animation) made up from .png resource file

virtual ~CAUGuiGraphic ()
 destructor WARNING: kills all following Items in the CAUGuiItem linked list!!!

virtual bool isAnim ()
 frame based animated Graphics should implement this

virtual CGImageRef getImage ()
 for relicts in controls that want to draw'em themselves

virtual SInt32 getFrames ()
 number of frames

virtual SInt32 getWidth ()
 returns Width

virtual SInt32 getHeight ()
 returns Height

virtual void draw (CGContextRef context, UInt32 portHeight, eRect *rect, float value)
 letting Graphics draw themselves


Detailed Description

Graphics, not just Images.

CAUGuiGraphic is the base class of all types of graphical objects in CAUGui

The concept of hiding visual representation from actual control objects offers some possibilities:

Definition at line 378 of file CAUGuiTools.h.


Constructor & Destructor Documentation

CAUGuiGraphic::CAUGuiGraphic char *  pngFileName  ) 
 

trivial graphic made up from .png resource file

Definition at line 218 of file CAUGuiTools.cpp.

References kCAUGui_Graphic, and CAUGuiItem::setType().

CAUGuiGraphic::CAUGuiGraphic char *  pngFileName,
UInt32  numFrames
 

stacked image (animation) made up from .png resource file

Definition at line 232 of file CAUGuiTools.cpp.

References kCAUGui_Graphic, and CAUGuiItem::setType().

virtual CAUGuiGraphic::~CAUGuiGraphic  )  [inline, virtual]
 

destructor WARNING: kills all following Items in the CAUGuiItem linked list!!!

Definition at line 389 of file CAUGuiTools.h.


Member Function Documentation

void CAUGuiGraphic::draw CGContextRef  context,
UInt32  portHeight,
eRect rect,
float  value
[virtual]
 

letting Graphics draw themselves

Parameters:
context is the CGContextRef to render into
portHeight the height of the Window, needed for "upside down" Quartz drawing
rect the eRect where to draw into, does usually scale the image
value normalized between 0.f and 1.f, needed i.e. from frame based animation

Reimplemented in CAUGuiSpinImage, CAUGuiHandleImage, and CAUGuiCroppingImage.

Definition at line 265 of file CAUGuiTools.cpp.

References eRect::h, and eRect::to().

Referenced by CAUGuiLabel::draw(), CAUGuiSlider::draw(), CAUGuiSelector::draw(), CAUGuiMeter::draw(), CAUGuiKnob::draw(), and CAUGuiButton::draw().

virtual SInt32 CAUGuiGraphic::getFrames  )  [inline, virtual]
 

number of frames

Definition at line 408 of file CAUGuiTools.h.

SInt32 CAUGuiGraphic::getHeight  )  [virtual]
 

returns Height

Definition at line 260 of file CAUGuiTools.cpp.

Referenced by CAUGuiKnob::CAUGuiKnob(), CAUGuiSelector::CAUGuiSelector(), CAUGuiSlider::CAUGuiSlider(), CAUGuiSpinImage::CAUGuiSpinImage(), CAUGuiCroppingImage::draw(), CAUGuiHandleImage::draw(), and CAUGuiLabel::getHeight().

virtual CGImageRef CAUGuiGraphic::getImage  )  [inline, virtual]
 

for relicts in controls that want to draw'em themselves

Definition at line 405 of file CAUGuiTools.h.

Referenced by CAUGuiSlider::draw(), CAUGuiSelector::draw(), CAUGuiLayeredPane::draw(), CAUGuiPane::draw(), CAUGuiCroppingImage::draw(), CAUGuiHandleImage::draw(), CAUGuiSpinImage::draw(), CAUGuiMeter::draw(), CAUGuiKnob::draw(), CAUGuiDisplay::draw(), CAUGuiButton::draw(), PoofButton::idle(), and PoofButton::mouseDown().

SInt32 CAUGuiGraphic::getWidth  )  [virtual]
 

returns Width

Definition at line 250 of file CAUGuiTools.cpp.

Referenced by CAUGuiKnob::CAUGuiKnob(), CAUGuiSelector::CAUGuiSelector(), CAUGuiSlider::CAUGuiSlider(), CAUGuiSpinImage::CAUGuiSpinImage(), CAUGuiCroppingImage::draw(), CAUGuiHandleImage::draw(), and CAUGuiLabel::getWidth().

virtual bool CAUGuiGraphic::isAnim  )  [inline, virtual]
 

frame based animated Graphics should implement this

Definition at line 402 of file CAUGuiTools.h.


The documentation for this class was generated from the following files:
(c) 2002 - 2003 by Urs Heckmann www.u-he.com
Generated on Thu May 6 15:13:14 2004 for CAUGui by doxygen 1.3.6