X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FCallDtmfKeypadPanel.cpp;h=58f0578d30b6a5ffc3a54c7455d42b737f6261d0;hb=11a1a23167d24edfa0c5988cdcf8fdfe3b5aec2c;hp=c3bfcf4ce7daa15cb533ac6712f29ac1f986e5ff;hpb=5ec4aa503ad9a195c9faa6aed1fc70408c885492;p=apps%2Fosp%2FCall.git diff --git a/src/CallDtmfKeypadPanel.cpp b/src/CallDtmfKeypadPanel.cpp index c3bfcf4..58f0578 100644 --- a/src/CallDtmfKeypadPanel.cpp +++ b/src/CallDtmfKeypadPanel.cpp @@ -1,7 +1,7 @@ // // Copyright (c) 2012 Samsung Electronics Co., Ltd. // -// Licensed under the Flora License, Version 1.0 (the License); +// Licensed under the Flora License, Version 1.1 (the License); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // @@ -45,7 +45,7 @@ const int RIGHT_TEXT_X_OFFSET = 94; const int W_DTMF_BTN = 212; const int H_DTMF_BTN = 134; const Color COLOR_KEYPAD_BG(0, 0, 0, 100); -const wchar_t* IDC_TEXTBOX = L"IDC_TEXTBOX"; +const wchar_t* IDC_TEXTBOX = L"IDC_NUM_EDITFIELD"; const wchar_t* IDC_BUTTON = L"IDC_BUTTON"; const wchar_t* IDC_DTMF_KEY_BG_LABEL = L"IDC_DTMF_KEY_BG_LABEL"; @@ -74,10 +74,11 @@ DtmfKeyPadPanel::Initialize(IActionEventListener* pEventListener, Rectangle& bou } //disable auto link detection - TextBox* pTextBox = static_cast(GetControl(IDC_TEXTBOX)); + EditField* pTextBox = static_cast(GetControl(IDC_TEXTBOX)); if (pTextBox != null) { pTextBox->SetAutoLinkMask(0); + pTextBox->SetFocus(); } __pActionListener = pEventListener; return true; @@ -102,19 +103,19 @@ DtmfKeyPadPanel::OnInitializing(void) //Set background bitmap Label* pKeyBgLbl = static_cast(GetControl(IDC_DTMF_KEY_BG_LABEL, true)); - Bitmap* pKeyBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_KEYPAD_BG, pKeyBgLbl->GetWidth(), pKeyBgLbl->GetHeight()); + /*Bitmap* pKeyBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_KEYPAD_BG, pKeyBgLbl->GetWidth(), pKeyBgLbl->GetHeight()); if (pKeyBgBitmap != null) { pKeyBgLbl->SetBackgroundBitmap(*pKeyBgBitmap); delete pKeyBgBitmap; pKeyBgBitmap = null; - } + }*/ //DTMF Keys panel Panel* pKeysPanel = new (std::nothrow) Panel(); pKeysPanel->Construct(IDL_DTMF_KEYS_PANEL); pKeysPanel->SetBounds(pKeyBgLbl->GetBounds()); - AddControl(*pKeysPanel); + AddControl(pKeysPanel); //Add action listener and bg to buttons. AddListenersToButtons(); @@ -284,14 +285,13 @@ DtmfKeyPadPanel::SetBackgroundtoButton() case PAUSE_KEY: { - DrawImageToCanvas(IDB_DIALER_STAR_ICON, Dimension(75, 36), canvasNormal, POSITION_LEFT); + DrawTextToCanvas(L"*", FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL); DrawTextToCanvas(L"P", FONT_KEYPAD_P, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL); - r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS); TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed"); - DrawImageToCanvas(IDB_DIALER_STAR_ICON, Dimension(75, 36), canvasPressed, POSITION_LEFT); + DrawTextToCanvas(L"*", FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED); DrawTextToCanvas(L"P", FONT_KEYPAD_P, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED); - } + } break; case NUM_KEY0: @@ -325,7 +325,7 @@ DtmfKeyPadPanel::SetBackgroundtoButton() return E_SUCCESS; CATCH: - RemoveAllControls(); + //RemoveAllControls(); return r; } @@ -413,7 +413,7 @@ DtmfKeyPadPanel::DrawTextToCanvas(const String& buttonText, int textFontStyle, C pTextElement->SetFont(*font); //get dimensions of the text - Dimension textDimension; + FloatDimension textDimension; font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension); textDimension.height = textDimension.height + font->GetDescender(); //create enriched text @@ -527,6 +527,6 @@ result DtmfKeyPadPanel::OnTerminating(void) { result r = E_SUCCESS; - RemoveAllControls(); + //RemoveAllControls(); return r; }