This repository was archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCLIP.H
executable file
·82 lines (61 loc) · 1.6 KB
/
CLIP.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
77
78
79
80
81
82
#ifndef _CLIP_
#define _CLIP_
class clipdata
{
public:
clipdata();
virtual ~clipdata() {}
virtual void paste()=0; //paste the clip data
};
class clip_images:public clipdata
{
class objectdef *od; //objectdef that the images reference
int numimages; //number of images copied
int size; //size in bytes
struct image *i; //pointer to images copied
public:
clip_images(struct frame *fptr,class objectdef *od); //copy images from a frame
virtual ~clip_images();
virtual void paste();
};
class clip_frame:public clipdata
{
class objectdef *od; //objectdef of frames
int numf; //number of frames
int size; //size of frames in bytes
struct frame *f; //pointer to frames copied
public:
clip_frame(struct frame *fptr,int tnumf,class objectdef *od); //copy images from a frame
virtual ~clip_frame();
virtual void paste();
};
class clip_effects:public clipdata
{
class objectdef *od; //objectdef that the images reference
int numeffects; //number of effects copied
int size; //size in bytes
struct effect *e; //pointer to images copied
public:
clip_effects(struct frame *fptr,class objectdef *od); //copy effects from a frame
virtual ~clip_effects();
virtual void paste();
};
//clipboard class
class CLIPBOARD
{
class clipdata *cd; //current data contained in clipboard
public:
CLIPBOARD():cd(0) {};
~CLIPBOARD() {if (cd) delete cd;}
void adddata(clipdata *t)
{
if (cd) delete cd; //remove old data
cd=t;
}
void paste()
{
if (cd) cd->paste();
}
};
extern CLIPBOARD clipboard; //main clipboard
#endif