Numworks Epsilon  1.4.1
Graphing Calculator Operating System
banner_view.cpp
Go to the documentation of this file.
1 #include "banner_view.h"
2 
3 namespace Regression {
4 
6  m_dotNameView(KDText::FontSize::Small, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
7  m_xView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
8  m_yView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
9  m_regressionTypeView(KDText::FontSize::Small, (I18n::Message)0, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
10  m_slopeView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
11  m_yInterceptView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
12  m_rView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
13  m_r2View(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle)
14 {
15 }
16 
17 int BannerView::numberOfSubviews() const {
18  return 8;
19 }
20 
21 TextView * BannerView::textViewAtIndex(int i) const {
22  const TextView * textViews[8] = {&m_dotNameView, &m_xView, &m_yView, &m_regressionTypeView, &m_slopeView, &m_yInterceptView, &m_rView, &m_r2View};
23  return (TextView *)textViews[i];
24 }
25 
26 MessageTextView * BannerView::messageTextViewAtIndex(int i) const {
27  if (i == 3) {
28  return (MessageTextView *)&m_regressionTypeView;
29  }
30  return nullptr;
31 }
32 
33 }
Definition: i18n.h:6
Definition: text.h:8
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: palette.h:6