本文整理汇总了Python中pyasm.web.DivWdg.get_buffer_display方法的典型用法代码示例。如果您正苦于以下问题:Python DivWdg.get_buffer_display方法的具体用法?Python DivWdg.get_buffer_display怎么用?Python DivWdg.get_buffer_display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.DivWdg
的用法示例。
在下文中一共展示了DivWdg.get_buffer_display方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rgba
# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import get_buffer_display [as 别名]
top.add_style("height: 300")
top.add_style("width: 500")
top.add_style("margin: 150px auto")
top.add_style("border: solid 1px black")
top.add_style("border-radius: 15px")
top.add_style("box-shadow: 0px 0px 15px rgba(0,0,0,0.5)")
widget = Error404Wdg()
widget.status = status
widget.message = message
top.add(widget)
return top.get_buffer_display()
except Exception, e:
print "ERROR: ", e
return "ERROR: ", e
def setup_sites(my):
context_path = "%s/src/context" % my.install_dir
doc_dir = "%s/doc" % my.install_dir
plugin_dir = Environment.get_plugin_dir()
builtin_plugin_dir = Environment.get_builtin_plugin_dir()
dist_dir = Environment.get_dist_dir()
示例2: get_display
# 需要导入模块: from pyasm.web import DivWdg [as 别名]
# 或者: from pyasm.web.DivWdg import get_buffer_display [as 别名]
#.........这里部分代码省略.........
inner.add(table)
table.add_style("margin: 20px")
table.add_style("box-sizing: border-box")
if is_owner:
menu = self.get_action_menu()
#SmartMenu.add_smart_menu_set( top, { 'BUTTON_MENU': menu } )
element_names = config.get_element_names()
index = 0
for y in range(grid[1]):
row = DivWdg()
table.add(row)
row.add_class("row")
row.add_style("box-sizing: border-box")
num_cols = grid[0]
size = 12 / num_cols
for x in range(grid[0]):
col = DivWdg()
row.add(col)
col.add_class("col-sm-%s" % size)
col.add_style("box-sizing: border-box")
col.add_style("overflow: auto")
col.add_class("spt_panel_top")
if is_owner:
header = DivWdg()
col.add(header)
menu_wdg = DivWdg()
header.add(menu_wdg)
menu_wdg.add_style("float: right")
menu_wdg.add("<i class='fa fa-bars'> </i>")
menu_wdg.add_class("hand")
SmartMenu.add_smart_menu_set( menu_wdg, { 'BUTTON_MENU': menu } )
SmartMenu.assign_as_local_activator( menu_wdg, "BUTTON_MENU", True )
element = None
title = None
if index < len(element_names):
element_name = element_names[index]
#element_name = "%s,%s" % (x,y)
element = config.get_display_widget(element_name)
title = config.get_element_title(element_name)
if not title:
title = Common.get_display_title(element_name)
if not element:
element = DivWdg()
element.add("No content")
element.add_style("height: 100%")
element.add_style("width: 100%")
element.add_style("text-align: center")
element.add_border()
else:
try:
element = element.get_buffer_display()
except:
element = DivWdg()
element.add("No content")
element.add_style("height: 100%")
element.add_style("width: 100%")
element.add_style("text-align: center")
element.add_border()
if is_owner:
if title:
header.add(title)
else:
header.add("Panel: %s,%s" % (x, y))
col.add("<hr/>")
content = DivWdg()
col.add(content)
content.add_class("spt_panel_content")
content.add_style("min-height: 200px;")
content.add(element)
index += 1
if self.kwargs.get("is_refresh"):
return inner
else:
return top