forked from ahmidou/SpliceMaya
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFabricSpliceToolContext.h
76 lines (56 loc) · 1.53 KB
/
FabricSpliceToolContext.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef _FabricSpliceToolContext_H_
#define _FabricSpliceToolContext_H_
#include <QtCore/QObject>
#include <QtCore/QEvent>
#include "Foundation.h"
#include "plugin.h"
#include <FabricSplice.h>
#include "FabricSpliceBaseInterface.h"
class FabricSpliceManipulationCmd : public MPxToolCommand
{
private:
FabricCore::RTVal m_rtval_commands;
public:
FabricSpliceManipulationCmd();
virtual ~FabricSpliceManipulationCmd();
static void* creator();
MStatus doIt(const MArgList& args);
MStatus redoIt();
MStatus undoIt();
bool isUndoable() const;
// We set the static commands pointer, and then construct the command.
static FabricCore::RTVal s_rtval_commands;
};
class FabricSpliceToolCmd : public MPxToolCommand
{
public:
FabricSpliceToolCmd();
virtual ~FabricSpliceToolCmd();
static void* creator();
MStatus doIt(const MArgList& args);
MStatus redoIt();
MStatus undoIt();
bool isUndoable() const;
};
class FabricSpliceToolContext : public MPxContext
{
public:
FabricSpliceToolContext();
virtual void getClassName(MString & name) const;
virtual void toolOnSetup(MEvent &event);
virtual void toolOffCleanup();
virtual MStatus doPress(MEvent &event);
virtual MStatus doDrag(MEvent &event);
virtual MStatus doRelease(MEvent &event);
virtual MStatus doEnterRegion(MEvent &event);
bool onEvent(QEvent *event);
private:
FabricCore::RTVal mEventDispatcher;
};
class FabricSpliceToolContextCmd : public MPxContextCommand
{
public:
virtual MPxContext* makeObj();
static void* creator();
};
#endif