Editor API
UnigineEditor public API
AssetCreatorRegistry.h
1
// Copyright (C), UNIGINE. All rights reserved.
2
#pragma once
3
4
#include <editor/EditorGlobal.h>
5
6
#include <editor/MenuBase.h>
7
8
#include <UnigineCallback.h>
9
10
11
namespace
Editor
12
{
13
14
class
AssetCreateMenuContext
15
{
16
public
:
17
virtual
const
char
*
getVirtualDirectoryPath
()
const
= 0;
18
19
protected
:
20
AssetCreateMenuContext
() =
default
;
21
virtual
~AssetCreateMenuContext
() =
default
;
22
};
23
24
/*
25
* If you want to create assets, you are able to register a callback here to extend the 'Create'
26
* menu.
27
* It must be used on the main thread.
28
* The callback will be called on the main thread.
29
*/
30
class
EDITOR_API
AssetCreatorRegistry
final
31
{
32
public
:
33
static
void
*addAssetCreateMenuExtender(
34
Unigine::CallbackBase2<MenuBase *, AssetCreateMenuContext *> *callback_to_extend_menu);
35
static
bool
removeAssetCreateMenuExtender(
void
*
id
);
36
};
37
38
}
// namespace Editor
Editor
Definition:
Actions.h:11
Editor::AssetCreateMenuContext::AssetCreateMenuContext
AssetCreateMenuContext()=default
Editor::AssetCreateMenuContext
Definition:
AssetCreatorRegistry.h:14
Editor::AssetCreatorRegistry
Definition:
AssetCreatorRegistry.h:30
Editor::AssetCreateMenuContext::~AssetCreateMenuContext
virtual ~AssetCreateMenuContext()=default
Editor::AssetCreateMenuContext::getVirtualDirectoryPath
virtual const char * getVirtualDirectoryPath() const =0
D:
Fox
rep_gitlab2
source
editor2
apps
editor
include
editor
AssetCreatorRegistry.h
Generated by
1.8.15