opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
liboscar
ui
widgets
undo_button.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
liboscar/platform/widget.h
>
4
5
#include <memory>
6
#include <string>
7
#include <utility>
8
9
namespace
osc
{
class
UndoRedoBase; }
10
11
namespace
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
(
17
Widget
*
parent
,
18
std::shared_ptr<UndoRedoBase>
undo_redo
,
19
std::string
button_icon_text
=
"<"
) :
20
21
Widget
{
parent
},
22
undo_redo_{std::
move
(
undo_redo
)},
23
button_icon_text_{std::
move
(
button_icon_text
)}
24
{}
25
26
private
:
27
void
impl_on_draw
()
final
;
28
29
std::
shared_ptr
<
UndoRedoBase
> undo_redo_;
30
std::
string
button_icon_text_;
31
};
32
}
osc::UndoButton
Definition
undo_button.h:14
osc::UndoButton::impl_on_draw
void impl_on_draw() final
osc::UndoButton::UndoButton
UndoButton(Widget *parent, std::shared_ptr< UndoRedoBase > undo_redo, std::string button_icon_text="<")
Definition
undo_button.h:16
osc::UndoRedoBase
Definition
undo_redo.h:104
osc::Widget
Definition
widget.h:26
osc::Widget::parent
Widget * parent()
osc
Definition
custom_decoration_generator.h:5
osc::to
constexpr U to(T &&value)
Definition
conversion.h:56
widget.h
Generated by
1.9.8