add mouse wheel events and scroll attribute

This commit is contained in:
airstruck
2015-12-01 11:15:42 -05:00
parent 44d541bc8f
commit 591bb7507a
9 changed files with 140 additions and 12 deletions

View File

@@ -122,6 +122,20 @@ function Attribute.style (widget, value)
widget.reshape(widget.parent or widget)
end
--[[--
Scroll ability.
Should contain `true` or `false` (or `nil`).
If set to `true`, moving the scroll wheel over the widget will adjust
its scroll position when the widget's contents overflow its boundary.
@attrib scroll
--]]--
function Attribute.scroll (widget, value)
widget.attributes.scroll = value
end
--[[--
Size Attributes.