equal
deleted
inserted
replaced
28 // --------------------------------------------------------------------------- |
28 // --------------------------------------------------------------------------- |
29 // CMRButton::~CMRButton |
29 // CMRButton::~CMRButton |
30 // --------------------------------------------------------------------------- |
30 // --------------------------------------------------------------------------- |
31 // |
31 // |
32 EXPORT_C CMRButton* CMRButton::NewL( |
32 EXPORT_C CMRButton* CMRButton::NewL( |
33 NMRBitmapManager::TMRBitmapId aBitmapId, TScaleMode aScaleMode ) |
33 NMRBitmapManager::TMRBitmapId aBitmapId, |
|
34 const CCoeControl* aParent, |
|
35 TScaleMode aScaleMode |
|
36 ) |
34 { |
37 { |
35 CMRButton* self = new (ELeave) CMRButton( aScaleMode ); |
38 CMRButton* self = new (ELeave) CMRButton( aScaleMode ); |
36 CleanupStack::PushL( self ); |
39 CleanupStack::PushL( self ); |
37 self->ConstructL( aBitmapId ); |
40 self->ConstructL( aBitmapId, aParent ); |
38 CleanupStack::Pop( self ); |
41 CleanupStack::Pop( self ); |
39 return self; |
42 return self; |
40 } |
43 } |
41 |
44 |
42 // --------------------------------------------------------------------------- |
45 // --------------------------------------------------------------------------- |
72 |
75 |
73 // --------------------------------------------------------------------------- |
76 // --------------------------------------------------------------------------- |
74 // CMRButton::ConstructL |
77 // CMRButton::ConstructL |
75 // --------------------------------------------------------------------------- |
78 // --------------------------------------------------------------------------- |
76 // |
79 // |
77 void CMRButton::ConstructL( NMRBitmapManager::TMRBitmapId aBitmapId ) |
80 void CMRButton::ConstructL( |
|
81 NMRBitmapManager::TMRBitmapId aBitmapId, |
|
82 const CCoeControl* aParent ) |
78 { |
83 { |
79 CFbsBitmap* bitMap( NULL ); |
84 CFbsBitmap* bitMap( NULL ); |
80 CFbsBitmap* bitMapMask( NULL ); |
85 CFbsBitmap* bitMapMask( NULL ); |
81 TSize sz( Rect().Size() ); |
86 TSize sz( Rect().Size() ); |
82 User::LeaveIfError( NMRBitmapManager::GetSkinBasedBitmap( |
87 User::LeaveIfError( NMRBitmapManager::GetSkinBasedBitmap( |
91 NULL, |
96 NULL, |
92 NULL, |
97 NULL, |
93 KNullDesC(), |
98 KNullDesC(), |
94 KNullDesC(), |
99 KNullDesC(), |
95 KAknButtonNoFrame | KAknButtonPressedDownFrame ); |
100 KAknButtonNoFrame | KAknButtonPressedDownFrame ); |
|
101 |
|
102 if ( aParent ) |
|
103 { |
|
104 SetContainerWindowL( *aParent ); |
|
105 } |
96 } |
106 } |
97 |
107 |
98 // EOF |
108 // EOF |