2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 /*@file: IntAddressbar
19 *@brief: This class defines common behaviour of Addressbar control.
23 #include "IntAddressbar.h"
24 #include "IntCommonLib.h"
26 #include "IntMultipleWindowPresentationModel.h"
27 #include "IntSettingPresentationModel.h"
28 #include "IntMultipleWindowPresentationModel.h"
30 using namespace Tizen::App;
31 using namespace Tizen::Base;
32 using namespace Tizen::Ui;
33 using namespace Tizen::Ui::Controls;
34 using namespace Tizen::Graphics;
36 static const wchar_t* IDB_SEARCH_INPUT_FIELD_BG = L"I01_toolbar_input_field.9.png";
37 static const wchar_t* IDB_TITLE_PROGRESS_BAR_BG = L"I01_title_progress_bar_bg.png";
38 static const wchar_t* IDB_TITLE_PROGRESS_BAR = L"I01_title_progress_bar.png";
39 static const wchar_t* IDB_ICON_PRIVATE = L"I01_icon_private.png";
42 const int Addressbar::IDA_REFRESH_BTN_CLICKED = 101;
43 const int Addressbar::IDA_READER_BTN_CLICKED = 102;
44 const int Addressbar::IDA_STOP_BTN_CLICKED = 103;
45 const int Addressbar::IDA_GO_BACK = 104;
46 const int Addressbar::IDA_GO_FORWARD = 105;
47 const int Addressbar::IDA_CANCEL = 106;
48 const int Addressbar::IDA_CLEAR_URL = 107;
50 Addressbar::Addressbar(void)
52 __currentAddMode = ADDRESSBAR_MODE_LOADING_COMPLETE;
55 __isLoadingData = false;
56 __isLoadingCompleted = false;
57 __progressPercentage = 0;
58 __pAddressbarBg = null;
62 __pFavIcon = FaviconManager::GetInstance()->GetDefaultFaviconN();
63 __pFaviconLabel = null;
65 __pGoForwardBtn = null;
66 __pLabelPrivateOn = null;
68 __pPrivateIconLabel = null;
69 __pProgressbarLabel = null;
70 __pPrivateIconLabel = null ;
75 __pSearchLabel = null;
79 Addressbar::~Addressbar(void)
81 if (__pFavIcon != null)
89 Addressbar::Initialize(const Rectangle& rect)
93 AppLogDebug("Addressbar::Initialize entered");
94 //Construct the base first
95 r = Construct(L"IDL_ADDRESSBAR");
97 //Add background label
98 Label* pBgLabel = static_cast<Label*> (GetControl(L"IDC_BG_LABEL",true));
101 AppLogDebug("Control not found returning E_INVALID_KEY");
102 return E_INVALID_KEY;
105 //Add inner panel for border
106 __pBgPanel = static_cast<Panel*> (GetControl(L"IDC_BG_PANEL",true));
107 if (__pBgPanel == NULL)
109 AppLogDebug("Control not found returning E_INVALID_KEY");
110 return E_INVALID_KEY;
113 __pLabelPrivateOn = static_cast<Label*> (GetControl(L"IDC_LABEL_PRIVATE_ON",true));
115 if (__pLabelPrivateOn == NULL)
117 AppLogDebug("Control not found returning E_INVALID_KEY");
118 return E_INVALID_KEY;
120 __pLabelPrivateOn->SetShowState(false);
122 __pAddressbarBg = static_cast<Label*> (GetControl(L"IDC_ADDRESSBAR_BG_LABEL",true));
123 if (__pAddressbarBg == NULL)
125 AppLogDebug("Control not found returning E_INVALID_KEY");
126 return E_INVALID_KEY;
128 __pBgPanel->SetBackgroundColor(CUSTOM_COLOR_TRANSPARENT);
129 Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_SEARCH_INPUT_FIELD_BG, __pAddressbarBg->GetWidth(), __pAddressbarBg->GetHeight());
132 __pAddressbarBg->SetBackgroundBitmap(*pBitmap);
136 //Add the backround label for displaying progressbar
137 __pProgressbarLabel = static_cast<Label*> (GetControl(L"IDC_PROGRESS_BAR_LABEL",true));
138 if (__pProgressbarLabel == NULL)
140 AppLogDebug("Control not found returning E_INVALID_KEY");
141 return E_INVALID_KEY;
143 __pProgressbarLabel->SetShowState(false);
145 //Add the go Back Button
146 __pGoBackBtn = static_cast<Button*> (GetControl(L"IDC_BACKWARD_BUTTON",true));
147 if (__pGoBackBtn == NULL)
149 AppLogDebug("Control not found returning E_INVALID_KEY");
150 return E_INVALID_KEY;
152 __pGoBackBtn->SetActionId(IDA_GO_BACK);
153 __pGoBackBtn->AddActionEventListener(*this);
154 __pGoBackBtn->SetEnabled(false);
156 //Add the go forward Button
157 __pGoForwardBtn = static_cast<Button*> (GetControl(L"IDC_FORWARD_BUTTON",true));
158 if (__pGoForwardBtn == NULL)
160 AppLogDebug("Control not found returning E_INVALID_KEY");
161 return E_INVALID_KEY;
163 __pGoForwardBtn->SetActionId(IDA_GO_FORWARD);
164 __pGoForwardBtn->AddActionEventListener(*this);
165 __pGoForwardBtn->SetEnabled(false);
169 __pFaviconLabel = static_cast<Label*> (GetControl(L"IDC_FAVICON_BUTTON",true));
170 if (__pFaviconLabel == NULL)
172 AppLogDebug("Control not found returning E_INVALID_KEY");
173 return E_INVALID_KEY;
176 __pFaviconLabel->SetShowState(false);
178 //Add the search icon
179 __pSearchLabel = static_cast<Label*> (GetControl(L"IDC_SEARCH_BUTTON",true));
180 if (__pSearchLabel == NULL)
182 AppLogDebug("Control not found returning E_INVALID_KEY");
183 return E_INVALID_KEY;
186 __pSearchLabel->SetShowState(true);
188 //Add the refresh button
189 __pRefreshBtn = static_cast<Button*> (GetControl(L"IDC_REFRESH_BUTTON",true));
190 if (__pRefreshBtn == NULL)
192 AppLogDebug("Control not found returning E_INVALID_KEY");
193 return E_INVALID_KEY;
196 __pRefreshBtn->SetActionId(IDA_REFRESH_BTN_CLICKED);
197 __pRefreshBtn->AddActionEventListener(*this);
198 __pRefreshBtn->SetShowState(true);
201 //Add the stop button
202 __pStopBtn = static_cast<Button*> (GetControl(L"IDC_STOP_BUTTON",true));
203 if (__pStopBtn == NULL)
205 AppLogDebug("Control not found returning E_INVALID_KEY");
206 return E_INVALID_KEY;
208 __pStopBtn->SetActionId(IDA_STOP_BTN_CLICKED);
209 __pStopBtn->AddActionEventListener(*this);
210 __pStopBtn->SetShowState(false);
213 //Add the reader button
214 __pReaderBtn = static_cast<Button*> (GetControl(L"IDC_READER_BUTTON",true));
215 if (__pReaderBtn == NULL)
217 AppLogDebug("Control not found returning E_INVALID_KEY");
218 return E_INVALID_KEY;
221 __pReaderBtn->SetActionId(IDA_READER_BTN_CLICKED);
222 __pReaderBtn->AddActionEventListener(*this);
223 __pReaderBtn->SetShowState(false);
225 __pClearBtn = static_cast<Button*> (GetControl(L"IDC_CLEAR_BUTTON",true));
226 if (__pClearBtn == NULL)
228 AppLogDebug("Control not found returning E_INVALID_KEY");
229 return E_INVALID_KEY;
231 __pClearBtn->SetActionId(IDA_CLEAR_URL);
232 __pClearBtn->AddActionEventListener(*this);
233 __pClearBtn->SetShowState(false);
235 //Add the editfield for url
236 __pUrlField = static_cast<EditField*> (GetControl(L"IDC_URL_EDITFIELD",true));
237 if (__pUrlField == NULL)
239 AppLogDebug("Control not found returning E_INVALID_KEY");
240 return E_INVALID_KEY;
243 __pUrlField->SetOverlayKeypadCommandButtonVisible(false);
244 __pUrlField->SetKeypadAction(KEYPAD_ACTION_GO);
246 //Add the Cancel Button
247 __pCancelBtn = static_cast<Button*> (GetControl(L"IDC_CANCEL_BUTTON",true));
248 if (__pCancelBtn == NULL)
250 AppLogDebug("Control not found returning E_INVALID_KEY");
251 return E_INVALID_KEY;
253 __pCancelBtn->SetActionId(IDA_CANCEL);
254 __pCancelBtn->AddActionEventListener(*this);
255 __pCancelBtn->SetShowState(false);
256 // Added to get the favorite url if not set then address bar is about blank
258 if (SettingPresentationModel::GetInstance()->GetHomepage().CompareTo(CommonUtil::GetString(L"IDS_BR_BODY_MOST_VISITED_SITES")) == 0)
260 __pUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_SEARCH_OR_ENTER_URL"));
262 else if (SettingPresentationModel::GetInstance()->GetHomepage().CompareTo(CommonUtil::GetString(L"IDS_BR_BODY_BLANK_PAGE")) == 0)
264 __pUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_ABOUT_C_BLANK"));
268 //__pUrlField->SetText(SettingPresentationModel::GetInstance()->GetFavoriteURL());
269 __pUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_SEARCH_OR_ENTER_URL"));
271 __pUrlField->AddKeypadEventListener(*this);
273 AppLogDebug("Addressbar::Initialize exit");
278 Addressbar::UpdateProgressBitmap(void)
280 result r = E_SUCCESS;
281 if (__pProgressbarLabel == null)
283 int w = __pProgressbarLabel->GetWidth();
284 int h = __pProgressbarLabel->GetHeight();
286 int progressWidth = 0;
287 Bitmap* pRetBitmap = null;
289 if (__progressPercentage == 0 || __progressPercentage == 100)
291 __pProgressbarLabel->SetShowState(false);
292 __pProgressbarLabel->Invalidate(false);
297 __pProgressbarLabel->SetShowState(true);
298 __pProgressbarLabel->Invalidate(false);
301 r = canvas.Construct(Rectangle(0, 0, w, h));
305 AppLogException("Canvas construction failed with %s", GetErrorMessage(r));
310 Bitmap *pBgBmp = AppResource::GetInstance()->GetBitmapN(IDB_TITLE_PROGRESS_BAR_BG);
314 pBgBmp->Scale(Dimension(w, h));
315 canvas.DrawBitmap(Point(0,0), *pBgBmp);
319 progressWidth = (double) (w) * __progressPercentage / 100;
320 AppLogDebug("progressWidth: %d", progressWidth);
321 Bitmap *pProgressBmp = AppResource::GetInstance()->GetBitmapN(IDB_TITLE_PROGRESS_BAR);
323 if (pProgressBmp != null)
325 pProgressBmp->Scale(Dimension(progressWidth, h));
326 canvas.DrawBitmap(Point(0,0), *pProgressBmp);
330 pRetBitmap = new (std::nothrow) Bitmap();
332 if (pRetBitmap == null)
334 AppLogException("Bitmap creation failed with %s", GetErrorMessage(r));
338 pRetBitmap->Construct(canvas, canvas.GetBounds());
340 if (__pProgressbarLabel != null && pRetBitmap != null)
342 __pProgressbarLabel->SetBackgroundBitmap(*pRetBitmap);
343 __pProgressbarLabel->Invalidate(false);
347 if (pRetBitmap != null)
356 Addressbar::SetUrl(const String& url)
359 String updatedDisplayUrl;
360 updatedDisplayUrl.Clear();
362 if (__pUrlField != NULL)
364 String removedHttpUrl = RemoveHttpTextFromDisplayURL();
365 if (removedHttpUrl.IsEmpty() == false)
367 __pUrlField->SetText(removedHttpUrl);
371 __pUrlField->SetText(__displayUrl);
374 __pUrlField->Invalidate(false);
375 __pUrlField->SetCursorPosition(0);
380 Addressbar::GetUrl(void)
386 Addressbar::GetAddressbarMode(void)
388 return __currentAddMode;
392 Addressbar::SetAddressbarMode(AddressBarMode addMode)
394 AppLogDebug("AddressBar::setAddressbarMode to %d",addMode);
396 __currentAddMode = addMode;
400 case ADDRESSBAR_MODE_INVALID:
405 case ADDRESSBAR_MODE_READER:
407 __pBgPanel->SetPosition(__pGoBackBtn->GetPosition().x + 2* __pGoBackBtn->GetWidth() + 13,__pBgPanel->GetPosition().y);
408 __pSearchLabel->SetShowState(false);
409 __pFaviconLabel->SetShowState(true);
410 __pCancelBtn->SetShowState(false);
411 __pRefreshBtn->SetShowState(false);
412 __pStopBtn->SetShowState(false);
413 __pReaderBtn->SetShowState(true);
414 __pReaderBtn->Invalidate(true);
415 __pGoForwardBtn->SetShowState(true);
416 __pGoBackBtn->SetShowState(true);
417 __pClearBtn->SetShowState(false);
422 case ADDRESSBAR_MODE_LOADING:
424 __pBgPanel->SetPosition(__pGoBackBtn->GetPosition().x + 2* __pGoBackBtn->GetWidth() + 13,__pBgPanel->GetPosition().y);
425 __pSearchLabel->SetShowState(false);
426 __pFaviconLabel->SetShowState(true);
427 __pCancelBtn->SetShowState(false);
428 __pRefreshBtn->SetShowState(false);
429 __pStopBtn->SetShowState(true);
430 __pReaderBtn->SetShowState(false);
431 __pGoForwardBtn->SetShowState(true);
432 __pGoBackBtn->SetShowState(true);
433 __pClearBtn->SetShowState(false);
438 case ADDRESSBAR_MODE_LOADING_COMPLETE:
440 __pBgPanel->SetPosition(__pGoBackBtn->GetPosition().x + 2* __pGoBackBtn->GetWidth() + 13,__pBgPanel->GetPosition().y);
441 __pCancelBtn->SetShowState(false);
443 if (__pUrlField && __pUrlField->GetText().IsEmpty() == false)
446 __pSearchLabel->SetShowState(false);
447 __pFaviconLabel->SetShowState(true);
451 __pSearchLabel->SetShowState(true);
452 __pFaviconLabel->SetShowState(false);
455 if (__pUrlField != NULL)
457 __pUrlField->SetText(__displayUrl);
458 __pUrlField->HideKeypad();
461 __pRefreshBtn->SetShowState(true);
462 __pStopBtn->SetShowState(false);
463 __pReaderBtn->SetShowState(false);
464 __pGoForwardBtn->SetShowState(true);
465 __pGoBackBtn->SetShowState(true);
466 __pClearBtn->SetShowState(false);
469 case ADDRESSBAR_MODE_EDIT:
471 __pBgPanel->SetPosition(__pGoBackBtn->GetPosition().x,__pBgPanel->GetPosition().y);
472 __pCancelBtn->SetShowState(true);
473 __pRefreshBtn->SetShowState(false);
474 __pStopBtn->SetShowState(false);
475 __pReaderBtn->SetShowState(false);
476 __pGoForwardBtn->SetShowState(false);
477 __pGoBackBtn->SetShowState(false);
478 __pClearBtn->SetShowState(true);
479 if (__pUrlField && __pUrlField->GetText().IsEmpty() == true)
481 __pSearchLabel->SetShowState(true);
482 __pFaviconLabel->SetShowState(false);
486 __pSearchLabel->SetShowState(false);
487 __pFaviconLabel->SetShowState(true);
489 if (__pUrlField != NULL)
491 __pUrlField->SetCursorPosition(__pUrlField->GetTextLength());
498 if (__pAddressbarBg->GetWidth() != __pBgPanel->GetWidth())
500 __pAddressbarBg->SetBounds(Rectangle(0, 0, __pBgPanel->GetWidth(), __pBgPanel->GetHeight()));
501 Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.9.png", __pAddressbarBg->GetWidth(), __pAddressbarBg->GetHeight());
504 __pAddressbarBg->SetBackgroundBitmap(*pBitmap);
511 if (__pListener != null)
513 __pListener->OnAddressBarModeChanged(*this);
518 Addressbar::SetFaviconBitmap(const Tizen::Graphics::Bitmap& favicon)
521 String url =__pUrlField->GetText();
522 String secureSiteText = "https://";
524 flag = url.StartsWith(secureSiteText,0);
526 if (__pFavIcon != null)
531 __pFavIcon = new(std::nothrow) Bitmap();
532 __pFavIcon->Construct(favicon,Rectangle(0,0,favicon.GetWidth(),favicon.GetHeight()));
536 Bitmap* pButtonImage = GetLockedImageN();
538 if (pButtonImage != null)
540 __pFaviconLabel->SetBackgroundBitmap(*pButtonImage);
541 __pFaviconLabel->Invalidate(true);
547 if (__pFaviconLabel != null)
549 __pFaviconLabel->SetBackgroundBitmap(*__pFavIcon);
550 __pFaviconLabel->Invalidate(true);
555 void Addressbar::SaveAddressbarEditText()
557 __editTextUrl = __pUrlField->GetText();
561 Addressbar::UpdateFaviconBitmap(bool isPrivateOn)
564 String url =__pUrlField->GetText();
565 String secureSiteText = "https://";
567 flag = url.StartsWith(secureSiteText,0);
569 if (isPrivateOn == true)
571 __pUrlField->SetBounds(__pLabelPrivateOn->GetBounds().x + __pLabelPrivateOn->GetBounds().width,__pUrlField->GetBounds().y , __pAddressbarBg->GetBounds().width - __pLabelPrivateOn->GetBounds().width - __pRefreshBtn->GetBounds().width - __pSearchLabel->GetBounds().width,__pUrlField->GetBounds().height );
572 __pLabelPrivateOn->SetShowState(true);
577 __pUrlField->SetBounds(__pLabelPrivateOn->GetBounds().x ,__pUrlField->GetBounds().y , __pAddressbarBg->GetBounds().width - __pRefreshBtn->GetBounds().width - __pSearchLabel->GetBounds().width,__pUrlField->GetBounds().height );
578 __pLabelPrivateOn->SetShowState(false);
584 Bitmap* pButtonImage = GetLockedImageN();
586 if (pButtonImage != null)
588 __pFaviconLabel->SetBackgroundBitmap(*pButtonImage);
589 __pFaviconLabel->Invalidate(true);
595 if (__pFaviconLabel != null)
597 __pFaviconLabel->SetBackgroundBitmap(*__pFavIcon);
598 __pFaviconLabel->Invalidate(true);
603 __pAddressbarBg->Invalidate(true);
607 Addressbar::SetForwardButtonEnabled(bool isEnabled)
609 __pGoForwardBtn->SetEnabled(isEnabled);
610 __pGoBackBtn->Invalidate(true);
614 Addressbar::SetBackButtonEnabled(bool isEnabled)
616 __pGoBackBtn->SetEnabled(isEnabled);
617 __pGoBackBtn->Invalidate(true);
621 Addressbar::SetAddressbarEventListener(IAddressbarEventListener* plistener)
623 __pListener = plistener;
627 Addressbar::UpdateProgress(int percentage)
629 __progressPercentage = percentage;
630 if (percentage == 0 || percentage == 100)
632 __isLoadingData = false;
633 if (percentage == 100)
635 __isLoadingCompleted = true;
636 __progressPercentage = 0;
640 __isLoadingCompleted = false;
645 __isLoadingData = true;
647 UpdateProgressBitmap();
651 Addressbar::GetProgress(void)
653 return __progressPercentage;
657 Addressbar::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
659 AppLogDebug("Addressbar::OnActionPerformed action %d",actionId);
663 case IDA_REFRESH_BTN_CLICKED:
664 __isLoadingCompleted = false;
665 __isLoadingData = true;
666 __progressPercentage = 0;
667 __pUrlField->HideKeypad();
668 __displayUrl = __pUrlField->GetText();
670 if (__pListener != NULL)
672 __pListener->OnUrlSubmitted(*this);
675 UpdateProgressBitmap();
678 case IDA_STOP_BTN_CLICKED:
679 __isLoadingCompleted = false;
680 __isLoadingData = false;
681 __progressPercentage = 0;
682 __pUrlField->HideKeypad();
683 __displayUrl = __pUrlField->GetText();
685 if (__pListener != NULL)
687 __pListener->OnStopClicked(*this);
690 UpdateProgressBitmap();
692 case IDA_READER_BTN_CLICKED:
693 __pUrlField->HideKeypad();
694 __displayUrl = __pUrlField->GetText();
696 if (__pListener != NULL)
698 __pListener->OnReaderClicked(*this);
705 if (__pListener != NULL)
707 __pListener->OnBackClicked(*this);
715 if (__pListener != NULL )
716 __pListener->OnForwardClicked(*this);
722 __pListener->OnAddressCancelledClicked(*this);
723 __pUrlField->SetText(__displayUrl);
725 __pUrlField->HideKeypad();
726 SetAddressbarMode(ADDRESSBAR_MODE_LOADING_COMPLETE);
732 if (__pUrlField->GetText().IsEmpty() == false)
734 //__displayUrl = __pUrlField->GetText();
735 __pUrlField->Clear();
736 __pUrlField->Invalidate(true);
746 Addressbar::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
748 AppLog("Addressbar::OnKeypadActionPerformed keypadAction %d",keypadAction);
749 switch (keypadAction)
751 case KEYPAD_ACTION_GO:
752 case KEYPAD_ACTION_ENTER:
753 case KEYPAD_ACTION_SEND:
755 if (__pUrlField->GetText().IsEmpty() == false)
757 SetAddressbarMode(ADDRESSBAR_MODE_LOADING);
758 __displayUrl = __pUrlField->GetText();
760 __isLoadingCompleted = false;
761 __isLoadingData = true;
762 __progressPercentage = 0;
763 __pUrlField->HideKeypad();
765 if (__pListener != NULL)
767 __pListener->OnUrlSubmitted(*this);
769 UpdateProgressBitmap();
781 Addressbar::OnKeypadClosed(Tizen::Ui::Control& source)
783 __pListener->OnAddressBarKeypadClosed(*this);
787 Addressbar::OnKeypadOpened(Tizen::Ui::Control& source)
789 // __pListener->OnAddressBarKeypadOpened(*this);
790 __pListener->OnAddressBarKeypadOpened(*this);
794 Addressbar::OnKeypadWillOpen(Tizen::Ui::Control& source)
796 SetAddressbarMode(ADDRESSBAR_MODE_EDIT);
797 // SetAddressbarMode(__prevAddMode);
798 if(__pListener != null)
800 __pListener->OnAddressBarKeypadWillOpen(*this);
804 Addressbar::OrientationChanged(void)
806 Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_SEARCH_INPUT_FIELD_BG, __pAddressbarBg->GetWidth(), __pAddressbarBg->GetHeight());
809 __pAddressbarBg->SetBackgroundBitmap(*pBitmap);
816 Addressbar::RemoveHttpTextFromDisplayURL(void)
818 bool isHttpText = __displayUrl.Contains(L"http://");
819 String updatedDisplayUrl;
820 updatedDisplayUrl.Clear();
822 if (isHttpText == true)
824 __displayUrl.SubString(7,updatedDisplayUrl);
826 return updatedDisplayUrl;
830 Addressbar::GetLockedImageN(void)
832 Bitmap* pIconImage = null;
834 AppResource* pAppResource = Application::GetInstance()->GetAppResource();
837 pIconImage = pAppResource->GetBitmapN(IDB_ICON_PRIVATE);
840 Bitmap* pLockImage = new (std::nothrow) Bitmap();
842 Canvas* pCanvas = new (std::nothrow) Canvas();
843 pCanvas->Construct(Rectangle(0,0,__pFaviconLabel->GetWidth(),__pFaviconLabel->GetHeight()));
845 pCanvas->DrawBitmap(Rectangle(0,0,__pFaviconLabel->GetWidth(),__pFaviconLabel->GetHeight()),*__pFavIcon);
846 pCanvas->DrawBitmap(Rectangle(__pFaviconLabel->GetWidth()/2,__pFaviconLabel->GetHeight()/2,__pFaviconLabel->GetWidth()/2,__pFaviconLabel->GetHeight()/2),*pIconImage);
847 pLockImage->Construct(*pCanvas,Rectangle(0,0,__pFaviconLabel->GetWidth(),__pFaviconLabel->GetHeight()));