mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
35 lines
840 B
C++
35 lines
840 B
C++
#include "controller.h"
|
|
|
|
namespace ExpressionEditor {
|
|
|
|
Controller::ContentView::ContentView(ExpressionAndLayout * expressionAndLayout) :
|
|
SolidColorView(KDColorWhite),
|
|
m_expressionView()
|
|
{
|
|
m_expressionView.setExpression(expressionAndLayout->expressionLayout());
|
|
}
|
|
|
|
void Controller::ContentView::layoutSubviews() {
|
|
m_expressionView.setFrame(KDRect(
|
|
k_margin,
|
|
k_margin,
|
|
bounds().width() - 2 * k_margin,
|
|
bounds().height() - 2 * k_margin));
|
|
}
|
|
|
|
KDSize Controller::ContentView::minimalSizeForOptimalDisplay() const {
|
|
return m_expressionView.minimalSizeForOptimalDisplay();
|
|
}
|
|
|
|
Controller::Controller(Responder * parentResponder, ExpressionAndLayout * expressionAndLayout) :
|
|
ViewController(parentResponder),
|
|
m_view(expressionAndLayout)
|
|
{
|
|
}
|
|
|
|
bool Controller::handleEvent(Ion::Events::Event event) {
|
|
return false;
|
|
}
|
|
|
|
}
|