mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 22:00:28 +01:00
27 lines
694 B
C++
27 lines
694 B
C++
#ifndef GRAPH_FUNCTION_NAME_VIEW_H
|
|
#define GRAPH_FUNCTION_NAME_VIEW_H
|
|
|
|
#include <escher.h>
|
|
#include "../function.h"
|
|
|
|
class FunctionCell;
|
|
|
|
class FunctionNameView : public ChildlessView, public Responder {
|
|
public:
|
|
FunctionNameView(Responder * parentResponder, Invocation invocation);
|
|
Graph::Function * function() const;
|
|
bool isEven() const;
|
|
bool isFocused() const;
|
|
|
|
void drawRect(KDContext * ctx, KDRect rect) const override;
|
|
void didBecomeFirstResponder() override;
|
|
void didResignFirstResponder() override;
|
|
bool handleEvent(Ion::Events::Event event) override;
|
|
private:
|
|
constexpr static int k_colorIndicatorThickness = 4;
|
|
bool m_focused;
|
|
Invocation m_invocation;
|
|
};
|
|
|
|
#endif
|