47c73ab26a3eb19e0f90fb609dbba6e3da8637b2
[goodguy/history.git] / cinelerra-5.1 / plugins / svg / svgwin.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * 
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  */
21
22 #ifndef SVGWIN_H
23 #define SVGWIN_H
24
25 #include "guicast.h"
26 #include "filexml.h"
27 #include "mutex.h"
28 #include "pluginclient.h"
29 #include "svg.h"
30 #include "thread.h"
31
32 class SvgThread;
33 class SvgWin;
34
35 class SvgCoord;
36 class NewSvgButton;
37 class NewSvgWindow;
38 class EditSvgButton;
39
40 class SvgWin : public PluginClientWindow
41 {
42 public:
43         SvgWin(SvgMain *client);
44         ~SvgWin();
45
46         void create_objects();
47         int close_event();
48
49         SvgCoord *in_x, *in_y, *in_w, *in_h, *out_x, *out_y, *out_w, *out_h;
50         SvgMain *client;
51         BC_Title *svg_file_title;
52         NewSvgButton *new_svg_button;
53         NewSvgWindow *new_svg_thread;
54         EditSvgButton *edit_svg_button;
55         Mutex editing_lock;
56         int editing;
57
58 };
59
60 class SvgCoord : public BC_TumbleTextBox
61 {
62 public:
63         SvgCoord(SvgWin *win, 
64                 SvgMain *client, 
65                 int x, 
66                 int y, 
67                 float *value);
68         ~SvgCoord();
69         int handle_event();
70
71         SvgMain *client;
72         SvgWin *win;
73         float *value;
74
75 };
76
77 class NewSvgButton : public BC_GenericButton, public Thread
78 {
79 public:
80         NewSvgButton(SvgMain *client, SvgWin *window, int x, int y);
81         int handle_event();
82         void run();
83         
84         int quit_now;
85         SvgMain *client;
86         SvgWin *window;
87 };
88
89 class EditSvgButton : public BC_GenericButton, public Thread
90 {
91 public:
92         EditSvgButton(SvgMain *client, SvgWin *window, int x, int y);
93         ~EditSvgButton();
94         int handle_event();
95         void run();
96         
97         int quit_now;
98         int fh_fifo;
99         SvgMain *client;
100         SvgWin *window;
101 };
102
103 class NewSvgWindow : public BC_FileBox
104 {
105 public:
106         NewSvgWindow(SvgMain *client, SvgWin *window, char *init_directory);
107         ~NewSvgWindow();
108         SvgMain *client;
109         SvgWin *window;
110 };
111
112 class SvgInkscapeThread : public Thread
113 {
114 public:
115         SvgInkscapeThread(SvgMain *client, SvgWin *window);
116         ~SvgInkscapeThread();
117         void run();
118         SvgMain *client;
119         SvgWin *window;
120         int fh_fifo;
121 };
122
123
124 #endif