本文整理汇总了Python中pitivi.ui.zoominterface.Zoomable.zoomIn方法的典型用法代码示例。如果您正苦于以下问题:Python Zoomable.zoomIn方法的具体用法?Python Zoomable.zoomIn怎么用?Python Zoomable.zoomIn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pitivi.ui.zoominterface.Zoomable
的用法示例。
在下文中一共展示了Zoomable.zoomIn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_scroll_event
# 需要导入模块: from pitivi.ui.zoominterface import Zoomable [as 别名]
# 或者: from pitivi.ui.zoominterface.Zoomable import zoomIn [as 别名]
def do_scroll_event(self, event):
if event.direction == gtk.gdk.SCROLL_UP:
Zoomable.zoomIn()
elif event.direction == gtk.gdk.SCROLL_DOWN:
Zoomable.zoomOut()
# TODO: seek timeline back/forward
elif event.direction == gtk.gdk.SCROLL_LEFT:
pass
elif event.direction == gtk.gdk.SCROLL_RIGHT:
pass
示例2: do_scroll_event
# 需要导入模块: from pitivi.ui.zoominterface import Zoomable [as 别名]
# 或者: from pitivi.ui.zoominterface.Zoomable import zoomIn [as 别名]
def do_scroll_event(self, event):
if event.state & gtk.gdk.SHIFT_MASK:
# shift + scroll => vertical (up/down) scroll
if event.direction == gtk.gdk.SCROLL_LEFT:
event.direction = gtk.gdk.SCROLL_UP
elif event.direction == gtk.gdk.SCROLL_RIGHT:
event.direction = gtk.gdk.SCROLL_DOWN
event.state &= ~gtk.gdk.SHIFT_MASK
elif event.state & gtk.gdk.CONTROL_MASK:
# zoom + scroll => zooming (up: zoom in)
if event.direction == gtk.gdk.SCROLL_UP:
Zoomable.zoomIn()
return True
elif event.direction == gtk.gdk.SCROLL_DOWN:
Zoomable.zoomOut()
return True
return False
else:
if event.direction == gtk.gdk.SCROLL_UP:
event.direction = gtk.gdk.SCROLL_LEFT
elif event.direction == gtk.gdk.SCROLL_DOWN:
event.direction = gtk.gdk.SCROLL_RIGHT
return goocanvas.Canvas.do_scroll_event(self, event)