Files
Upsilon/apps/shared/xy_banner_view.cpp
Émilie Feral fc84b15214 [apps/shared] XYBannerView: enable a large draft text buffer to edit
long abscissa ("1+2+3+...") even if the non-edited text buffer is short
(it keeps a float that size is capped)
2019-08-13 09:44:00 +02:00

35 lines
825 B
C++

#include "xy_banner_view.h"
#include <assert.h>
namespace Shared {
XYBannerView::XYBannerView(
Responder * parentResponder,
InputEventHandlerDelegate * inputEventHandlerDelegate,
TextFieldDelegate * textFieldDelegate
) :
m_abscissaSymbol(Font(), 1.0f, 0.5f, TextColor(), BackgroundColor()),
m_abscissaValue(
parentResponder,
m_textBody,
k_abscissaBufferSize,
TextField::maxBufferSize(),
inputEventHandlerDelegate,
textFieldDelegate,
Font(),
0.0f, 0.5f,
TextColor(),
BackgroundColor()
),
m_ordinateView(Font(), 0.5f, 0.5f, TextColor(), BackgroundColor())
{
}
View * XYBannerView::subviewAtIndex(int index) {
assert(0 <= index && index < numberOfSubviews());
View * subviews[] = {&m_abscissaSymbol, &m_abscissaValue, &m_ordinateView};
return subviews[index];
}
}