Numworks Epsilon  1.4.1
Graphing Calculator Operating System
histogram_banner_view.cpp
Go to the documentation of this file.
2 #include "../constant.h"
3 #include <assert.h>
4 #include <poincare.h>
5 
6 namespace Statistics {
7 
9  m_intervalLegendView(KDText::FontSize::Small, I18n::Message::Interval, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
10  m_intervalView(KDText::FontSize::Small, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
11  m_sizeLegendView(KDText::FontSize::Small, I18n::Message::Size, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
12  m_sizeView(KDText::FontSize::Small, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
13  m_frequencyLegendView(KDText::FontSize::Small, I18n::Message::Frequency, 1.0f, 0.5f, KDColorBlack, Palette::GreyMiddle),
14  m_frequencyView(KDText::FontSize::Small, 0.0f, 0.5f, KDColorBlack, Palette::GreyMiddle)
15 {
16 }
17 
18 int HistogramBannerView::numberOfSubviews() const {
19  return 6;
20 }
21 
22 TextView * HistogramBannerView::textViewAtIndex(int i) const {
23  const TextView * textViews[6] = {&m_intervalLegendView, &m_intervalView, &m_sizeLegendView, &m_sizeView, &m_frequencyLegendView, &m_frequencyView};
24  return (TextView *)textViews[i];
25 }
26 
27 MessageTextView * HistogramBannerView::messageTextViewAtIndex(int index) const {
28  const MessageTextView * textViews[6] = {&m_intervalLegendView, nullptr, &m_sizeLegendView, nullptr, &m_frequencyLegendView, nullptr};
29  return (MessageTextView *)textViews[index];
30 }
31 
32 }
Definition: i18n.h:6
Definition: text.h:8
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: palette.h:6