24 lines
508 B
C++
24 lines
508 B
C++
#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};
|
|
};
|