4 * Copyright (C) 2008-2019 Adam Williams <broadcast at earthling dot net>
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.
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.
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
24 class ForegroundConfig;
25 class ForegroundColors;
26 class ForegroundWindow;
30 #include "colorpicker.h"
31 #include "filexml.inc"
33 #include "pluginvclient.h"
36 class ForegroundConfig
41 int equivalent(ForegroundConfig &that);
42 void copy_from(ForegroundConfig &that);
43 void interpolate(ForegroundConfig &prev, ForegroundConfig &next,
44 long prev_frame, long next_frame, long current_frame);
45 // Int to hex triplet conversion
51 class ForegroundColors : public ColorGUI
54 ForegroundColors(ForegroundWindow *window,
55 ForegroundMain *plugin);
56 virtual ~ForegroundColors();
58 int handle_new_color(int color, int alpha);
59 void update_gui(int color, int alpha);
61 ForegroundWindow *window;
62 ForegroundMain *plugin;
66 class ForegroundWindow : public PluginClientWindow
69 ForegroundWindow(ForegroundMain *plugin);
72 void create_objects();
75 int close_event() { return colors->close_gui(); }
76 int cursor_motion_event() { return colors->cursor_motion_gui(); }
77 int button_press_event() { return colors->button_press_gui(); }
78 int button_release_event() { return colors->button_release_gui(); }
79 void done_event(int result) { colors->close_gui(); }
81 ForegroundMain *plugin;
82 ForegroundColors *colors;
85 class ForegroundMain : public PluginVClient
88 ForegroundMain(PluginServer *server);
91 int process_buffer(VFrame *frame,
92 int64_t start_position,
95 void save_data(KeyFrame *keyframe);
96 void read_data(KeyFrame *keyframe);
100 PLUGIN_CLASS_MEMBERS(ForegroundConfig)