Numworks Epsilon  1.4.1
Graphing Calculator Operating System
apps_container.h
Go to the documentation of this file.
1 #ifndef APPS_CONTAINER_H
2 #define APPS_CONTAINER_H
3 
4 #include "home/app.h"
5 #include "on_boarding/app.h"
6 #include "hardware_test/app.h"
8 #include "usb/app.h"
9 #include "apps_window.h"
10 #include "empty_battery_window.h"
11 #include "math_toolbox.h"
13 #include "exam_pop_up_controller.h"
15 #include "led_timer.h"
16 #include "battery_timer.h"
17 #include "suspend_timer.h"
19 
20 #define USE_PIC_VIEW_APP 0
21 #if USE_PIC_VIEW_APP
22 #include "picview/picview_app.h"
23 #endif
24 
25 #include <ion/events.h>
26 
28 public:
29  AppsContainer();
30  static bool poincareCircuitBreaker();
31  virtual int numberOfApps() = 0;
32  virtual App::Snapshot * appSnapshotAtIndex(int index) = 0;
36  void reset();
40  void suspend(bool checkIfPowerKeyReleased = false);
41  virtual bool dispatchEvent(Ion::Events::Event event) override;
42  void switchTo(App::Snapshot * snapshot) override;
43  void run() override;
44  bool updateBatteryState();
45  void refreshPreferences();
46  void displayExamModePopUp(bool activate);
50  void redrawWindow();
51  // Exam pop-up controller delegate
52  void examDeactivatingPopUpIsDismissed() override;
53 protected:
54  Home::App::Snapshot * homeAppSnapshot() { return &m_homeSnapshot; }
55 private:
56  Window * window() override;
57  int numberOfContainerTimers() override;
58  Timer * containerTimerAtIndex(int i) override;
59  bool processEvent(Ion::Events::Event event);
60  void resetShiftAlphaStatus();
61  bool updateAlphaLock();
62  AppsWindow m_window;
63  EmptyBatteryWindow m_emptyBatteryWindow;
64 #if USE_PIC_VIEW_APP
65  PicViewApp m_picViewApp;
66 #endif
67  Poincare::GlobalContext m_globalContext;
68  MathToolbox m_mathToolbox;
69  VariableBoxController m_variableBoxController;
70  ExamPopUpController m_examPopUpController;
71  OnBoarding::UpdateController m_updateController;
72  LedTimer m_ledTimer;
73  BatteryTimer m_batteryTimer;
74  SuspendTimer m_suspendTimer;
75  BacklightDimmingTimer m_backlightDimmingTimer;
76  Home::App::Snapshot m_homeSnapshot;
77  OnBoarding::App::Snapshot m_onBoardingSnapshot;
78  HardwareTest::App::Snapshot m_hardwareTestSnapshot;
79  USB::App::Snapshot m_usbConnectedSnapshot;
80 };
81 
82 #endif
void displayExamModePopUp(bool activate)
Definition: timer.h:15
ShiftAlphaStatus
Definition: events.h:41
Definition: window.h:6
virtual App::Snapshot * appSnapshotAtIndex(int index)=0
void shutdownDueToLowBattery()
void switchTo(App::Snapshot *snapshot) override
virtual bool dispatchEvent(Ion::Events::Event event) override
Home::App::Snapshot * homeAppSnapshot()
VariableBoxController * variableBoxController()
OnBoarding::UpdateController * updatePopUpController()
void setShiftAlphaStatus(Ion::Events::ShiftAlphaStatus newStatus)
App::Snapshot * hardwareTestAppSnapshot()
void suspend(bool checkIfPowerKeyReleased=false)
App::Snapshot * onBoardingAppSnapshot()
Poincare::Context * globalContext()
App::Snapshot * usbConnectedAppSnapshot()
bool updateBatteryState()
void examDeactivatingPopUpIsDismissed() override
void run() override
virtual int numberOfApps()=0
MathToolbox * mathToolbox()
void refreshPreferences()
static bool poincareCircuitBreaker()