Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CP_OSIcon Class Reference

Class for dealing with the native icon format on each supported platform.

Inheritance diagram for CP_OSIcon:

CP_M_RefCounted List of all members.

Public Member Functions

 CP_OSIcon (OSType inCreator, OSType inIconType, SInt16 inVRefNum=kOnSystemDisk)
 CP_OSIcon (OSType inCreator, OSType inType, const CP_String &inName)
IconRef RegisterIcon (OSType inCreator, OSType inType, const CP_String &inName)
Constructor / Destructor
 CP_OSIcon ()
 Constructor.
 CP_OSIcon (CP_E_IconStyle inIconType, SInt32 inIconID)
 CP_OSIcon (const CP_OSIcon &inOSIcon)
virtual ~CP_OSIcon () throw ()
 Destructor.
Drawing
void Draw (CP_Canvas &inDestCanvas, const CP_Rect &inBounds)
Getters
SInt16 Width ()
SInt16 Height ()
CP_E_IconStyle GetType ()
OSColorIcon GetColorIcon ()
OSIconRef GetIconRef ()
OSIconSuite GetIconSuite ()
Operators
CP_OSIconoperator= (const CP_OSIcon &inOSIcon)
Setters
void SetColorIcon (OSColorIcon inOSColorIcon)
void SetIconRef (OSIconRef inIconRef)
void SetIconSuite (OSIconSuite inIconSuite)

Protected Attributes

CP_E_IconStyle fIconType
OSIconRef fIconRef
OSIconSuite fIconSuite
OSColorIcon fColorIcon

Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_OSIcon::CP_OSIcon  ) 
 

Constructor.

Exceptions:
none 

CP_OSIcon::CP_OSIcon CP_E_IconStyle  inIconType,
SInt32  inIconID
 

Constructor.

Parameters:
inIconType The OSType of icon we are dealing with.
inIconID The resource id of the icon.
Exceptions:
none 

CP_OSIcon::CP_OSIcon const CP_OSIcon inOSIcon  ) 
 

CP_OSIcon::~CP_OSIcon  )  throw () [virtual]
 

Destructor.

Exceptions:
none 

CP_OSIcon::CP_OSIcon OSType  inCreator,
OSType  inIconType,
SInt16  inVRefNum = kOnSystemDisk
 

Constructor.

Parameters:
inCreator The creator code for the icons creator.
inIconType The type of icon we are looking for.
inVRefNum The volume reference number where the icon is located.
Exceptions:
none 

CP_OSIcon::CP_OSIcon OSType  inCreator,
OSType  inType,
const CP_String inName
 

Constructor.

Parameters:
inCreator The creator code for the icons creator.
inType The icon identifier.
inName Name of the icns icon.
Exceptions:
none 


Member Function Documentation

void CP_OSIcon::Draw CP_Canvas inDestCanvas,
const CP_Rect inBounds
 

Draw the icon into the passed in canvas object, and optionally scaling to fit the passed in bounds, if supported by the underlying OS.

Parameters:
inDestCanvas The canvas to draw the icon into.
inBounds The destination bounds to draw the icon into.
Exceptions:
none 
Returns:
void

SInt16 CP_OSIcon::Width  ) 
 

Returns the width of the icon.

Exceptions:
none 
Returns:
SInt16

SInt16 CP_OSIcon::Height  ) 
 

Returns the height of the icon.

Exceptions:
none 
Returns:
SInt16

CP_E_IconStyle CP_OSIcon::GetType  ) 
 

Returns the OS type of the icon we are handling. This can be one of the following values:

  • kCP_IconStyle_UnknownType,
  • kCP_IconStyle_IconRef,
  • kCP_IconStyle_IconSuite,
  • kCP_IconStyle_ColorIcon,
  • kCP_IconStyle_DefaultSystemType

Exceptions:
none 
Returns:
float const Width of this object.

OSColorIcon CP_OSIcon::GetColorIcon  ) 
 

Returns the OSColorIcon if this icon represents that type of icon, otherwise NULL is returned.

Exceptions:
none 
Returns:
OSColorIcon OSColorIcon for this icon.

OSIconRef CP_OSIcon::GetIconRef  ) 
 

Returns the OSIconRef if this icon represents that type of icon, otherwise NULL is returned.

Exceptions:
none 
Returns:
OSIconRef OSIconRef for this icon.

OSIconSuite CP_OSIcon::GetIconSuite  ) 
 

Returns the OSIconSuite if this icon represents that type of icon, otherwise NULL is returned.

Exceptions:
none 
Returns:
OSIconSuite OSIconSuite for this icon.

CP_OSIcon & CP_OSIcon::operator= const CP_OSIcon inOSIcon  ) 
 

void CP_OSIcon::SetColorIcon OSColorIcon  inOSColorIcon  ) 
 

void CP_OSIcon::SetIconRef OSIconRef  inIconRef  ) 
 

void CP_OSIcon::SetIconSuite OSIconSuite  inIconSuite  ) 
 

IconRef CP_OSIcon::RegisterIcon OSType  inCreator,
OSType  inType,
const CP_String inName
 

UInt32 CP_M_RefCounted::AddReference  )  const [inherited]
 

Add a reference to our object, returning the new reference count.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

UInt32 CP_M_RefCounted::RemoveReference  )  const [inherited]
 

Remove a reference to our object, returning the new reference count. If the count is 0, then this object is also deleted, and 0 is returned.

Exceptions:
none 
Returns:
UInt32 const Returns the new reference count.

void CP_M_RefCounted::Autorelease  )  const [inherited]
 

Add the object to the topmost auto-release pool. This will ensure that the object is eventually released.

See also:
CP_AutoReleasePool
Exceptions:
none 
Returns:
void

UInt32 CP_M_RefCounted::GetRefCount  )  const [inherited]
 

Returns the current ref count.

Exceptions:
none 
Returns:
UInt32 The current referencce count.


Member Data Documentation

CP_E_IconStyle CP_OSIcon::fIconType [protected]
 

OSIconRef CP_OSIcon::fIconRef [protected]
 

OSIconSuite CP_OSIcon::fIconSuite [protected]
 

OSColorIcon CP_OSIcon::fColorIcon [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:55 2005 for CPLAT by  doxygen 1.4.0