279bc507a04db98ae77ccfd31837230b36fb2596
[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         void update_gui(SvgConfig &config);
49
50         SvgCoord *in_x, *in_y, *in_w, *in_h, *out_x, *out_y, *out_w, *out_h;
51         SvgMain *client;
52         BC_Title *svg_file_title;
53         BC_Title *svg_file_mstime;
54         NewSvgButton *new_svg_button;
55         NewSvgWindow *new_svg_thread;
56         EditSvgButton *edit_svg_button;
57         Mutex editing_lock;
58         int editing;
59
60 };
61
62 class SvgCoord : public BC_TumbleTextBox
63 {
64 public:
65         SvgCoord(SvgWin *win, 
66                 SvgMain *client, 
67                 int x, 
68                 int y, 
69                 float *value);
70         ~SvgCoord();
71         int handle_event();
72
73         SvgMain *client;
74         SvgWin *win;
75         float *value;
76
77 };
78
79 class NewSvgButton : public BC_GenericButton, public Thread
80 {
81 public:
82         NewSvgButton(SvgMain *client, SvgWin *window, int x, int y);
83         int handle_event();
84         void run();
85         
86         SvgMain *client;
87         SvgWin *window;
88 };
89
90 class EditSvgButton : public BC_GenericButton, public Thread
91 {
92 public:
93         EditSvgButton(SvgMain *client, SvgWin *window, int x, int y);
94         ~EditSvgButton();
95         int handle_event();
96         void stop();
97         void run();
98
99         SvgMain *client;
100         SvgWin *window;
101         int fh_fifo;    
102 };
103
104 class SvgInkscapeThread : public Thread
105 {
106 public:
107         SvgInkscapeThread(EditSvgButton *edit);
108         ~SvgInkscapeThread();
109         void run();
110         EditSvgButton *edit;
111 };
112
113 class NewSvgWindow : public BC_FileBox
114 {
115 public:
116         NewSvgWindow(SvgMain *client, SvgWin *window, char *init_directory);
117         ~NewSvgWindow();
118         SvgMain *client;
119         SvgWin *window;
120 };
121
122
123 #endif