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 CallButtonsPanel.cpp
19 * @brief Base class for all Call forms
21 #include "CallButtonsPanel.h"
22 #include "CallAppUtility.h"
23 #include "CallTypes.h"
25 using namespace Tizen::App;
26 using namespace Tizen::Base;
27 using namespace Tizen::Ui;
28 using namespace Tizen::Ui::Controls;
29 using namespace Tizen::Graphics;
31 //Constants - Scene name
32 const wchar_t* IDC_ADDJOINCALL_BUTTON = L"IDC_ADDJOINCALL_BUTTON";
33 const wchar_t* IDC_KEYPAD_BUTTON = L"IDC_KEYPAD_BUTTON";
34 const wchar_t* IDC_MUTE_BUTTON = L"IDC_MUTE_BUTTON";
35 const wchar_t* IDC_CONTACT_BUTTON = L"IDC_CONTACT_BUTTON";
36 const wchar_t* IDC_SPEAKER_BUTTON = L"IDC_SPEAKER_BUTTON";
37 const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
38 const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
39 const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
40 const wchar_t* IDC_ENDCALL_BUTTON = L"IDC_ENDCALL_BUTTON";
41 const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
44 const int W_BG_BITMAP = 80;
45 const int H_BG_BITMAP = 80;
46 const int Y_BG_BITMAP_POS = 56;
47 const int IDI_TEXT_SIZE = 38;
48 const int IDI_VERTICAL_SPACE = 6;
49 const int W_VIEW_CONTACT_BITMAP = 50;
50 const int H__VIEW_CONTACT_BITMAP = 50;
51 const int Y_VIEW_CONTACT_BITMAP_POS = 14;
52 const int W_KEYPAD_BTN = 240;
53 const int H_KEYPAD_BTN = 250;
55 CallButtonsPanel::CallButtonsPanel(void)
59 CallButtonsPanel::~CallButtonsPanel(void)
61 //Empty Implementation
65 CallButtonsPanel::ConstructPanel(IActionEventListener* pEventListener, FormType parentFormType)
67 if (pEventListener == null)
74 //set action listener & save form state
75 __pActionListener = pEventListener;
76 __parentFormType = parentFormType;
78 switch (__parentFormType)
80 case FORMTYPE_ENDCALL:
81 r = Construct(IDL_END_CALL_PANEL);
85 r = Construct(IDL_CALL_PANEL);
88 TryCatch(r == E_SUCCESS, , "CallButtonsPanel::Initialise() resource not found");
96 CallButtonsPanel::OnInitializing(void)
100 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetLandscapeLayoutN());
101 if (pRelativeLayout != null)
103 pRelativeLayout->Update();
104 delete pRelativeLayout;
107 pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetPortraitLayoutN());
108 if (pRelativeLayout != null)
110 pRelativeLayout->Update();
111 delete pRelativeLayout;
114 //set buttons as child controls
115 switch (__parentFormType)
117 case FORMTYPE_ENDCALL:
118 r = ConstructEndCallPanel();
122 r = ConstructActiveCallPanel();
137 CallButtonsPanel::OnTerminating(void)
139 //remove all child controls...
140 // RemoveAllControls();
145 CallButtonsPanel::SetSpeakerButtonState(CommandIds cmdId)
148 String speakerButtonId(IDC_SPEAKER_BUTTON);
149 Button* pButton = static_cast<Button*>(GetControl(speakerButtonId));
150 //Check if Button exist and needs to change state.
151 if(pButton == null || pButton->GetActionId() == cmdId)
156 String btnName = AppUtility::GetResourceString(IDS_SPEAKER_BTN_NAME);
157 AddKeyPadActionListener(speakerButtonId, cmdId);
162 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_ICON, BTN_NORMAL);
163 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_PRESS_ICON, BTN_PRESS);
164 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_DIM_ICON, BTN_DIM);
168 case IDA_SPEAKER_OFF:
170 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_ICON, BTN_NORMAL);
171 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_PRESS_ICON, BTN_PRESS);
172 SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_DIM_ICON, BTN_DIM);
182 CallButtonsPanel::SetMuteButtonState(CommandIds cmdId)
184 String muteButtonId(IDC_MUTE_BUTTON);
185 Button* pButton = static_cast<Button*>(GetControl(muteButtonId));
186 //Check if Button exist and needs to change state.
187 if(pButton == null || pButton->GetActionId() == cmdId)
192 String btnName = AppUtility::GetResourceString(IDS_MUTE_BTN_NAME);
193 AddKeyPadActionListener(muteButtonId, cmdId);
198 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_ICON, BTN_NORMAL);
199 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_PRESS_ICON, BTN_PRESS);
200 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_DIM_ICON, BTN_DIM);
206 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_ICON, BTN_NORMAL);
207 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_PRESS_ICON, BTN_PRESS);
208 SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_DIM_ICON, BTN_DIM);
218 CallButtonsPanel::SetKeypadButtonState(CommandIds cmdId)
220 String keypadButtonId(IDC_KEYPAD_BUTTON);
221 Button* pButton = static_cast<Button*>(GetControl(keypadButtonId));
222 //Check if Button exist and needs to change state.
223 if(pButton == null || pButton->GetActionId() == cmdId)
228 String btnName = AppUtility::GetResourceString(IDS_KEYPAD_BTN_NAME);
229 AddKeyPadActionListener(keypadButtonId, cmdId);
232 case IDA_CLOSE_NUMKEYPAD:
234 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
235 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
236 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
240 case IDA_OPEN_NUMKEYPAD:
242 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
243 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
244 SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
254 CallButtonsPanel::AddBackgroundBitmap(void)
256 result r = E_FAILURE;
258 Rectangle panelRect = GetBounds();
259 //Set BackGround bitmap
260 Bitmap* pBgBitmap = null;
261 AppResource* pAppResource = AppResource::GetInstance();
264 pBgBitmap = pAppResource->GetBitmapN(IDB_BACKGROUND_BITMAP);
267 Label* pBackgroundLabel = new (std::nothrow) Label();
268 pBackgroundLabel->Construct(Rectangle(0, 1, panelRect.width, panelRect.height), L"");
269 pBackgroundLabel->SetBackgroundBitmap(*pBgBitmap);
270 r = AddControl(pBackgroundLabel);
272 //always display in background
273 SetControlAlwaysAtBottom(*pBackgroundLabel, true);
283 CallButtonsPanel::ConstructEndCallPanel(void)
285 result r = E_SUCCESS;
286 Rectangle relativeCtrlRect = GetBounds();
289 String voiceButtonId(IDC_VOICECALL_BUTTON);
290 String btnName = AppUtility::GetResourceString(IDS_VOICE_CALL_BTN_NAME);
291 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_ICON, BTN_NORMAL);
292 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_PRESS_ICON, BTN_PRESS);
293 SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_DIM_ICON, BTN_DIM);
294 AddKeyPadActionListener(voiceButtonId, IDA_VOICE_CALL);
297 String videoButtonId(IDC_VIDEOCALL_BUTTON);
298 btnName = AppUtility::GetResourceString(IDS_VIDEO_CALL_BTN_NAME);
299 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_ICON, BTN_NORMAL);
300 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_PRESS_ICON, BTN_PRESS);
301 SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_DIM_ICON, BTN_DIM);
302 AddKeyPadActionListener(videoButtonId, IDA_VIDEO_CALL);
305 String msgButtonId(IDC_MSG_BUTTON);
306 btnName = AppUtility::GetResourceString(IDS_MSG_BTN_NAME);
307 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_ICON, BTN_NORMAL);
308 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_PRESS_ICON, BTN_PRESS);
309 SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_DIM_ICON, BTN_DIM);
310 AddKeyPadActionListener(msgButtonId, IDA_MESSAGE);
312 Button* pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
315 AddKeyPadActionListener(IDC_ADD_TO_CONTACT_BUTTON,IDA_ADD_TO_CONTACTS);
317 //set initial show state to false. Correct state set on OnSceneActivatedN
318 SetEndCallPanelState(false);
324 CallButtonsPanel::ShowViewContactButton(void)
326 //Present show View Contact else show Add to contact
327 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
328 IDB_VIEW_CONTACT_BG_ICON,IDB_VIEW_CONTACT_ICON,BTN_NORMAL);
330 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
331 IDB_VIEW_CONTACT_BG_PRESS_ICON,IDB_VIEW_CONTACT_PRESS_ICON,BTN_PRESS);
335 CallButtonsPanel::ShowAddContactButton(void)
337 //Present show View Contact else show Add to contact
338 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON, AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
339 IDB_VIEW_CONTACT_BG_ICON, IDB_VIEW_CONTACT_ICON, BTN_NORMAL);
341 SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON, AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
342 IDB_VIEW_CONTACT_BG_PRESS_ICON, IDB_VIEW_CONTACT_PRESS_ICON, BTN_PRESS);
346 CallButtonsPanel::ConstructActiveCallPanel(void)
348 result r = E_SUCCESS;
351 String endButtonId(IDC_ENDCALL_BUTTON);
352 String btnName = AppUtility::GetResourceString(IDS_ENDCALL_BTN_NAME);
353 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_ICON, BTN_NORMAL);
354 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_PRESS_ICON, BTN_PRESS);
355 SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_DIM_ICON, BTN_DIM);
357 //Add or Join call based on form state
358 String addJoinButtonId(IDC_ADDJOINCALL_BUTTON);
359 switch (__parentFormType)
361 case FORMTYPE_OUTGOINGCALL:
362 case FORMTYPE_ACTIVECALL:
363 case FORMTYPE_EMERGENCYOUTGOINGCALL:
364 case FORMTYPE_EMERGENCYACTIVECALL:
367 AddKeyPadActionListener(endButtonId, IDA_END_CALL);
369 btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
370 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
371 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
372 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
373 AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
377 case FORMTYPE_ACTIVECONFCALL:
380 AddKeyPadActionListener(endButtonId, IDA_END_CONF_CALL);
382 btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
383 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
384 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
385 SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
386 AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
390 case FORMTYPE_MULTIPLECALLS:
393 AddKeyPadActionListener(endButtonId, IDA_END_CALL);
395 btnName = AppUtility::GetResourceString(IDS_JOINCALL_BTN_NAME);
396 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_ICON, BTN_NORMAL);
397 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_PRESS_ICON, BTN_PRESS);
398 SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_DIM_ICON, BTN_DIM);
399 AddKeyPadActionListener(addJoinButtonId, IDA_JOIN_CALL);
407 //Keypad is closed, by default
408 SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
409 //Speaker is off, by default
410 SetSpeakerButtonState(IDA_SPEAKER);
411 //Mute is off, by default
412 SetMuteButtonState(IDA_MUTE);
414 String contactButtonId(IDC_CONTACT_BUTTON);
415 btnName = AppUtility::GetResourceString(IDS_CONTACT_BTN_NAME);
416 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_ICON, BTN_NORMAL);
417 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_PRESS_ICON, BTN_PRESS);
418 SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_DIM_ICON, BTN_DIM);
419 AddKeyPadActionListener(contactButtonId, IDA_OPEN_CONTACTS);
421 //disable all keys except 'Speaker' keys while dialing outgoing call
422 if (__parentFormType == FORMTYPE_OUTGOINGCALL || __parentFormType == FORMTYPE_EMERGENCYOUTGOINGCALL
423 || __parentFormType == FORMTYPE_EMERGENCYACTIVECALL)
425 DisableKeysForOutgoingCall();
432 CallButtonsPanel::SetBitmapsToButton(const String& buttonId, const String& buttonName, const String& imgPath, ButtonState state)
434 Button* pButton = static_cast<Button*>(GetControl(buttonId));
437 //Fetch Bitmap from resource
438 Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
439 W_BG_BITMAP, H_BG_BITMAP);
441 //Create a new canvas
442 Canvas* pCanvas = new (std::nothrow) Canvas;
443 pCanvas->Construct(Rectangle(0, 0, pButton->GetWidth(), pButton->GetHeight()));
446 Point bitmapPos(0, 0);
447 bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_BG_BITMAP_POS);
448 SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
450 //set normal bitmap to canvas
451 pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
453 //Set the final Bitmap to Button
454 Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
455 pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
456 //scale to button size
457 pActualBgBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
458 pActualBgBmp->Scale(pButton->GetSize());
464 pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
470 pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
476 pButton->SetDisabledBackgroundBitmap(*pActualBgBmp);
480 pButton->Invalidate(true);
489 CallButtonsPanel::SetViewContacBitmapToButton(const String& buttonId, const String& buttonName, const String& imgBackgroundPath,const String& imgPath, ButtonState state)
491 Button* pButton = static_cast<Button*>(GetControl(buttonId));
495 //Fetch Bitmap from resource
496 Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
497 W_VIEW_CONTACT_BITMAP, W_VIEW_CONTACT_BITMAP);
499 //Create a new canvas
500 Canvas* pCanvas = new (std::nothrow) Canvas;
501 pCanvas->Construct(Rectangle(0, 0, pButton->GetBounds().width, pButton->GetBounds().height));
503 // Draw background bitmap
504 AppResource* pAppResource = AppResource::GetInstance();
505 Bitmap* pBackGroundBitmap = pAppResource->GetBitmapN(imgBackgroundPath);
506 if (pBackGroundBitmap->IsNinePatchedBitmap())
508 pCanvas->DrawNinePatchedBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
512 pCanvas->DrawBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
514 delete pBackGroundBitmap;
516 Point bitmapPos(0, 0);
517 bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_VIEW_CONTACT_BITMAP_POS);
518 SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
521 //set normal bitmap to canvas
522 pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
524 //Set the final Bitmap to Button
525 Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
526 pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
532 pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
538 pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
543 pButton->Invalidate(true);
552 CallButtonsPanel::SetEnrichedTextToButton(const String& buttonName, Canvas* pCanvas, ButtonState state, int verticalPos)
555 Color textColor(255, 255, 255);
559 textColor.SetAlpha(255);
563 textColor.SetAlpha(127);
567 textColor.SetAlpha(77);
572 font.Construct(FONT_STYLE_PLAIN, IDI_TEXT_SIZE);
573 FloatDimension textDimension;
574 font.GetTextExtent(buttonName, buttonName.GetLength(), textDimension);
575 textDimension.height = textDimension.height + font.GetDescender();
576 TextElement* pTextElement = new (std::nothrow) TextElement();
577 pTextElement->Construct(buttonName);
578 pTextElement->SetTextColor(textColor);
579 pTextElement->SetFont(font);
581 EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
582 pEnrichedText->Construct(textDimension);
583 pEnrichedText->Add(*pTextElement);
586 Point textPos(((pCanvas->GetBounds().width - pEnrichedText->GetWidth()) / 2), verticalPos);
587 pCanvas->DrawText(textPos, *pEnrichedText);
590 pEnrichedText->RemoveAll(true);
591 delete pEnrichedText;
595 CallButtonsPanel::AddKeyPadActionListener(const String& buttonId, CommandIds cmdId)
597 Button* pButton = static_cast<Button*>(GetControl(buttonId));
600 pButton->SetActionId(cmdId);
601 pButton->AddActionEventListener(*__pActionListener);
606 CallButtonsPanel::DisableKeysForOutgoingCall(void)
609 EnableAddCallButton(false);
612 Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
613 pButton->SetEnabled(false);
616 pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
617 pButton->SetEnabled(false);
620 pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
621 pButton->SetEnabled(false);
625 CallButtonsPanel::ShowOrHideAddtoContactsButton(bool isEnabled)
627 Button* pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
628 pButton->SetShowState(isEnabled);
632 CallButtonsPanel::SetEndCallPanelState(bool isEnabled)
635 Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
636 pButton->SetEnabled(isEnabled);
639 pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
640 pButton->SetEnabled(false);
643 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
644 pButton->SetEnabled(isEnabled);
646 //AddToContact or Viewcontact button
647 pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
648 pButton->SetShowState(isEnabled);
649 pButton->SetEnabled(isEnabled);
650 /*pButton->Invalidate(true);*/
654 CallButtonsPanel::EnableAddCallButton(bool enable)
657 Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
658 if(pButton != null && pButton->GetActionId() == IDA_ADD_CALL)
660 pButton->SetEnabled(enable);
661 pButton->Invalidate(true);
666 CallButtonsPanel::EnableJoinCallButton(bool enable)
669 Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
670 if(pButton != null && pButton->GetActionId() == IDA_JOIN_CALL)
672 pButton->SetEnabled(enable);
673 pButton->Invalidate(true);
678 CallButtonsPanel::SetButtonPosition(void)
680 switch (__parentFormType)
682 case FORMTYPE_ENDCALL:
685 Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
686 SetControlAlwaysOnTop(*pButton,true);
689 pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
690 SetControlAlwaysOnTop(*pButton,true);
693 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
694 SetControlAlwaysOnTop(*pButton,true);
701 Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
702 SetControlAlwaysOnTop(*pButton,true);
704 pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
705 SetControlAlwaysOnTop(*pButton,true);
707 pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
708 SetControlAlwaysOnTop(*pButton,true);
709 //Add or Join call based on form state
710 pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
711 SetControlAlwaysOnTop(*pButton,true);
713 pButton = static_cast<Button*>(GetControl(IDC_ENDCALL_BUTTON));
714 SetControlAlwaysOnTop(*pButton,true);
716 pButton = static_cast<Button*>(GetControl(IDC_SPEAKER_BUTTON));
717 SetControlAlwaysOnTop(*pButton,true);