Plasma Engine
2.0
Loading...
Searching...
No Matches
CommandHistoryActions.h
1
#pragma once
2
3
#include <GuiFoundation/Action/BaseActions.h>
4
#include <GuiFoundation/GuiFoundationDLL.h>
5
#include <ToolsFoundation/CommandHistory/CommandHistory.h>
6
8
class
PL_GUIFOUNDATION_DLL
plCommandHistoryActions
9
{
10
public
:
11
static
void
RegisterActions();
12
static
void
UnregisterActions();
13
14
static
void
MapActions(
plStringView
sMapping,
plStringView
sTargetMenu =
"G.Edit"
);
15
16
static
plActionDescriptorHandle
s_hCommandHistoryCategory;
17
static
plActionDescriptorHandle
s_hUndo;
18
static
plActionDescriptorHandle
s_hRedo;
19
};
20
21
23
class
PL_GUIFOUNDATION_DLL
plCommandHistoryAction
:
public
plDynamicActionAndMenuAction
24
{
25
PL_ADD_DYNAMIC_REFLECTION(
plCommandHistoryAction
,
plDynamicActionAndMenuAction
);
26
27
public
:
28
enum class
ButtonType
29
{
30
Undo,
31
Redo,
32
};
33
34
plCommandHistoryAction
(
const
plActionContext
& context,
const
char
* szName, ButtonType button);
35
~plCommandHistoryAction
();
36
37
virtual
void
Execute(
const
plVariant
& value)
override
;
38
virtual
void
GetEntries(
plHybridArray<plDynamicMenuAction::Item, 16>
& out_entries)
override
;
39
40
private
:
41
void
UpdateState();
42
void
CommandHistoryEventHandler(
const
plCommandHistoryEvent
& e);
43
44
ButtonType m_ButtonType;
45
};
plActionDescriptorHandle
Handle for a plAction.
Definition
Action.h:27
plCommandHistoryAction
Definition
CommandHistoryActions.h:24
plCommandHistoryActions
Definition
CommandHistoryActions.h:9
plDynamicActionAndMenuAction
Definition
BaseActions.h:115
plHybridArray
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition
HybridArray.h:12
plStringView
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition
StringView.h:34
plVariant
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition
Variant.h:44
plActionContext
Definition
Action.h:67
plCommandHistoryEvent
Definition
CommandHistory.h:31
Code
Tools
Libs
GuiFoundation
Action
CommandHistoryActions.h
Generated by
1.11.0