Removed SetImageSource() API from Control codes
authorBongjoo Seo <bongjoo.seo@samsung.com>
Mon, 10 Jun 2013 09:05:51 +0000 (18:05 +0900)
committerBongjoo Seo <bongjoo.seo@samsung.com>
Mon, 10 Jun 2013 09:14:45 +0000 (18:14 +0900)
Change-Id: Iec5b6448490d6fedf1ef318ca3c7d330d5adbf2c
Signed-off-by: Bongjoo Seo <bongjoo.seo@samsung.com>
src/ui/controls/FUiCtrl_AnimationPresenter.cpp
src/ui/controls/FUiCtrl_ButtonPresenter.cpp
src/ui/controls/FUiCtrl_IconListItem.cpp
src/ui/controls/FUiCtrl_IconListPresenter.cpp
src/ui/controls/FUiCtrl_LabelPresenter.cpp
src/ui/controls/FUiCtrl_SearchBarPresenter.cpp
src/ui/controls/FUiCtrl_TableViewItem.cpp

index 238a0e5..65c0ca7 100644 (file)
@@ -367,14 +367,14 @@ _AnimationPresenter::Draw(void)
                        imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName();
                }
 
-               if(!imagePath.IsEmpty())
+//             if(!imagePath.IsEmpty())
+//             {
+//                     __pVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
+//                     __pVisualElement->SetImageSource(imagePath);
+//             }
+//             else
                {
-                       __pVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
-                       __pVisualElement->SetImageSource(imagePath);
-               }
-               else
-               {
-                       __pVisualElement->SetImageSource(L"");
+//                     __pVisualElement->SetImageSource(L"");
                        pCanvas = __pAnimation->GetCanvasN();
 
                        SysTryReturnResult(NID_UI_CTRL, pCanvas != null, E_SYSTEM, "A system error has occurred. Failed to get the animation canvas.");
index 3d8210a..db7d280 100644 (file)
@@ -348,17 +348,17 @@ _ButtonPresenter::DrawBackground(void)
                                imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
                        }
 
