ufe
4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
contextOps.h
Go to the documentation of this file.
1
#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/contextOps.h"
2
#ifndef _contextOps
3
#define _contextOps
4
// ===========================================================================
5
// Copyright 2020 Autodesk, Inc. All rights reserved.
6
//
7
// Use of this software is subject to the terms of the Autodesk license
8
// agreement provided at the time of installation or download, or which
9
// otherwise accompanies this software in either electronic or hard copy form.
10
// ===========================================================================
11
12
#include "
common/ufeExport.h
"
13
14
#include "
sceneItem.h
"
15
#include "
undoableCommand.h
"
16
17
#include <memory>
18
#include <vector>
19
#include <string>
20
21
UFE_NS_DEF
{
22
24
29
struct
UFE_SDK_DECL
ContextItem
{
30
31
enum
HasChildren
{ kNoChildren =
false
, kHasChildren =
true
};
32
enum
Checkable
{ kNotCheckable =
false
, kCheckable =
true
};
33
enum
Checked
{ kNotChecked =
false
, kChecked =
true
};
34
enum
Exclusive
{ kNotExclusive =
false
, kExclusive =
true
};
35
enum
Enabled
{ kDisabled =
false
, kEnabled =
true
};
36
37
enum
SeparatorTag
{ kSeparator };
38
39
ContextItem
() =
default
;
40
ContextItem
(
41
const
std::string
& argItem,
42
const
std::string
& argLabel,
43
bool
argHasChildren =
false
,
44
bool
argCheckable =
false
,
45
bool
argChecked =
false
,
46
bool
argExclusive =
false
,
47
bool
argEnabled =
true
48
);
50
ContextItem
(
51
const
std::string
& argItem,
52
const
std::string
& argLabel,
53
const
std::string
& argImage,
54
bool
argHasChildren =
false
,
55
bool
argCheckable =
false
,
56
bool
argChecked =
false
,
57
bool
argExclusive =
false
,
58
bool
argEnabled =
true
59
);
61
ContextItem
(SeparatorTag,
const
std::string
& argLabel =
""
);
62
64
std::string
item{};
65
67
std::string
label{};
68
70
std::string
image{};
71
74
bool
hasChildren{
false
};
75
77
bool
checkable{
false
};
78
80
bool
checked{
false
};
81
84
bool
exclusive{
false
};
85
87
bool
enabled{
true
};
88
90
bool
separator{
false
};
91
};
92
94
108
class
UFE_SDK_DECL
ContextOps
109
{
110
public
:
111
typedef
std::shared_ptr<ContextOps>
Ptr
;
112
typedef
std::vector<std::string>
ItemPath
;
113
typedef
std::vector<ContextItem>
Items
;
114
122
static
Ptr
contextOps(
const
SceneItem::Ptr
& item);
123
125
ContextOps
();
127
ContextOps
(
const
ContextOps
&) =
default
;
129
virtual
~
ContextOps
();
130
132
virtual
SceneItem::Ptr
sceneItem()
const
= 0;
133
136
virtual
Items
getItems(
const
ItemPath
& itemPath)
const
= 0;
137
143
virtual
void
doOp(
const
ItemPath
& itemPath);
144
153
virtual
UndoableCommand::Ptr
doOpCmd(
const
ItemPath
& itemPath) = 0;
154
};
155
156
}
157
158
#endif
/* _contextOps */
Ufe::UndoableCommand::Ptr
std::shared_ptr< UndoableCommand > Ptr
Definition:
undoableCommand.h:39
Ufe::ContextItem::Enabled
Enabled
Definition:
contextOps.h:35
Ufe::ContextOps::Ptr
std::shared_ptr< ContextOps > Ptr
Definition:
contextOps.h:111
Ufe::PathString::string
std::string string(const Path &path)
ufeExport.h
Definition of macros for symbol visibility.
Ufe::ContextItem::HasChildren
HasChildren
Definition:
contextOps.h:31
Ufe::ContextItem::Exclusive
Exclusive
Definition:
contextOps.h:34
undoableCommand.h
Ufe::ContextItem::Checked
Checked
Definition:
contextOps.h:33
Ufe::ContextItem
Structure to describe contextual operations.
Definition:
contextOps.h:29
sceneItem.h
UFE_NS_DEF
#define UFE_NS_DEF
Definition:
ufe.h:35
Ufe::ContextItem::SeparatorTag
SeparatorTag
Definition:
contextOps.h:37
Ufe::ContextOps::ItemPath
std::vector< std::string > ItemPath
Definition:
contextOps.h:112
Ufe::SceneItem::Ptr
std::shared_ptr< SceneItem > Ptr
Definition:
sceneItem.h:40
Ufe::ContextOps::Items
std::vector< ContextItem > Items
Definition:
contextOps.h:113
Ufe::ContextItem::Checkable
Checkable
Definition:
contextOps.h:32
UFE_SDK_DECL
#define UFE_SDK_DECL
Definition:
ufeExport.h:36
Ufe::ContextOps
Abstract base class for context operations interface.
Definition:
contextOps.h:108
common
include
ufe
contextOps.h
Generated on Fri Jun 2 2023 07:30:07 for ufe by
1.8.14