| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | module Plugin::Gtk3 |
| 4 | class TabToolbar < Gtk::Grid |
| 5 | def initialize(imaginally) |
| 6 | type_strict imaginally => Plugin::GUI::TabToolbar |
| 7 | @imaginally = imaginally |
| 8 | super() |
| 9 | end |
| 10 | |
| 11 | def set_button |
| 12 | children.each(&method(:remove)) |
| 13 | current_world, = Plugin.filtering(:world_current, nil) |
| 14 | ToolbarGenerator.generate( |
| 15 | self, |
| 16 | Plugin::GUI::Event.new( |
| 17 | event: :tab_toolbar, |
| 18 | widget: @imaginally.parent, |
| 19 | messages: [], |
| 20 | world: current_world |
| 21 | ), |
| 22 | :tab |
| 23 | ) |
| 24 | end |
| 25 | end |
| 26 | end |