-                       if (imagePath.IsEmpty() == false && __pButton->GetText() == L""
-                                       && __pButton->GetBitmap(_BUTTON_STATUS_NORMAL) == null && __pButton->GetBitmap(_BUTTON_STATUS_DISABLED) == null
-                                       && __pButton->GetBitmap(_BUTTON_STATUS_PRESSED) == null && __pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) == null)
+//                     if (imagePath.IsEmpty() == false && __pButton->GetText() == L""
+//                                     && __pButton->GetBitmap(_BUTTON_STATUS_NORMAL) == null && __pButton->GetBitmap(_BUTTON_STATUS_DISABLED) == null
+//                                     && __pButton->GetBitmap(_BUTTON_STATUS_PRESSED) == null && __pButton->GetBitmap(_BUTTON_STATUS_HIGHLIGHTED) == null)
+//                     {
+//                             __pBase->SetBackgroundColor(_Colorf(
+//                                             (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
+//                             __pBase->SetImageSource(imagePath);
+//                     }
+//                     else
                        {
-                               __pBase->SetBackgroundColor(_Colorf(
-                                               (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
-                               __pBase->SetImageSource(imagePath);
-                       }
-                       else
-                       {
-                               __pBase->SetImageSource(L"");
+//                             __pBase->SetImageSource(L"");
 
                                pCanvas = __pButton->GetCanvasN();
                                if (pCanvas == null)
index dfe1895..b6f16d2 100644 (file)
@@ -432,13 +432,13 @@ _IconListItem::DrawBitmap(Canvas& canvas, Bitmap& bitmap, float ratio)
        {
                String  imagePath = _BitmapImpl::GetInstance(bitmap)->GetFileName();
 
-               if (!imagePath.IsEmpty())
+//             if (!imagePath.IsEmpty())
+//             {
+//                     __pTouchAniVE->SetImageSource(imagePath);
+//             }
+//             else
                {
-                       __pTouchAniVE->SetImageSource(imagePath);
-               }
-               else
-               {
-                       __pTouchAniVE->SetImageSource(L"");
+//                     __pTouchAniVE->SetImageSource(L"");
                        Canvas* pCanvas = __pTouchAniVE->GetCanvasN();
                        SysTryReturn(NID_UI_CTRL, pCanvas != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
                        pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
index 9786b40..cb1ba8d 100644 (file)
@@ -1369,13 +1369,13 @@ _IconListPresenter::Draw(void)
                        {
                                String imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
 
-                               if (!imagePath.IsEmpty())
+//                             if (!imagePath.IsEmpty())
+//                             {
+//                                     __pVE->SetImageSource(imagePath);
+//                             }
+//                             else
                                {
-                                       __pVE->SetImageSource(imagePath);
-                               }
-                               else
-                               {
-                                       __pVE->SetImageSource(L"");
+//                                     __pVE->SetImageSource(L"");
                                        Canvas* pCanvas = __pVE->GetCanvasN();
                                        SysTryCatch(NID_UI_CTRL, (pCanvas!= null), , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
                                        pCanvas->SetBackgroundColor(backgroundColor);
@@ -1655,13 +1655,13 @@ _IconListPresenter::DrawEmptyList(void)
                {
                        String imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName();
 
-                       if (!imagePath.IsEmpty())
-                       {
-                               __pEmptyListVE->SetImageSource(imagePath);
-                       }
-                       else
+//                     if (!imagePath.IsEmpty())
+//                     {
+//                             __pEmptyListVE->SetImageSource(imagePath);
+//                     }
+//                     else
                        {
-                               __pEmptyListVE->SetImageSource(L"");
+//                             __pEmptyListVE->SetImageSource(L"");
                                pCanvas = __pEmptyListVE->GetCanvasN();
                                SysTryCatch(NID_UI, pCanvas != null, , GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
                                pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
index e441a14..b1a63a4 100644 (file)
@@ -280,16 +280,16 @@ _LabelPresenter::DrawBackground(void)
                        imagePath = _BitmapImpl::GetInstance(*pBitmap)->GetFileName();
                }
 
-               if (imagePath.IsEmpty() == false && __pLabel->GetText() == L"")
+//             if (imagePath.IsEmpty() == false && __pLabel->GetText() == L"")
+//             {
+//                     __pBase->SetBackgroundColor(_Colorf(
+//                                     (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
+
+//                     __pBase->SetImageSource(imagePath);
+//             }
+//             else
                {
-                       __pBase->SetBackgroundColor(_Colorf(
-                                       (float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
-
-                       __pBase->SetImageSource(imagePath);
-               }
-               else
-               {
-                       __pBase->SetImageSource(L"");
+//                     __pBase->SetImageSource(L"");
 
                        pCanvas = __pLabel->GetCanvasN();
                        if (pCanvas == null)
index 847a089..fe7a773 100644 (file)
@@ -293,14 +293,14 @@ _SearchBarPresenter::Draw(void)
                        imagePath = _BitmapImpl::GetInstance(*pBackgroundBitmap)->GetFileName();
                }
 
-               if(!imagePath.IsEmpty())
+//             if(!imagePath.IsEmpty())
+//             {
+//                     __pSearchBar->GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
+//                     __pSearchBar->GetVisualElement()->SetImageSource(imagePath);
+//             }
+//             else
                {
-                       __pSearchBar->GetVisualElement()->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
-                       __pSearchBar->GetVisualElement()->SetImageSource(imagePath);
-               }
-               else
-               {
-                       __pSearchBar->GetVisualElement()->SetImageSource(L"");
+//                     __pSearchBar->GetVisualElement()->SetImageSource(L"");
                        Canvas* pCanvas = __pSearchBar->GetCanvasN();
                        r = GetLastResult();
                        SysTryReturn(NID_UI_CTRL, (pCanvas != null), r, r, "[%s] Propagating.", GetErrorMessage(r));
index 66a0fdd..faf97b5 100644 (file)
@@ -2043,12 +2043,12 @@ _TableViewItem::DrawItemBackground(void)
                        imagePath = _BitmapImpl::GetInstance(*pDrawBitmap)->GetFileName();
                }
 
-               if (imagePath.IsEmpty() == false)
-               {
-                       __pBitmapVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
-                       __pBitmapVisualElement->SetImageSource(imagePath);
-               }
-               else
+//             if (imagePath.IsEmpty() == false)
+//             {
+//                     __pBitmapVisualElement->SetBackgroundColor(_Colorf((float)bgColor.GetRed() / 255, (float)bgColor.GetGreen() / 255, (float)bgColor.GetBlue() / 255, (float)bgColor.GetAlpha() / 255));
+//                     __pBitmapVisualElement->SetImageSource(imagePath);
+//             }
+//             else
                {
                        pCanvas = __pBitmapVisualElement->GetCanvasN();
                        SysTryCatch(NID_UI_CTRL, pCanvas != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");