load fn from resources, del kfrm speed update, svg exec cmd/file win fixes, undo...
[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         ~NewSvgButton();
86         int handle_event();
87         void run();
88         void stop();
89
90         SvgMain *client;
91         SvgWin *window;
92         NewSvgWindow *new_window;
93 };
94
95 class EditSvgButton : public BC_GenericButton, public Thread
96 {
97 public:
98         EditSvgButton(SvgMain *client, SvgWin *window, int x, int y);
99         ~EditSvgButton();
100         int handle_event();
101         void stop();
102         void run();
103
104         SvgMain *client;
105         SvgWin *window;
106         int fh_fifo;
107 };
108
109 class SvgInkscapeThread : public Thread
110 {
111 public:
112         SvgInkscapeThread(EditSvgButton *edit);
113         ~SvgInkscapeThread();
114         void run();
115         EditSvgButton *edit;
116 };
117
118 class NewSvgWindow : public BC_FileBox
119 {
120 public:
121         NewSvgWindow(SvgMain *client, SvgWin *window, char *init_directory);
122         ~NewSvgWindow();
123         SvgMain *client;
124         SvgWin *window;
125 };
126
127 class DpiValue : public BC_TumbleTextBox
128 {
129 public:
130         DpiValue(SvgWin *win, SvgMain *client,
131                 int x, int y, float *value);
132         ~DpiValue();
133         int handle_event();
134
135         SvgMain *client;
136         SvgWin *win;
137         float *value;
138
139 };
140
141 class DpiButton : public BC_GenericButton
142 {
143 public:
144         DpiButton( SvgWin *window, SvgMain *client, int x, int y);
145         ~DpiButton();
146         int handle_event();
147
148         SvgMain *client;
149         SvgWin *window;
150 };
151
152
153 #endif