-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathEvent.h
60 lines (53 loc) · 2.24 KB
/
Event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include <cstdint>
#include <memory>
#include <functional>
#include <ostream>
#include <UI.h>
#include <immat.h>
#include <imgui_curve.h>
#include <imgui_json.h>
#include <ImMaskCreator.h>
namespace MEC
{
struct EventStack;
struct Event
{
using Holder = std::shared_ptr<Event>;
static bool CheckEventOverlapped(const Event& e, int64_t start, int64_t end, int32_t z);
static std::function<bool(const Event&,const Event&)> EVENT_ORDER_COMPARATOR;
virtual EventStack* GetOwner() = 0;
virtual int64_t Id() const = 0;
virtual int64_t Start() const = 0;
virtual int64_t End() const = 0;
virtual int64_t Length() const = 0;
virtual int32_t Z() const = 0;
virtual uint32_t Status() const = 0;
virtual bool IsInRange(int64_t pos) const = 0;
virtual BluePrint::BluePrintUI* GetBp() = 0;
virtual ImGui::KeyPointEditor* GetKeyPoint() = 0;
virtual bool ChangeRange(int64_t start, int64_t end) = 0;
virtual void ChangeId(int64_t id) = 0;
virtual bool Move(int64_t start, int32_t z) = 0;
virtual void SetStatus(uint32_t status) = 0;
virtual void SetStatus(int bit, int val) = 0;
virtual std::string GetError() const = 0;
virtual imgui_json::value SaveAsJson() const = 0;
friend std::ostream& operator<<(std::ostream& os, const Event& e);
};
struct VideoEvent : virtual Event
{
virtual ImGui::ImMat FilterImage(const ImGui::ImMat& vmat, int64_t pos, const std::unordered_map<std::string, std::string>* pExtraArgs = nullptr) = 0;
virtual ImGui::MaskCreator::Holder CreateNewMask(const std::string& name) = 0;
virtual int GetMaskCount() const = 0;
virtual int GetMaskCount(int64_t nodeId) const = 0;
virtual const ImGui::MaskCreator::Holder GetMaskCreator(size_t index) const = 0;
virtual const ImGui::MaskCreator::Holder GetMaskCreator(int64_t nodeId, size_t index) const = 0;
virtual bool RemoveMask(size_t index) = 0;
virtual bool RemoveMask(int64_t nodeId, size_t index) = 0;
};
struct AudioEvent : virtual Event
{
virtual ImGui::ImMat FilterPcm(const ImGui::ImMat& amat, int64_t pos, int64_t dur) = 0;
};
}