| 642 | } |
| 643 | |
| 644 | lay::Plugin *LayoutViewBase::create_plugin (const lay::PluginDeclaration *cls) |
| 645 | { |
| 646 | lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), this); |
| 647 | if (p) { |
| 648 | |
| 649 | // unhook the plugin from the script side if created there (prevent GC from destroying it) |
| 650 | p->gsi::ObjectBase::keep (); |
| 651 | |
| 652 | mp_plugins.push_back (p); |
| 653 | p->set_plugin_declaration (cls); |
| 654 | |
| 655 | // enable editable functionality |
| 656 | if (p->editable_interface ()) { |
| 657 | enable (p->editable_interface (), cls->editable_enabled ()); |
| 658 | } |
| 659 | |
| 660 | update_event_handlers (); |
| 661 | |
| 662 | } |
| 663 | return p; |
| 664 | } |
| 665 | |
| 666 | Plugin *LayoutViewBase::get_plugin_by_name (const std::string &name) const |
| 667 | { |
nothing calls this directly
no test coverage detected