Numworks Epsilon  1.4.1
Graphing Calculator Operating System
window.cpp
Go to the documentation of this file.
1 #include <escher/window.h>
2 #include <ion.h>
3 extern "C" {
4 #include <assert.h>
5 }
6 
8  m_contentView(nullptr)
9 {
10 }
11 
12 void Window::redraw(bool force) {
13  if (force) {
15  }
17  View::redraw(bounds());
18 }
19 
20 void Window::setContentView(View * contentView) {
21  m_contentView = contentView;
24 }
25 
26 const Window * Window::window() const {
27  return this;
28 }
29 
31  return (m_contentView == nullptr ? 0 : 1);
32 }
33 
35  assert(m_contentView != nullptr && index == 0);
36  return m_contentView;
37 }
38 
40  if (m_contentView != nullptr) {
42  }
43 }
44 
45 #if ESCHER_VIEW_LOGGING
46 const char * Window::className() const {
47  return "Window";
48 }
49 #endif
virtual int numberOfSubviews() const override
Definition: window.cpp:30
#define assert(e)
Definition: assert.h:9
Definition: window.h:6
void setFrame(KDRect frame)
Definition: view.cpp:125
void markRectAsDirty(KDRect rect)
Definition: view.cpp:39
virtual View * subviewAtIndex(int index) override
Definition: window.cpp:34
void redraw(bool force=false)
Definition: window.cpp:12
void setContentView(View *contentView)
Definition: window.cpp:20
Window()
Definition: window.cpp:7
Definition: view.h:23
virtual void layoutSubviews() override
Definition: window.cpp:39
void waitForVBlank()
Definition: display.cpp:32
View * m_contentView
Definition: window.h:18
KDRect bounds() const
Definition: view.cpp:157