License and Privilege changes
[apps/osp/Call.git] / inc / CallDtmfKeypadPanel.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16
17 /**
18  * @file                CallDtmfKeypadPanel.h
19  * @brief               This is the header file for the %DtmfKeyPadPanel class.
20  *
21  * This header file contains the declarations for %DtmfKeyPadPanel class.
22  */
23 #ifndef _PHN_DTMF_KEYPAD_PANEL_H_
24 #define _PHN_DTMF_KEYPAD_PANEL_H_
25
26 #include <FBase.h>
27 #include <FUi.h>
28
29 /**
30  * @class DtmfKeyPadPanel
31  * @brief This class presents a panel based UI for DTMF keypad
32  * shown while active call scenarios.
33  *
34  */
35 class DtmfKeyPadPanel
36         : public Tizen::Ui::Controls::Panel
37 {
38 public:
39         DtmfKeyPadPanel(void);
40         virtual ~DtmfKeyPadPanel(void);
41         bool Initialize(Tizen::Ui::IActionEventListener* pEventListener,Tizen::Graphics::Rectangle& boundsRect);
42
43         virtual result OnInitializing(void);
44         virtual result OnTerminating(void);
45
46 protected:
47
48         enum DialerFontStyle
49         {
50                 FONT_CALLING_TEXT,
51                 FONT_KEYPAD_NUMBER,
52                 FONT_KEYPAD_TEXT,
53                 FONT_KEYPAD_P,
54                 FONT_KEYPAD_PLUS,
55                 FONT_KEYPAD_CANCEL
56         };
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);
74
75 private:
76         //action listener
77         Tizen::Ui::IActionEventListener* __pActionListener;
78 };
79
80 #endif // _PHN_DTMF_KEYPAD_PANEL_H_