#include <WNT_Icon.ixx>

WNT_Icon :: WNT_Icon (
             const Standard_CString aName,
             const Aspect_Handle&   aBitmap,
             const Standard_Integer aHashCode
            ) : WNT_Image ( aBitmap, aHashCode ) {

 myName = new char[ strlen ( aName ) + 1 ];

 strcpy ( myName, aName );

}  // end constructor

void WNT_Icon :: Destroy () {

 delete [] myName;

}  // end WNT_Icon :: Destroy

void WNT_Icon :: SetName ( const Standard_CString aName ) {

 if (  strlen ( myName ) < strlen ( aName )  ) {
 
  delete [] myName;

  myName = new char[ strlen ( aName ) + 1 ];
 
 }  // end if

 strcpy ( myName, aName );

}  // end WNT_Icon :: SetName
