2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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 CallDtmfKeypadPanel.h
19 * @brief This is the header file for the %DtmfKeyPadPanel class.
21 * This header file contains the declarations for %DtmfKeyPadPanel class.
23 #ifndef _PHN_DTMF_KEYPAD_PANEL_H_
24 #define _PHN_DTMF_KEYPAD_PANEL_H_
30 * @class DtmfKeyPadPanel
31 * @brief This class presents a panel based UI for DTMF keypad
32 * shown while active call scenarios.
36 : public Tizen::Ui::Controls::Panel
39 DtmfKeyPadPanel(void);
40 virtual ~DtmfKeyPadPanel(void);
41 bool Initialize(Tizen::Ui::IActionEventListener* pEventListener,Tizen::Graphics::Rectangle& boundsRect);
43 virtual result OnInitializing(void);
44 virtual result OnTerminating(void);
57 //Add action listener.
58 void AddListenersToButtons();
59 result SetBackgroundtoButton();
60 // Draws the bitmap at the correct position on the buttons
61 void SetBitmapsToButton(Tizen::Base::String& buttonId,const Tizen::Base::String& buttonText,int actionID);
62 //Sets the background bitmap to button canvas in Pressed state.
63 result SetPressedBgToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
64 // Draws the image at the correct position on the button
65 void DrawImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos);
66 // Draws the text at the correct position on the button
67 void DrawTextToCanvas(const Tizen::Base::String& buttonText1, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos, int buttonStatus);
68 // retrieves the position for the text/image in the button
69 void GetPositionToDraw(Object* item, Tizen::Graphics::Canvas* pCanvas, int itemType, int pos, Tizen::Graphics::Point* itemPos);
70 // Gets the font based on the style
71 Tizen::Graphics::Font* GetTextFontN(int textFontStyle);
72 // Get the color to be set for the text
73 Tizen::Graphics::Color* GetTextColorN(int textColor, int buttonStatus);
77 Tizen::Ui::IActionEventListener* __pActionListener;
80 #endif // _PHN_DTMF_KEYPAD_PANEL_H_