equal
deleted
inserted
replaced
67 } |
67 } |
68 |
68 |
69 CCSXHHtmlTopicContainer::CCSXHHtmlTopicContainer(CCSXHDocument &aDocument,CCSXHHtmlTopicView *aView) |
69 CCSXHHtmlTopicContainer::CCSXHHtmlTopicContainer(CCSXHDocument &aDocument,CCSXHHtmlTopicView *aView) |
70 : iTopic(NULL),iDocument(aDocument),iView(aView) |
70 : iTopic(NULL),iDocument(aDocument),iView(aView) |
71 ,iAppLauncher(NULL), iLoadHtml(EFalse), iPrevPageCount(0), iBack(EFalse) |
71 ,iAppLauncher(NULL), iLoadHtml(EFalse), iPrevPageCount(0), iBack(EFalse) |
|
72 ,iContentLoading(ENoContent) |
72 |
73 |
73 { |
74 { |
74 // no implementation required |
75 // no implementation required |
75 } |
76 } |
76 |
77 |
163 |
164 |
164 } |
165 } |
165 |
166 |
166 void CCSXHHtmlTopicContainer::LoadHtmlL() |
167 void CCSXHHtmlTopicContainer::LoadHtmlL() |
167 { |
168 { |
|
169 iBrCtrl->MakeVisible( EFalse ); |
|
170 SetContentLoadState( EContentLoading ); |
168 HBufC8 *htmlBuffer = STATIC_CAST(HBufC8*,iTopic->GetTopicContentL()); |
171 HBufC8 *htmlBuffer = STATIC_CAST(HBufC8*,iTopic->GetTopicContentL()); |
169 if(htmlBuffer) |
172 if(htmlBuffer) |
170 { |
173 { |
171 CleanupStack::PushL(htmlBuffer); |
174 CleanupStack::PushL(htmlBuffer); |
172 TUid uid; |
175 TUid uid; |
270 |
273 |
271 void CCSXHHtmlTopicContainer::SizeChanged() |
274 void CCSXHHtmlTopicContainer::SizeChanged() |
272 { |
275 { |
273 #ifndef __SERIES60_30__ |
276 #ifndef __SERIES60_30__ |
274 if(iBrCtrl) |
277 if(iBrCtrl) |
275 iBrCtrl->SetRect(Rect()); |
278 { |
|
279 if ( iContentLoading != EContentLoading ) |
|
280 { |
|
281 iBrCtrl->SetRect(Rect()); |
|
282 iBrCtrl->MakeVisible(ETrue); |
|
283 } |
|
284 else |
|
285 { |
|
286 //Update the title bar |
|
287 CEikStatusPane* sp = CCSXHAppUi::GetInstance()->StatusPane(); |
|
288 CAknTitlePane* titlePane = STATIC_CAST(CAknTitlePane*, |
|
289 sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle))); |
|
290 titlePane->SetTextL(KNullDesC); |
|
291 |
|
292 iBrCtrl->SetRect(TRect(0,0,0,0)); |
|
293 } |
|
294 } |
276 #endif |
295 #endif |
277 } |
296 } |
278 |
297 |
279 void CCSXHHtmlTopicContainer::HandleCommandBackL() |
298 void CCSXHHtmlTopicContainer::HandleCommandBackL() |
280 { |
299 { |
418 void CCSXHHtmlTopicContainer::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, |
437 void CCSXHHtmlTopicContainer::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, |
419 TUint /*aSize*/, TUint16 /*aTransactionId*/) |
438 TUint /*aSize*/, TUint16 /*aTransactionId*/) |
420 { |
439 { |
421 if(aLoadEvent == TBrCtlDefs::EEventLoadFinished) |
440 if(aLoadEvent == TBrCtlDefs::EEventLoadFinished) |
422 { |
441 { |
|
442 SetContentLoadState( EContentLoadFinished ); |
423 if ( IsVisible() ) |
443 if ( IsVisible() ) |
424 { |
444 { |
425 HBufC* title = iBrCtrl->PageInfoLC(TBrCtlDefs::EPageInfoTitle); |
445 HBufC* title = iBrCtrl->PageInfoLC(TBrCtlDefs::EPageInfoTitle); |
426 if(!title) |
446 if(!title) |
427 { |
447 { |
592 } |
612 } |
593 |
613 |
594 return Result; |
614 return Result; |
595 } |
615 } |
596 |
616 |
|
617 void CCSXHHtmlTopicContainer::SetContentLoadState( TContentLoadState aLoadState ) |
|
618 { |
|
619 if ( iContentLoading == aLoadState ) |
|
620 { |
|
621 return; |
|
622 } |
|
623 else if ( NeedRefresh( aLoadState ) ) |
|
624 { |
|
625 iContentLoading = aLoadState; |
|
626 SizeChanged(); |
|
627 } |
|
628 else |
|
629 { |
|
630 iContentLoading = aLoadState; |
|
631 } |
|
632 } |
|
633 |
|
634 TBool CCSXHHtmlTopicContainer::NeedRefresh( const TContentLoadState aNewLoadState ) const |
|
635 { |
|
636 if ( |
|
637 ( iContentLoading == EContentLoading && aNewLoadState != EContentLoading ) |
|
638 ||( iContentLoading != EContentLoading && aNewLoadState == EContentLoading ) |
|
639 ) |
|
640 return ETrue; |
|
641 else |
|
642 return EFalse; |
|
643 } |
|
644 |
|
645 //end of the file |
|
646 |