opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
undo_button.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <memory>
6#include <string>
7#include <utility>
8
9namespace osc { class UndoRedoBase; }
10
11namespace osc
12{
13 // a user-visible button, with a history dropdown menu, that performs an undo operation
14 class UndoButton final : public Widget {
15 public:
16 explicit UndoButton(
18 std::shared_ptr<UndoRedoBase> undo_redo,
19 std::string button_icon_text = "<") :
20
22 undo_redo_{std::move(undo_redo)},
23 button_icon_text_{std::move(button_icon_text)}
24 {}
25
26 private:
28
29 std::shared_ptr<UndoRedoBase> undo_redo_;
30 std::string button_icon_text_;
31 };
32}
Definition undo_button.h:14
void impl_on_draw() final
UndoButton(Widget *parent, std::shared_ptr< UndoRedoBase > undo_redo, std::string button_icon_text="<")
Definition undo_button.h:16
Definition undo_redo.h:104
Definition widget.h:26
Widget * parent()
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56