mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/sequence/graph] Create a class banner view
Change-Id: Ie619eab80a150e8a2c42a2861d42b95357dd848c
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
app_objs += $(addprefix apps/sequence/,\
|
||||
app.o\
|
||||
graph/banner_view.o\
|
||||
list/list_controller.o\
|
||||
list/list_parameter_controller.o\
|
||||
list/sequence_toolbox.o\
|
||||
|
||||
20
apps/sequence/graph/banner_view.cpp
Normal file
20
apps/sequence/graph/banner_view.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "banner_view.h"
|
||||
|
||||
namespace Sequence {
|
||||
|
||||
BannerView::BannerView() :
|
||||
m_abscissaView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle),
|
||||
m_sequenceView(KDText::FontSize::Small, 0.5f, 0.5f, KDColorBlack, Palette::GreyMiddle)
|
||||
{
|
||||
}
|
||||
|
||||
int BannerView::numberOfSubviews() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
TextView * BannerView::textViewAtIndex(int i) {
|
||||
TextView * views[2] = {&m_abscissaView, &m_sequenceView};
|
||||
return views[i];
|
||||
}
|
||||
|
||||
}
|
||||
21
apps/sequence/graph/banner_view.h
Normal file
21
apps/sequence/graph/banner_view.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef SEQUENCE_BANNER_VIEW_H
|
||||
#define SEQUENCE_BANNER_VIEW_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "../../shared/banner_view.h"
|
||||
|
||||
namespace Sequence {
|
||||
|
||||
class BannerView : public Shared::BannerView {
|
||||
public:
|
||||
BannerView();
|
||||
private:
|
||||
int numberOfSubviews() const override;
|
||||
TextView * textViewAtIndex(int i) override;
|
||||
BufferTextView m_abscissaView;
|
||||
BufferTextView m_sequenceView;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user