micromenu/inc/example.h
2021-02-24 20:37:27 +01:00

39 lines
745 B
C++

#ifndef _EXAMPLE_H_
#define _EXAMPLE_H_
#include "gfx/Canvas.h"
#include "node.h"
using canvas = micromenu::Canvas;
using node = micromenu::node;
using value = micromenu::value;
class menu : public node {
public:
template<typename ... Args>
explicit menu(Args ... ns) : node(ns...) {
}
void render(canvas &c) override;
};
class fooValue : public value {
public:
fooValue(const char *str, int val) : value(str, val, 32, 48) {
}
void render(canvas &c) override;
};
class blubValue : public value {
public:
template<typename ... Args>
explicit blubValue(Args ... ns) : value(ns..., 64, 96) {
}
void render(canvas &c) override;
};
#endif