00001 #ifndef SVGWIN_H
00002 #define SVGWIN_H
00003
00004 #include "guicast.h"
00005 #include "filexml.h"
00006 #include "mutex.h"
00007 #include "pluginclient.h"
00008 #include "svg.h"
00009 #include "thread.h"
00010
00011 class SvgThread;
00012 class SvgWin;
00013
00014 PLUGIN_THREAD_HEADER(SvgMain, SvgThread, SvgWin)
00015
00016 class SvgCoord;
00017 class NewSvgButton;
00018 class NewSvgWindow;
00019 class EditSvgButton;
00020
00021 class SvgWin : public BC_Window
00022 {
00023 public:
00024 SvgWin(SvgMain *client, int x, int y);
00025 ~SvgWin();
00026
00027 int create_objects();
00028 int close_event();
00029
00030 SvgCoord *in_x, *in_y, *in_w, *in_h, *out_x, *out_y, *out_w, *out_h;
00031 SvgMain *client;
00032 BC_Title *svg_file_title;
00033 NewSvgButton *new_svg_button;
00034 NewSvgWindow *new_svg_thread;
00035 EditSvgButton *edit_svg_button;
00036 Mutex editing_lock;
00037 int editing;
00038
00039 };
00040
00041 class SvgCoord : public BC_TumbleTextBox
00042 {
00043 public:
00044 SvgCoord(SvgWin *win,
00045 SvgMain *client,
00046 int x,
00047 int y,
00048 float *value);
00049 ~SvgCoord();
00050 int handle_event();
00051
00052 SvgMain *client;
00053 SvgWin *win;
00054 float *value;
00055
00056 };
00057
00058 class NewSvgButton : public BC_GenericButton, public Thread
00059 {
00060 public:
00061 NewSvgButton(SvgMain *client, SvgWin *window, int x, int y);
00062 int handle_event();
00063 void run();
00064
00065 int quit_now;
00066 SvgMain *client;
00067 SvgWin *window;
00068 };
00069
00070 class EditSvgButton : public BC_GenericButton, public Thread
00071 {
00072 public:
00073 EditSvgButton(SvgMain *client, SvgWin *window, int x, int y);
00074 ~EditSvgButton();
00075 int handle_event();
00076 void run();
00077
00078 int quit_now;
00079 int fh_fifo;
00080 SvgMain *client;
00081 SvgWin *window;
00082 };
00083
00084 class NewSvgWindow : public BC_FileBox
00085 {
00086 public:
00087 NewSvgWindow(SvgMain *client, SvgWin *window, char *init_directory);
00088 ~NewSvgWindow();
00089 SvgMain *client;
00090 SvgWin *window;
00091 };
00092
00093 class SvgInkscapeThread : public Thread
00094 {
00095 public:
00096 SvgInkscapeThread(SvgMain *client, SvgWin *window);
00097 ~SvgInkscapeThread();
00098 void run();
00099 SvgMain *client;
00100 SvgWin *window;
00101 int fh_fifo;
00102 };
00103
00104
00105 #endif