blob: 4aee3fcc640c72b324ba8c48821460d5fd63193f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// File: WNT_Icon.cxx
// Copyright: Open Cascade 2008
#include <WNT_Icon.ixx>
//=======================================================================
//function : WNT_Icon
//purpose :
//=======================================================================
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
//=======================================================================
//function : Destroy
//purpose :
//=======================================================================
void WNT_Icon::Destroy () {
delete [] myName;
} // end WNT_Icon :: Destroy
//=======================================================================
//function : SetName
//purpose :
//=======================================================================
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
|