using namespace Tizen::Web::Controls;
static const wchar_t* IDB_SEARCH_INPUT_FIELD_BG = L"I01_toolbar_input_field.9.png";
+static const wchar_t* IDB_FINDWORD_INPUT_FIELD_BG = L"I01_toolbar_input_field_findword.9.png";
static const wchar_t* IDB_BTN_BACK = L"I01_icon_Back.png";
static const wchar_t* IDB_BTN_BACK_PRESS = L"I01_icon_Back_press.png";
static const wchar_t* IDB_CONTRLBAR_ICON_BOOKMARK = L"I01_search_list_icon_favorite.png";
AppLogDebug("Findword panel already initialized");
if (__pFindWordBgLabel != null)
{
- Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.9.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
+ Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_FINDWORD_INPUT_FIELD_BG, __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
if (pBitmap != null)
{
- AppLogDebug("InitFindWordPanel: Coming here");
__pFindWordBgLabel->SetBackgroundBitmap(*pBitmap);
delete pBitmap;
}
AppLogException("There is some problem in the xml file. Please check.");
return E_FAILURE;
}
- __pFindWordPanel->AddControl(*__pFindWordControl);
+ AddControl(*__pFindWordControl);
__pFindWordControl->SetBounds(0,0, __pFindWordPanel->GetWidth(), __pFindWordPanel->GetHeight());
- SetControlAlwaysOnTop(*__pFindWordPanel,true);
+ SetControlAlwaysOnTop(*__pFindWordControl,true);
__pFindWordPanel->SetShowState(false);
__pFindWordPanel->Invalidate(false);
__pMenu->Invalidate(false);
__pFindWordEditField->SetFocus();
+ /*
+ if (__pWebViewer != null)
+ {
+ // releasing the set block
+ __pWebViewer->ReleaseBlock();
+ }
+ */
ShowFindWordPanel(true);
}
break;
return ;
}
AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED 4");
- if (__pMenu->GetItemCount() != 9)
+ if (__pMenu->GetItemCount() != 8)
{
__pMenu->InsertItemAt(1,L"Add to Bookmarks"/*CommonUtil::GetString(L"IDS_BR_OPT_SHARE")*/, IDA_ADDTOBOOKMARK_CLICKED);
- __pMenu->InsertItemAt(2,L"Add to Home"/*CommonUtil::GetString(L"IDS_BR_OPT_SHARE")*/, IDA_ADD_TO_HOME_CLICKED);
- __pMenu->InsertItemAt(3,CommonUtil::GetString(L"IDS_BR_OPT_SHARE"), IDA_SHARE_CLICKED);
- __pMenu->InsertItemAt(4,CommonUtil::GetString(L"IDS_BR_OPT_FIND_ON_PAGE_ABB"), IDA_FINDONPAGE_CLICKED);
+// __pMenu->InsertItemAt(2,L"Add to Home"/*CommonUtil::GetString(L"IDS_BR_OPT_SHARE")*/, IDA_ADD_TO_HOME_CLICKED);
+ __pMenu->InsertItemAt(2,CommonUtil::GetString(L"IDS_BR_OPT_SHARE"), IDA_SHARE_CLICKED);
+ __pMenu->InsertItemAt(3,CommonUtil::GetString(L"IDS_BR_OPT_FIND_ON_PAGE_ABB"), IDA_FINDONPAGE_CLICKED);
__pMenu->SetMaxVisibleItemsCount(6);
}
if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE)
{
AppLogDebug("Enter something");
}
+
+ if (__pWebViewer != null)
+ {
+ // releasing the set block
+ __pWebViewer->ReleaseBlock();
+ }
+
}
break;
case IDA_SHARE_TEXT_CLICKED:
{
result r = E_SUCCESS;
// hiding the address bar
- __pAddressbar->SetBounds(__pAddressbar->GetX(), __pAddressbar->GetY() - __pAddressbar->GetHeight(), __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
__pAddressbar->SetShowState(false);
-
- if (__pMostVisitedListView != null && __pMostVisitedListView->GetShowState() == true)
- {
- AppLog("MainForm::OnAddressCancelledClicked 1");
- if (__pMostVisitedListView != null && __pAddressbar != null && __pFooterPanel != null)
- __pMostVisitedListView->SetBounds(Tizen::Graphics::Rectangle(0,__pAddressbar->GetBounds().y + __pAddressbar->GetHeight()-12 , GetClientAreaBounds().width, GetClientAreaBounds().height - __pFooterPanel->GetHeight()));
-
- if (__pMostVisitedListView != null)
- __pMostVisitedListView->Invalidate(true);
- }
-
__pFooterPanel->SetShowState(true);
- __pFooterPanel->Invalidate(false);
+ RelayoutControls(false);
}
void
void
MainForm::OnAddressBarKeypadOpened(const Addressbar& addBar)
{
- if (__pFindWordPanel && __pFindWordPanel->GetShowState() == true)
+ if (__pFindWordControl && __pFindWordControl->GetShowState() == true)
{
__pAddressbar->SetShowState(false);
}
{
__webControlPosition.y = 0;
__webControlHeight = GetClientAreaBounds().height;
+ AppLog("Client area height: %d", __webControlHeight);
AppLog("Client area height: %d", __webControlHeight);
if(__pAddressbar != null && __pAddressbar->GetShowState() == true)
{
__webControlPosition.y += __pAddressbar->GetHeight();
__webControlHeight -= __pAddressbar->GetHeight();
+ __pAddressbar->SetBounds(0, 0, __pAddressbar->GetWidth(), __pAddressbar->GetHeight());
}
- else if(__pFindWordPanel != null && __pFindWordPanel->GetShowState() == true)
+ else if(__pFindWordControl != null && __pFindWordControl->GetShowState() == true)
{
- __webControlPosition.y += __pFindWordPanel->GetHeight();
- __webControlHeight -= __pFindWordPanel->GetHeight();
+ __webControlPosition.y += __pFindWordControl->GetHeight();
+ __webControlHeight -= __pFindWordControl->GetHeight();
+ __pFindWordControl->SetBounds(0, 0, GetClientAreaBounds().width, __pFindWordControl->GetHeight());
}
if(__pFooterPanel != null && __pFooterPanel->GetShowState() == true)
{
__webControlHeight -= __pFooterPanel->GetHeight();
+ __pFooterPanel->SetBounds(0, __webControlPosition.y + __webControlHeight, GetClientAreaBounds().width, __pFooterPanel->GetHeight());
}
if (__pWebViewer != null && __pWebViewer->GetShowState() == true)
{
__pWebViewer->Invalidate(false);
}
if(__pMostVisitedListView != null && __pAddressbar != null && __pFooterPanel != null)
+ {
__pMostVisitedListView->SetBounds(Tizen::Graphics::Rectangle(0,__webControlPosition.y , GetClientAreaBounds().width, __webControlHeight));
+ }
Invalidate(true);
}
void MainForm::ShowFindWordPanel(bool show , bool isTouchPressed)
{
- if (__pFindWordPanel == null)
+ if (__pFindWordControl == null)
{
return;
}
}
else
{
- if(__pFindWordPanel != null)
+ if(__pFindWordControl != null)
{
- __pFindWordPanel->SetShowState(false);
+ __pFindWordControl->SetShowState(false);
}
}
if (__pWebViewer != null && __pFooterPanel != null)
{
AppLog("MainForm::OnOrientationChanged GetClientAreaBounds().height %d ", GetClientAreaBounds().height);
-
- // __pFooterPanel->SetShowState(false);
- __pWebViewer->SetBounds(Rectangle(0,__webControlPosition.y,GetClientAreaBounds().width, GetClientAreaBounds().height));
-
-
- //__pWebViewer->SetBounds(Rectangle(0, 82, GetClientAreaBounds().width,webControlHeight));
+ if(__pAddressbar != null)
+ {
+ __pAddressbar->SetShowState(false);
+ }
+ if(__pFindWordControl != null)
+ {
+ __pFindWordControl->SetShowState(false);
+ }
+ __pFooterPanel->SetShowState(false);
+ __pWebViewer->SetBounds(Rectangle(0, 0,GetClientAreaBounds().width, GetClientAreaBounds().height));
}
+ Invalidate(true);
}
void
MainForm::OnWebKeypadClosed(Tizen::Web::Controls::Web& source)
{
+ __pFooterPanel->SetShowState(true);
OnAddressBarKeypadClosed(*__pAddressbar);
}
delete pBitmap;
}
+ if (__pFindWordBgLabel != null)
+ {
+ Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_FINDWORD_INPUT_FIELD_BG, __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
+ if (pBitmap != null)
+ {
+ __pFindWordBgLabel->SetBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ }
+ }
+
if(__pMenu != null)
__pMenu->SetShowState(false);
if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
widthContextItem = WIDTH_CONTEXT_MENU_BUTTON_PORTRAIT;
}
- if (__pFindWordBgLabel != null)
- {
- // __pFindWordBgLabel->SetSize(GetClientAreaBounds().width,GetClientAreaBounds().height);
- Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(L"I01_search_input_field_bg.9.png", __pFindWordBgLabel->GetWidth(), __pFindWordBgLabel->GetHeight());
- if (pBitmap != null)
- {
- __pFindWordBgLabel->SetBackgroundBitmap(*pBitmap);
- delete pBitmap;
- }
- }
if (__pFooterPanel)
{
AppLog("__pFooterPanel->GetShowState() is true");
}
}
Invalidate(true);
- if(__pAddressbar != null)
+
+ if (__pAddressbar != null)
{
- __pAddressbar->OrientationChanged();
+ int width = GetClientAreaBounds().width;
+ __pAddressbar->OrientationChanged(width);
}
}