Class: Motion::Xray::PluginToolbar
Instance Attribute Summary
Attributes inherited from XrayToolbar
#canvas, #delegate, #selected
Instance Method Summary
collapse
Methods inherited from XrayToolbar
#margin, #select, #show, #tapped
Methods inherited from UIView
build_xray, #xray, #xray_subviews
Instance Method Details
#add(plugin) ⇒ Object
108
109
110
111
112
113
|
# File 'lib/motion-xray/views/xray_toolbar.rb', line 108
def add(plugin)
name = plugin.xray_name
plugin_view = plugin.get_plugin_view(@canvas)
@plugin_items << plugin
super(name, plugin_view)
end
|
#initWithFrame(frame) ⇒ Object
101
102
103
104
105
106
|
# File 'lib/motion-xray/views/xray_toolbar.rb', line 101
def initWithFrame(frame)
super.tap do
@plugin_items = []
@selected = nil
end
end
|
#will_hide ⇒ Object
115
116
117
|
# File 'lib/motion-xray/views/xray_toolbar.rb', line 115
def will_hide
@selected.hide if @selected
end
|
#will_show ⇒ Object
119
120
121
122
|
# File 'lib/motion-xray/views/xray_toolbar.rb', line 119
def will_show
@selected = @plugin_items[@index]
@selected.show if @selected
end
|