当前位置: 首页>>代码示例>>Python>>正文


Python CompositeCanvas.finalize方法代码示例

本文整理汇总了Python中urwid.canvas.CompositeCanvas.finalize方法的典型用法代码示例。如果您正苦于以下问题:Python CompositeCanvas.finalize方法的具体用法?Python CompositeCanvas.finalize怎么用?Python CompositeCanvas.finalize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在urwid.canvas.CompositeCanvas的用法示例。


在下文中一共展示了CompositeCanvas.finalize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: finalize_render

# 需要导入模块: from urwid.canvas import CompositeCanvas [as 别名]
# 或者: from urwid.canvas.CompositeCanvas import finalize [as 别名]
 def finalize_render(self, size, focus=False):
     canv = fn(self, size, focus=focus)
     if canv.widget_info:
         canv = CompositeCanvas(canv)
     validate_size(self, size, canv)
     canv.finalize(self, size, focus)
     return canv
开发者ID:sporkexec,项目名称:urwid,代码行数:9,代码来源:widget.py

示例2: cached_render

# 需要导入模块: from urwid.canvas import CompositeCanvas [as 别名]
# 或者: from urwid.canvas.CompositeCanvas import finalize [as 别名]
    def cached_render(self, size, focus=False):
        focus = focus and not ignore_focus
        canv = CanvasCache.fetch(self, cls, size, focus)
        if canv:
            return canv

        canv = fn(self, size, focus=focus)
        validate_size(self, size, canv)
        if canv.widget_info:
            canv = CompositeCanvas(canv)
        canv.finalize(self, size, focus)
        CanvasCache.store(cls, canv)
        return canv
开发者ID:sporkexec,项目名称:urwid,代码行数:15,代码来源:widget.py


注:本文中的urwid.canvas.CompositeCanvas.finalize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。