class MainForm
: public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::IPropagatedKeyEventListener
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::Controls::IFormBackEventListener
, public Tizen::Ui::Controls::IFormMenuEventListener
virtual result OnInitializing(void);
virtual result OnTerminating(void);
+ virtual bool OnKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
+ virtual bool OnKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
+ virtual bool OnPreviewKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
+ virtual bool OnPreviewKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
+ virtual bool TranslateKeyEventInfo (Tizen::Ui::Control &source, Tizen::Ui::KeyEventInfo &keyEventInfo);
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
virtual void OnFormMenuRequested(Tizen::Ui::Controls::Form& source);
virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
__pMessagePopup = new Popup();
__pMessagePopup->Construct(IDC_MESSAGE_POPUP);
+ __pMessagePopup->SetPropagatedKeyEventListener(this);
__pMessageLabel = static_cast<Label*>(__pMessagePopup->GetControl(IDC_LABEL_MASSEGE_TEXT, true));
__pOptionMenu = new OptionMenu();
return r;
}
+bool
+MainForm::OnKeyPressed (Control &source, const KeyEventInfo &keyEventInfo)
+{
+ return true;
+}
+
+bool
+MainForm::OnKeyReleased (Control &source, const KeyEventInfo &keyEventInfo)
+{
+ if(keyEventInfo.GetKeyCode() == KEY_BACK)
+ {
+ if(__pMessagePopup)
+ {
+ __pMessagePopup->SetShowState(false);
+ }
+ }
+ return true;
+}
+
+bool
+MainForm::OnPreviewKeyPressed (Control &source, const KeyEventInfo &keyEventInfo)
+{
+ return true;
+}
+
+bool
+MainForm::OnPreviewKeyReleased (Control &source, const KeyEventInfo &keyEventInfo)
+{
+ return true;
+}
+
+bool
+MainForm::TranslateKeyEventInfo (Control &source, KeyEventInfo &keyEventInfo)
+{
+ return true;
+}
+
void
MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
{