Numworks Epsilon
1.4.1
Graphing Calculator Operating System
logo_view.cpp
Go to the documentation of this file.
1
#include "
logo_view.h
"
2
#include "logo_icon.h"
3
#include <
assert.h
>
4
5
namespace
OnBoarding
{
6
7
LogoView::LogoView
() :
8
View
()
9
{
10
m_logoView.
setImage
(ImageStore::LogoIcon);
11
}
12
13
void
LogoView::drawRect
(
KDContext
* ctx,
KDRect
rect)
const
{
14
ctx->
fillRect
(
bounds
(),
KDColorWhite
);
15
}
16
17
int
LogoView::numberOfSubviews()
const
{
18
return
1;
19
}
20
21
View
* LogoView::subviewAtIndex(
int
index) {
22
assert
(index == 0);
23
return
&m_logoView;
24
}
25
26
void
LogoView::layoutSubviews() {
27
m_logoView.
setFrame
(
KDRect
((
Ion::Display::Width
- ImageStore::LogoIcon->width())/2, (
Ion::Display::Height
- ImageStore::LogoIcon->height())/2, ImageStore::LogoIcon->width(), ImageStore::LogoIcon->height()));
28
}
29
30
}
OnBoarding
Definition:
app.cpp:5
assert
#define assert(e)
Definition:
assert.h:9
View::setFrame
void setFrame(KDRect frame)
Definition:
view.cpp:125
Ion::Display::Width
constexpr int Width
Definition:
display.h:26
logo_view.h
OnBoarding::LogoView::LogoView
LogoView()
Definition:
logo_view.cpp:7
assert.h
KDColorWhite
constexpr KDColor KDColorWhite
Definition:
color.h:42
KDContext
Definition:
context.h:8
ImageView::setImage
void setImage(const Image *image)
Definition:
image_view.cpp:21
KDRect
Definition:
rect.h:26
KDContext::fillRect
void fillRect(KDRect rect, KDColor color)
Definition:
context_rect.cpp:8
View
Definition:
view.h:23
OnBoarding::LogoView::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
logo_view.cpp:13
Ion::Display::Height
constexpr int Height
Definition:
display.h:27
View::bounds
KDRect bounds() const
Definition:
view.cpp:157
epsilon
apps
on_boarding
logo_view.cpp
Generated by
1.8.14