forked from UpsilonNumworks/atomic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_atomic_cell.h
More file actions
30 lines (24 loc) · 750 Bytes
/
list_atomic_cell.h
File metadata and controls
30 lines (24 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef ATOMIC_LIST_ATOMIC_CELL_H
#define ATOMIC_LIST_ATOMIC_CELL_H
#include <escher/bordered.h>
#include <escher/highlight_cell.h>
#include "atoms.h"
namespace Atomic {
class ListAtomicCell : public Bordered, public HighlightCell {
public:
ListAtomicCell();
void setHighlighted(bool highlight) override { return; }
void drawRect(KDContext * ctx, KDRect rect) const override;
void setAtom(AtomDef atom);
private:
constexpr static int k_width = 60;
constexpr static int k_margin = 10;
constexpr static int k_padding = 3;
int numberOfSubviews() const override { return 0; }
View * subviewAtIndex(int index) override;
void layoutSubviews(bool force = false) override;
KDRect m_atomRect() const;
AtomDef m_atom;
};
}
#endif