remove whitespace at eol
[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 class DpiValue;
40 class DpiButton;
41
42 class SvgWin : public PluginClientWindow
43 {
44 public:
45         SvgWin(SvgMain *client);
46         ~SvgWin();
47
48         void create_objects();
49         int close_event();
50         void update_gui(SvgConfig &config);
51         int hide_window(int flush = 1);
52
53         SvgCoord *out_x, *out_y, *out_w, *out_h;
54         DpiValue *dpi;
55         DpiButton *dpi_button;
56         SvgMain *client;
57         BC_Title *svg_file_title;
58         BC_Title *svg_file_mstime;
59         NewSvgButton *new_svg_button;
60         NewSvgWindow *new_svg_thread;
61         EditSvgButton *edit_svg_button;
62         Mutex editing_lock;
63         int editing;
64
65 };
66
67 class SvgCoord : public BC_TumbleTextBox
68 {
69 public:
70         SvgCoord(SvgWin *win, SvgMain *client,
71                 int x, int y, float *value);
72         ~SvgCoord();
73         int handle_event();
74
75         SvgMain *client;
76         SvgWin *win;
77         float *value;
78
79 };
80
81 class NewSvgButton : public BC_GenericButton, public Thread
82 {
83 public:
84         NewSvgButton(SvgMain *client, SvgWin *window, int x, int y);
85         int handle_event();
86         void run();
87
88         SvgMain *client;
89         SvgWin *window;
90 };
91
92 class EditSvgButton : public BC_GenericButton, public Thread
93 {
94 public:
95         EditSvgButton(SvgMain *client, SvgWin *window, int x, int y);
96         ~EditSvgButton();
97         int handle_event();
98         void stop();
99         void run();
100
101         SvgMain *client;
102         SvgWin *window;
103         int fh_fifo;
104 };
105
106 class SvgInkscapeThread : public Thread
107 {
108 public:
109         SvgInkscapeThread(EditSvgButton *edit);
110         ~SvgInkscapeThread();
111         void run();
112         EditSvgButton *edit;
113 };
114
115 class NewSvgWindow : public BC_FileBox
116 {
117 public:
118         NewSvgWindow(SvgMain *client, SvgWin *window, char *init_directory);
119         ~NewSvgWindow();
120         SvgMain *client;
121         SvgWin *window;
122 };
123
124 class DpiValue : public BC_TumbleTextBox
125 {
126 public:
127         DpiValue(SvgWin *win, SvgMain *client,
128                 int x, int y, float *value);
129         ~DpiValue();
130         int handle_event();
131
132         SvgMain *client;
133         SvgWin *win;
134         float *value;
135
136 };
137
138 class DpiButton : public BC_GenericButton
139 {
140 public:
141         DpiButton( SvgWin *window, SvgMain *client, int x, int y);
142         ~DpiButton();
143         int handle_event();
144
145         SvgMain *client;
146         SvgWin *window;
147 };
148
149
150 #endif