108 } |
108 } |
109 |
109 |
110 |
110 |
111 void CPenUiWndCtrl::Draw(const TRect& aRect) const |
111 void CPenUiWndCtrl::Draw(const TRect& aRect) const |
112 { |
112 { |
113 if(iNotUpdating) |
113 if (iNotUpdating) |
114 return; |
114 return; |
115 |
115 |
116 CWindowGc& gc = SystemGc(); |
116 CWindowGc& gc = SystemGc(); |
117 |
117 if (iShowPopup) |
118 if ( iShowPopup ) |
|
119 { |
118 { |
120 //layout is extended by popup |
119 //layout is extended by popup |
121 gc.SetClippingRect( iLayoutClipRect ); |
120 TRect rect = aRect; |
122 } |
121 rect.Intersection(iLayoutClipRect); |
123 |
122 TPoint pos = rect.iTl - iLayoutClipRect.iTl; |
124 #ifdef FIX_FOR_NGA |
123 gc.BitBlt(pos, iBitmap, rect); |
125 gc.BitBlt(TPoint(0,0),iBitmap,Rect()); |
124 #ifdef FIX_FOR_NGA |
126 |
125 //draw bubble |
127 //draw bubble |
126 for (TInt i = 0; i < iBubblesArea.Count(); ++i) |
128 for(TInt i = 0 ; i < iBubblesArea.Count(); ++i) |
127 { |
129 { |
128 gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]); |
130 gc.BitBlt(iBubblesPos[i].iTl,iBubblesArea[i]); |
129 } |
131 } |
130 #endif |
132 #else |
131 return; |
133 gc.BitBlt(aRect.iTl,iBitmap,aRect); |
132 //layout is extended by popup |
134 #endif |
133 //gc.SetClippingRect( iLayoutClipRect ); |
|
134 } |
|
135 #ifdef FIX_FOR_NGA |
|
136 gc.BitBlt(TPoint(0, 0), iBitmap, Rect()); |
|
137 //draw bubble |
|
138 for (TInt i = 0; i < iBubblesArea.Count(); ++i) |
|
139 { |
|
140 gc.BitBlt(iBubblesPos[i].iTl, iBubblesArea[i]); |
|
141 } |
|
142 #else |
|
143 gc.BitBlt(aRect.iTl,iBitmap,aRect); |
|
144 #endif |
|
145 |
135 } |
146 } |
136 |
147 |
137 void CPenUiWndCtrl::RefreshUI() |
148 void CPenUiWndCtrl::RefreshUI() |
138 { |
149 { |
139 StopRefreshTimer(); |
150 StopRefreshTimer(); |
228 //when layout enabled. So we set the cursor invisible, and wait for next cursor updating event. |
239 //when layout enabled. So we set the cursor invisible, and wait for next cursor updating event. |
229 iCursorWnd->SetCursorVisible(EFalse); |
240 iCursorWnd->SetCursorVisible(EFalse); |
230 return; |
241 return; |
231 } |
242 } |
232 |
243 |
233 iCursorBmp = const_cast<CFbsBitmap*>(aCursorBmp); |
|
234 iCursorPos = aRect.iTl; |
244 iCursorPos = aRect.iTl; |
235 |
245 |
236 if(iCursorRect != aRect) |
246 if(iCursorRect != aRect) |
237 { |
247 { |
238 iCursorRect = aRect; |
248 iCursorRect = aRect; |
493 |
503 |
494 void CPenUiWndCtrl::OnActivate(EditorType aType) |
504 void CPenUiWndCtrl::OnActivate(EditorType aType) |
495 { |
505 { |
496 //TBool dim = IsDimmed(); |
506 //TBool dim = IsDimmed(); |
497 RestoreSystemFadeStatus(); |
507 RestoreSystemFadeStatus(); |
498 //have to call this, otherwise pen UI is faded |
508 |
499 iWndGroup.SetNonFading(ETrue); |
509 // if we were opened under a global note |
|
510 // we need to dim pen ui |
|
511 if(aType != EGlobleNotesWithEditor && aType != EGlobleNotes) |
|
512 { |
|
513 //have to call this, otherwise pen UI is faded |
|
514 iWndGroup.SetNonFading(ETrue); |
|
515 } |
500 |
516 |
501 if (iResourceChange) |
517 if (iResourceChange) |
502 { |
518 { |
503 return; |
519 return; |
504 } |
520 } |
718 } |
734 } |
719 break; |
735 break; |
720 case ESignalDisableUpdating: |
736 case ESignalDisableUpdating: |
721 { |
737 { |
722 iNotUpdating = * (reinterpret_cast<TBool*>( const_cast<TUint16*>( aEventData.Ptr() ))); |
738 iNotUpdating = * (reinterpret_cast<TBool*>( const_cast<TUint16*>( aEventData.Ptr() ))); |
|
739 if(iNotUpdating) |
|
740 { |
|
741 UpdateCursor(EFalse,NULL,iCursorWnd?iCursorWnd->Rect():TRect(TPoint(0,0),TSize(0,0))); |
|
742 } |
723 } |
743 } |
724 break; |
744 break; |
725 case ESignalDrawBackground: |
745 case ESignalDrawBackground: |
726 { |
746 { |
727 struct SData |
747 struct SData |
817 if ( iAutoRefreshTimer->IsActive() ) |
837 if ( iAutoRefreshTimer->IsActive() ) |
818 { |
838 { |
819 iAutoRefreshTimer->Cancel(); |
839 iAutoRefreshTimer->Cancel(); |
820 } |
840 } |
821 } |
841 } |
822 |
842 |
|
843 void CPenUiWndCtrl::LiftUpPriority() |
|
844 { |
|
845 TInt priority = GetWndPriority(); |
|
846 iPriority = priority; |
|
847 iWndGroup.SetOrdinalPosition( 0, iPriority); |
|
848 DrawableWindow()->SetOrdinalPosition( 0, iPriority); |
|
849 } |
|
850 |
823 //End Of File |
851 //End Of File |
824 // class CInternalBkCtrl |
852 // class CInternalBkCtrl |
825 CInternalBkCtrl::CInternalBkCtrl(RWindowGroup& aWndGroup) |
853 CInternalBkCtrl::CInternalBkCtrl(RWindowGroup& aWndGroup) |
826 :iWndGroup(aWndGroup) |
854 :iWndGroup(aWndGroup) |
827 { |
855 { |