2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (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 CallButtonsPanel.h
19 * @brief This is the header file for the %CallButtonsPanel class.
21 * This header file contains the declarations for %CallButtonsPanel class.
23 #ifndef _PHN_CALL_BUTTONS_PANEL_H_
24 #define _PHN_CALL_BUTTONS_PANEL_H_
29 #include "CallBaseForm.h"
30 #include "CallTypes.h"
33 * @class CallButtonsPanel
34 * @brief This class presents a panel based UI for keypads used in active call
35 * and end call scenarios.
38 class CallButtonsPanel
39 : public Tizen::Ui::Controls::Panel
50 CallButtonsPanel(void);
51 virtual ~CallButtonsPanel(void);
53 bool ConstructPanel(Tizen::Ui::IActionEventListener* pEventListener, FormType parentFormType);
56 * Overrides this method to provide user-specific initialization code after the control is added to a container.
57 * @remarks OnInitializing() is called when the control is about to be added to a container.
58 * @remarks To cancel adding this control to the parent, return E_FAILURE in this method.
59 * @see OnTerminating()
61 virtual result OnInitializing(void);
64 * Overrides this method to provide user-specific termination code.
65 * @return An error code
66 * @remarks OnTerminating() is called right before the control is removed successfully from the container.
67 * @remarks To cancel removing this control from the parent, return E_FAILURE in this method.
68 * @see OnInitializing()
70 virtual result OnTerminating(void);
71 //Called to change state, when keypad is opened or closed.
72 void SetKeypadButtonState(CommandIds cmdId);
73 //used to set or change speaker button state.
74 void SetSpeakerButtonState(CommandIds cmdId);
75 //used to set or change Mute button state.
76 void SetMuteButtonState(CommandIds cmdId);
77 //used to set the button panel state in end call form based on type of call.
78 void SetEndCallPanelState(bool isEnabled);
79 //Used to enable or disable "Add Call" Button
80 void EnableAddCallButton(bool enable);
81 //Used to enable or disable "Join Call" Button
82 void EnableJoinCallButton(bool enable);
83 // Used to set the ViewContact is present or not
84 void ShowViewContactButton(void);
85 // Used to set the AddToContact is present or not
86 void ShowAddContactButton(void);
88 //set the buttons in the panel as the top controls. Chk if its needed in RC2
89 void SetButtonPosition(void);
92 // Construct the panel to be shown in "End Call" form
93 result ConstructEndCallPanel(void);
94 // Construct the panel to be shown in "Active Call" form
95 result ConstructActiveCallPanel(void);
96 // Draws the background for the panel
97 result AddBackgroundBitmap(void);
98 // Draws the bitmap at the correct position on the button
99 void SetBitmapsToButton(const Tizen::Base::String& buttonId, const Tizen::Base::String& buttonName, const Tizen::Base::String& imgPath, ButtonState state);
100 // Draws the text at the correct position on the button
101 void SetEnrichedTextToButton(const Tizen::Base::String& buttonName, Tizen::Graphics::Canvas* pCanvas, ButtonState state, int verticalPos);
102 // Adds the action listener for the buttons
103 void AddKeyPadActionListener(const Tizen::Base::String& buttonId, CommandIds cmdId);
104 //Disable the unused buttons for Outgoing / Emergency Forms
105 void DisableKeysForOutgoingCall(void);
108 //set the View contact bitmaps
109 void SetViewContacBitmapToButton(const Tizen::Base::String& buttonId, const Tizen::Base::String& buttonName, const Tizen::Base::String& imgBackgroundPath,const Tizen::Base::String& imgPath, ButtonState state);
113 Tizen::Ui::IActionEventListener* __pActionListener;
114 FormType __parentFormType;
117 #endif /* _PHN_CALL_BUTTONS_PANEL_H_ */