3 #include "plugintoggles.h"
8 PluginOn::PluginOn(MWindow *mwindow, int x, int y, Plugin *plugin)
11 mwindow->theme->get_image_set("plugin_on"),
14 this->mwindow = mwindow;
15 this->plugin = plugin;
19 int PluginOn::calculate_w(MWindow *mwindow)
21 return mwindow->theme->get_image_set("plugin_on")[0]->get_w();
24 void PluginOn::update(int x, int y, Plugin *plugin)
26 BC_Toggle::set_value(plugin->on, 0);
27 reposition_window(x, y);
28 this->plugin = plugin;
32 int PluginOn::handle_event()
34 plugin->on = get_value();
36 mwindow->restart_brender();
37 mwindow->sync_parameters(CHANGE_EDL);
38 lock_window("PluginOn::handle_event");
45 PluginShow::PluginShow(MWindow *mwindow, int x, int y, Plugin *plugin)
48 mwindow->theme->get_image_set("plugin_show"),
51 this->mwindow = mwindow;
52 this->plugin = plugin;
56 int PluginShow::calculate_w(MWindow *mwindow)
58 return mwindow->theme->get_image_set("plugin_show")[0]->get_w();
61 void PluginShow::update(int x, int y, Plugin *plugin)
63 BC_Toggle::set_value(plugin->show, 0);
64 reposition_window(x, y);
65 this->plugin = plugin;
69 int PluginShow::handle_event()
73 mwindow->show_plugin(plugin);
75 mwindow->hide_plugin(plugin, 1);
76 lock_window("PluginShow::handle_event");