, __pEditTime(null)
, __pSelectionBtn(null)
, __modal(0)
+ , __isModal(false)
, __popupHeight(0)
, __popupWidth(0)
, __btnHeight(0)
_InputPickerPopup::~_InputPickerPopup(void)
{
+ if (__isModal == true)
+ {
+ HidePopup();
+ }
}
r = AddButton(ID_BUTTON_INPUT_DATE_SELECTION);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- __pPopup->SetOwner(&pImpl->GetPublic());
__pPopup->SetPropagatedKeyEventListener(this);
std::unique_ptr<VerticalBoxLayout> pLayout(dynamic_cast< VerticalBoxLayout* >(__pPopup->GetLayoutN()));
pColorPicker->SetColor(color);
- __pPopup->SetOwner(&pImpl->GetPublic());
__pPopup->SetPropagatedKeyEventListener(this);
r = __pPopup->AddControl(*pColorPicker);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
_SystemResource* pSysResource = _SystemResource::GetInstance();
SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- buttonStr = pSysResource->GetString("sys_string", "IDS_COM_SK_OK");
+ buttonStr = pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK");
std::unique_ptr<Button> pSelectionBtn(new (std::nothrow) Button());
SysTryReturnResult(NID_WEB_CTRL, pSelectionBtn.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
r = __pPopup->SetShowState(true);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __isModal = true;
+
r = __pPopup->DoModal(__modal);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = __pPopup->SetShowState(false);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+ __isModal = false;
+
r = __pPopup->EndModal(__modal);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
bool
_InputPickerPopup::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
{
- return true;
+ return false;
}
bool
HidePopup();
}
- return true;
+ return false;
}
bool