Tizen::Base::String __currentSelectedStr;
int __distanceMoved;
int __webControlHeight;
+ float __webControlHeightF;
float __previousZoomLevel;
int __maxOccurrances;
int __currentWordIndex;
Tizen::Graphics::Point __touchPoint1;
Tizen::Graphics::Point __touchPoint2;
Tizen::Graphics::Point __webControlPosition;
+ Tizen::Graphics::FloatPoint __webControlPositionF;
Tizen::Ui::Controls::ListContextItem* __pItemContext;
Tizen::Ui::Controls::ListContextItem* __pItemContextLandscape;
static const int IDA_BUTTON_NO = 1000;
static const int IDA_BUTTON_YES = 1001;
+const int UPDATE_LIST_COMPLETE = 995;
const int UPDATE_MAINFORM_FOOTER_ON_WINDOWCLOSED = 996;
const int APPCONTROL_LAUNCH_MAX_LIMIT_REACHED = 997;
const int FORE_GROUND_APP_EVENT = 998;
}
else
{
- String tempUrl = L"http://";
- tempUrl.Append(Url);
+ String tempUrl;
+ if(Url.Contains("http://") == true)
+ {
+ tempUrl.Append(Url);
+ }
+ else
+ {
+ tempUrl = L"http://";
+ tempUrl.Append(Url);
+ }
- if (flag == true)
+ if(flag == true)
{
valid = true;
- Url= tempUrl ;
+ Url = tempUrl;
}
}
__pBlankPanel = null;
__pArticleReaderLabel = null;
__webControlHeight = 0;
+ __webControlHeightF = 0;
__prevAddressBarMode = ADDRESSBAR_MODE_INVALID;
__curAddressBarMode = ADDRESSBAR_MODE_INVALID;
__pMostVisitedSites = null;
const int Y_WEBCONTROL_POSITION = 0;
__webControlHeight = GetHeight() - __pFooterPanel->GetHeight();
+ __webControlHeightF = GetHeightF() - __pFooterPanel->GetHeightF();
if (__pMostVisitedListView)
{
return r;
}
__webControlPosition = __pWebViewer->GetPosition();
+ __webControlPositionF = __pWebViewer->GetPositionF();
r = __pWebViewer->SetSetting(SettingPresentationModel::GetInstance()->GetWebSettings());
if (IsFailed(r))
{
{
return E_FAILURE;
}
+// __pFooterPanel->SetBackgroundColor(Color(255,0,0));
//__pFooterPanel->SetBackgroundColor(CUSTOM_COLOR_TRANSPARENT);
Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_SEARCH_INPUT_FIELD_BG, __pFooterLabel->GetWidth(), __pFooterLabel->GetHeight());
if (pBitmap != null)
if (__pAddressbar != null && __pWebViewer != NULL)
{
__webControlPosition.y = __pAddressbar->GetHeight() - 12;
+ __webControlPositionF.y = __pAddressbar->GetHeightF() - 12.0f;
__webControlHeight = GetClientAreaBounds().height - __pFooterPanel->GetHeight() - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeight() - 12);
+ __webControlHeightF = GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF() - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeightF() - 12.0f);
if (__pFooterPanel->GetShowState() == false)
__pWebViewer->SetBounds(Rectangle(0,__webControlPosition.y,GetClientAreaBounds().width, GetClientAreaBounds().height - ( /*__pAddressbar->GetY() +*/ __pAddressbar->GetHeight() - 12)));
InitFooter();
InitAddressbar();
- __pFooterPanel->SetBounds(0, GetClientAreaBounds().height - __pFooterPanel->GetHeight(), GetClientAreaBounds().width, __pFooterPanel->GetHeight());
+ FloatRectangle footerPanelBounds = FloatRectangle(0.0f, (GetClientAreaBoundsF().height) - __pFooterPanel->GetHeightF(), GetClientAreaBoundsF().width, __pFooterPanel->GetHeightF());
+ __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(footerPanelBounds));
// hiding the address bar
// __pAddressbar->SetBounds(__pAddressbar->GetX(), __pAddressbar->GetY() - __pAddressbar->GetHeight(), __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
if (__pAddressbar != null)
{
__webControlPosition.y = __pAddressbar->GetHeight() - 12;
+ __webControlPositionF.y = __pAddressbar->GetHeightF() - 12.0f;
__pAddressbar->SetBounds(Rectangle(0,0,GetClientAreaBounds().width,__pAddressbar->GetHeight()));
__pAddressbar->Invalidate(true);
}
if (__pAddressbar != null)
{
__webControlPosition.y = 0;
+ __webControlPositionF.y = 0.0f;
__pAddressbar->SetBounds(Rectangle(0, __pAddressbar->GetY() - __pAddressbar->GetHeight(), GetClientAreaBounds().width, __pAddressbar->GetHeight()));
__pAddressbar->Invalidate(true);
}
{
AppLog("xyz:: MainForm::RelayoutControls called");
__webControlPosition.y = 0;
+ __webControlPositionF.y = 0.0f;
__webControlHeight = GetClientAreaBounds().height;
+ __webControlHeightF = GetClientAreaBoundsF().height;
AppLog("Client area height: %d width %d", __webControlHeight,GetClientAreaBounds().width);
AppLog("Client area height: %d", __webControlHeight);
if(__pAddressbar != null && __pAddressbar->GetShowState() == true)
{
__webControlPosition.y += __pAddressbar->GetHeight();
+ __webControlPositionF.y += __pAddressbar->GetHeightF();
__webControlHeight -= __pAddressbar->GetHeight();
+ __webControlHeightF -= __pAddressbar->GetHeightF();
__pAddressbar->SetBounds(0, 0, __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
}
else if(__pFindWordControl != null && __pFindWordControl->GetShowState() == true)
{
__webControlPosition.y += __pFindWordControl->GetHeight();
+ __webControlPositionF.y += __pFindWordControl->GetHeightF();
__webControlHeight -= __pFindWordControl->GetHeight();
+ __webControlHeightF -= __pFindWordControl->GetHeightF();
__pFindWordControl->SetBounds(0, 0, GetClientAreaBounds().width, __pFindWordControl->GetHeight());
}
if(__pFooterPanel != null && __pFooterPanel->GetShowState() == true && relayoutFooter == true)
{
__webControlHeight -= __pFooterPanel->GetHeight();
+ __webControlHeightF -= __pFooterPanel->GetHeightF();
- __pFooterPanel->SetBounds(0, __webControlPosition.y + __webControlHeight, GetClientAreaBounds().width, __pFooterPanel->GetHeight());
+ __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(0.0F, __webControlPositionF.y + __webControlHeightF, GetClientAreaBoundsF().width, __pFooterPanel->GetHeightF())));
__webControlHeight = __webControlHeight + 12;
+ __webControlHeightF = __webControlHeightF + 12.0f;
}
if (__pWebViewer != null && __pWebViewer->GetShowState() == true)
{
{
AppLog("MainForm::OnOrientationChanged GetClientAreaBounds %d, %d",GetClientAreaBounds().width,GetClientAreaBounds().height);
int widthContextItem = 0;
- if(__pFindWordCountLabel)
- __pFindWordCountLabel->SetBounds(__pFindWordCountLabel->GetX(),__pFindWordCountLabel->GetY(),124,__pFindWordCountLabel->GetHeight());
+ //if(__pFindWordCountLabel)
+ // __pFindWordCountLabel->SetBounds(__pFindWordCountLabel->GetX(),__pFindWordCountLabel->GetY(),124,__pFindWordCountLabel->GetHeight());
// As per the platform engineer comment removed this line
/*if(__pWebViewer != null)
{
{
AppLog("__pFooterPanel->GetShowState() is true");
InitFooter();
- __pFooterPanel->SetBounds(0, GetClientAreaBounds().height - __pFooterPanel->GetHeight(), __pFooterPanel->GetWidth(), __pFooterPanel->GetHeight());
+ __pFooterPanel->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(0, GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF(), __pFooterPanel->GetWidthF(), __pFooterPanel->GetHeightF())));
__pFooterPanel->Invalidate(true);
}
InitAddressbar();
HistoryPresentationModel::GetInstance()->GetMostVisitedSites(*__pMostVisitedSites);
__webControlHeight = GetClientAreaBounds().height - __pFooterPanel->GetHeight();
+ __webControlHeightF = GetClientAreaBoundsF().height - __pFooterPanel->GetHeightF();
__pMostVisitedListView = new(std::nothrow) ListView();
int height = GetClientAreaBounds().height;
}
settingInfo[parentIndex].subText = settingInfo[effectiveIndex].titleText;
-// listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex), LIST_REFRESH_TYPE_ITEM_MODIFY);
-// listView.RefreshList(groupIndex, parentIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex), LIST_REFRESH_TYPE_ITEM_MODIFY);
+ listView.RefreshList(groupIndex, parentIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
for (int iter = 0; iter < settingInfo[parentIndex].childCount; iter++)
{
if (parentIndex + iter + 1 != effectiveIndex)
settingInfo[SETTING_CURRENT_PAGE].isSelected = false;
settingInfo[SETTING_FAVORITE_URL].isSelected = true;
}
-// listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex) + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex) + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
}
// listView.UpdateList();
//listView.ScrollToItem(groupIndex, itemIndex, LIST_SCROLL_ITEM_ALIGNMENT_TOP);
settingInfo[SETTING_FAVORITE_URL].titleText = __currentURL;
// listView.RefreshList(groupIndex, effectiveIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
}
break;
case SETTING_BLANK_PAGE:
SettingPresentationModel::GetInstance()->SetHomepage((L"IDS_BR_BODY_BLANK_PAGE"));
AppLog("GetHomepage() %ls",SettingPresentationModel::GetInstance()->GetHomepage().GetPointer());
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_MOST_VISITED_SITE:
SettingPresentationModel::GetInstance()->SetHomepage(L"IDS_BR_BODY_MOST_VISITED_SITES");
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_FAVORITE_URL:
case SETTING_FIT_TO_WIDTH:
SettingPresentationModel::GetInstance()->SetDefaultView(L"IDS_BR_BODY_FIT_TO_WIDTH");
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_READABLE:
SettingPresentationModel::GetInstance()->SetDefaultView(L"IDS_BR_BODY_READABLE");
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_RUN_JAVASCRIPT:
case SETTING_SEARCH_ENGINE_YAHOO:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_YAHOO].titleText);
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_SEARCH_ENGINE_NAVER:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_NAVER].titleText);
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_SEARCH_ENGINE_GOOGLE:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].titleText);
// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
- listView.UpdateList();
+// listView.UpdateList();
break;
case SETTING_RESET_TO_DEFAULT:
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL,ITEM_BACKGROUND_COLOR);
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_PRESSED,ITEM_BACKGROUND_COLOR_HIGHLIGHTED);
- if(__pList != null)
- {
- __pList->SetItemChecked(groupIndex, itemIndex, settingInfo[effectiveIndex].isSelected);
- }
+// if(__pList != null)
+// {
+// __pList->SetItemChecked(groupIndex, itemIndex, settingInfo[effectiveIndex].isSelected);
+// }
+
+ ArrayList *pList = new(std::nothrow) ArrayList();
+ pList->Construct();
+ Integer *pGroupIndex = new Integer(groupIndex);
+ Integer *pItemIndex = new Integer(itemIndex);
+ pList->Add(pGroupIndex);
+ pList->Add(pItemIndex);
+ AppLog("sending event UPDATE_LIST_COMPLETE");
+ SendUserEvent(UPDATE_LIST_COMPLETE,pList);
pItem->SetText(settingInfo[effectiveIndex].titleText);
pItem->Make();
// pItem->AddElement(Rectangle(0, 0, 10, 112), IDA_LIST_LEFT_SIDE_MARGIN, *pBitmap, null);
// pItem->SetSelected(settingInfo[effectiveIndex].isSelected);
- __pList->SetItemChecked(groupIndex,itemIndex,settingInfo[effectiveIndex].isSelected);
+// __pList->SetItemChecked(groupIndex,itemIndex,settingInfo[effectiveIndex].isSelected);
+ ArrayList *pList = new(std::nothrow) ArrayList();
+ pList->Construct();
+ Integer *pGroupIndex = new Integer(groupIndex);
+ Integer *pItemIndex = new Integer(itemIndex);
+ pList->Add(pGroupIndex);
+ pList->Add(pItemIndex);
+ AppLog("sending event UPDATE_LIST_COMPLETE");
+ SendUserEvent(UPDATE_LIST_COMPLETE,pList);
pItem->Make();
return pItem;
__pConfirmationPopup = null;
}
}
+ else if (requestId == UPDATE_LIST_COMPLETE)
+ {
+ AppLog("receiving event UPDATE_LIST_COMPLETE");
+ Integer *pGroupIndex = static_cast<Integer*>(pArgs->GetAt(0));
+ Integer *pItemIndex = static_cast<Integer*>(pArgs->GetAt(1));
+ int groupIndex = pGroupIndex->ToInt();
+ int itemIndex = pItemIndex->ToInt();
+
+ int effectiveIndex = 0;
+ for (int i = 0; i < groupIndex; i++)
+ effectiveIndex = effectiveIndex + pGroupItemCount[i];
+ effectiveIndex = effectiveIndex + itemIndex;
+
+
+ if(settingInfo[effectiveIndex].itemType == ITEM_TYPE_TOGGLE || settingInfo[effectiveIndex].itemType == ITEM_TYPE_RADIO )
+ {
+ __pList->SetItemChecked(groupIndex, itemIndex, settingInfo[effectiveIndex].isSelected);
+ }
+
+ }
}
+