AeFxAsset.c++
1.79 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*****************************************************************************
* File: AeFxAsset.c++
*
* AeFxAsset Class Implementations
*
****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <Vk/VkApp.h>
#include "AeAsset.h"
#include "GList.h"
#include "fxIcon.xbm"
const int AeFxAsset::kDelayMin = 0;
const int AeFxAsset::kDelayMax = 60000;
const int AeFxAsset::kDelayDef = 0;
#define kLengthDef 50
Pixmap AeFxAsset::fIcon = NULL;
AeFxAsset::AeFxAsset (const char * name) : AeContainerAsset (name, kFxType)
{
if (!fIcon)
{
fIcon = XCreateBitmapFromData (theApplication->display (),
DefaultRootWindow (theApplication->display ()),
(char *)fxIcon_bits,
fxIcon_width,
fxIcon_height);
}
fLength = kLengthDef; // default to non-zero length filter
fFxType = kFxCustomType;
}
AeFxAsset::~AeFxAsset (void)
{
}
void
AeFxAsset::GetClassName (char * name)
{
strcpy (name, "effect");
}
void
AeFxAsset::AppendChild (AeAsset * child)
{
TString63 name;
int id;
AeContainerAsset::AppendChild (child);
fChildList->Find (child, id);
sprintf (name, "%.60s%d", fName, id+1);
child->SetName (name);
}
void
AeFxAsset::SetLengthProc (AeAsset * asset, int length)
{
assert (asset);
((AeFxAsset *)asset)->SetLength (length);
}
int
AeFxAsset::GetLengthProc (AeAsset * asset)
{
assert (asset);
return ((AeFxAsset *)asset)->GetLength ();
}
#if NOT_SUPPORTED
void
AeFxAsset::SetFxTypeProc (AeAsset * asset, TAssetType type)
{
assert (asset);
((AeFxAsset *)asset)->SetFxType (type);
}
int
AeFxAsset::GetFxTypeProc (AeAsset * asset)
{
assert (asset);
return ((AeFxAsset *)asset)->GetFxType ();
}
#endif