Numworks Epsilon  1.4.1
Graphing Calculator Operating System
tab_view_controller.h
Go to the documentation of this file.
1 #ifndef ESCHER_TAB_VIEW_CONTROLLER_H
2 #define ESCHER_TAB_VIEW_CONTROLLER_H
3 
6 #include <escher/tab_view.h>
7 
9 public:
11  View * view() override;
12  int activeTab() const;
13  void setSelectedTab(int8_t index);
14  void setActiveTab(int8_t index);
16 
17  const char * tabName(uint8_t index);
18  bool handleEvent(Ion::Events::Event event) override;
19  void didBecomeFirstResponder() override;
20  void didEnterResponderChain(Responder * previousResponder) override;
21  void willResignFirstResponder() override;
22  void viewWillAppear() override;
23  void viewDidDisappear() override;
24 private:
25  ViewController * activeViewController();
26  class ContentView : public View {
27  public:
28  ContentView();
29 
30  void setActiveView(View * view);
31  TabView m_tabView;
32  protected:
33 #if ESCHER_VIEW_LOGGING
34  const char * className() const override;
35 #endif
36  private:
37  int numberOfSubviews() const override;
38  View * subviewAtIndex(int index) override;
39  void layoutSubviews() override;
40 
41  View * m_activeView;
42  };
43 
44  ContentView m_view;
45 
46  static constexpr uint8_t k_maxNumberOfChildren = 4;
47  ViewController * m_children[k_maxNumberOfChildren];
48  uint8_t m_numberOfChildren;
49  TabViewDataSource * m_dataSource;
50 };
51 
52 #endif
TabViewController(Responder *parentResponder, TabViewDataSource *dataSource, ViewController *one, ViewController *two, ViewController *three, ViewController *four=nullptr)
void willResignFirstResponder() override
View * view() override
void setActiveTab(int8_t index)
void didEnterResponderChain(Responder *previousResponder) override
Responder * parentResponder() const
Definition: responder.cpp:12
#define one
Definition: k_tan.c:68
void viewWillAppear() override
unsigned char uint8_t
Definition: stdint.h:4
bool handleEvent(Ion::Events::Event event) override
void didBecomeFirstResponder() override
const char * tabName(uint8_t index)
signed char int8_t
Definition: stdint.h:9
void setSelectedTab(int8_t index)
Definition: view.h:23
void viewDidDisappear() override