/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Tools/Libs/GuiFoundation/Action/CommandHistoryActions.h
45 строк
1 KB
C-Core
Substance integration improvements (#1460)
19 дек 2024, 19:59
Не верифицирован
19 дек 2024, 19:59
88bbbdc
Код
Авторство
О чём код?
#pragma once #include <GuiFoundation/Action/BaseActions.h> #include <GuiFoundation/GuiFoundationDLL.h> #include <ToolsFoundation/CommandHistory/CommandHistory.h> /// class EZ_GUIFOUNDATION_DLL ezCommandHistoryActions { public: static void RegisterActions(); static void UnregisterActions(); static void MapActions(ezStringView sMapping, ezStringView sTargetMenu = "G.Edit"); static ezActionDescriptorHandle s_hCommandHistoryCategory; static ezActionDescriptorHandle s_hUndo; static ezActionDescriptorHandle s_hRedo; }; /// class EZ_GUIFOUNDATION_DLL ezCommandHistoryAction : public ezDynamicActionAndMenuAction { EZ_ADD_DYNAMIC_REFLECTION(ezCommandHistoryAction, ezDynamicActionAndMenuAction); public: enum class ButtonType { Undo, Redo, }; ezCommandHistoryAction(const ezActionContext& context, const char* szName, ButtonType button); ~ezCommandHistoryAction(); virtual void Execute(const ezVariant& value) override; virtual void GetEntries(ezDynamicArray<Item>& out_entries) override; private: void UpdateState(); void CommandHistoryEventHandler(const ezCommandHistoryEvent& e); ButtonType m_ButtonType; };