You.i Engine
YiBackButtonHandler.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_BACK_BUTTON_HANDLER_H_
3 #define _YI_BACK_BUTTON_HANDLER_H_
4 
6 #include "framework/YiPredef.h"
7 
26 {
27 public:
28 
32  class Listener
33  {
34  public:
35  virtual ~Listener();
36 
44  virtual bool OnBackButtonPressed() = 0;
45  };
46 
51  static bool NotifyBackButtonPressed();
52 
56  static void AddListener(Listener *pListener);
57 
61  static void RemoveListener(Listener *pListener);
62 
68  static void RemoveAllListeners();
69 
70 private:
72 
73  static std::vector<CYIBackButtonHandler::Listener *> m_pBackButtonListeners;
74 };
75 
78 #endif // _YI_BACK_BUTTON_HANDLER_H_
static void RemoveListener(Listener *pListener)
Implement this interface to provide custom behaviour when the system back button is pressed...
Definition: YiBackButtonHandler.h:32
static bool NotifyBackButtonPressed()
The base class for an object accessible from script source code.
Definition: YiScriptableObject.h:28
static void AddListener(Listener *pListener)
virtual bool OnBackButtonPressed()=0
Intercepts the system back button notification.
Definition: YiBackButtonHandler.h:25
static void RemoveAllListeners()