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 #include "../../i18n.h"
3 
4 namespace Graph {
5 
7  m_abscissaView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
8  m_functionView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
9  m_derivativeView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
10  m_tangentEquationView(KDText::FontSize::Small, I18n::Message::RegressionFormula, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
11  m_aView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
12  m_bView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
13  m_numberOfSubviews(2)
14 {
15 }
16 
17 void BannerView::setNumberOfSubviews(int numberOfSubviews) {
18  m_numberOfSubviews = numberOfSubviews;
19 }
20 
21 int BannerView::numberOfSubviews() const {
22  return m_numberOfSubviews;
23 }
24 
25 TextView * BannerView::textViewAtIndex(int i) const {
26  const TextView * textViews[6] = {&m_abscissaView, &m_functionView, &m_derivativeView, &m_tangentEquationView, &m_aView, &m_bView};
27  return (TextView *)textViews[i];
28 }
29 
30 MessageTextView * BannerView::messageTextViewAtIndex(int i) const {
31  if (i == 3) {
32  return (MessageTextView *)&m_tangentEquationView;
33  }
34  return nullptr;
35 }
36 
37 }
Definition: i18n.h:6
Definition: text.h:8
Definition: app.cpp:9
void setNumberOfSubviews(int numberOfSubviews)
Definition: banner_view.cpp:17
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: palette.h:6