stuff-from-scratch/apps/notes_tk/canvas/CanvasCommandSelectorView.h

25 lines
508 B
C
Raw Normal View History

2022-12-05 10:59:45 +00:00
#pragma once
#include "Widget.h"
#include "CanvasElements.h"
#include <functional>
class CanvasCommandSelectorView : public Widget
{
public:
using onCommandSelectedFunc = std::function<void(CanvasDrawCommand command)>;
CanvasCommandSelectorView();
void setCommandSelectedCallback(onCommandSelectedFunc func)
{
mCommandSelectedCallback = func;
}
void onCommandSelected(CanvasDrawCommand command);
private:
onCommandSelectedFunc mCommandSelectedCallback{nullptr};
};