Files
Upsilon/apps/graph/list/function_name_view.h
Émilie Feral 7efec4331d [apps/graph/list] Improve the drawRect of function cells
Change-Id: I2338151444e04f44e2b432ec8435ff63a2837fc9
2016-09-26 14:18:12 +02:00

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