本文整理汇总了Python中dtk.ui.application.Application.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Application.__init__方法的具体用法?Python Application.__init__怎么用?Python Application.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dtk.ui.application.Application
的用法示例。
在下文中一共展示了Application.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from dtk.ui.application import Application [as 别名]
# 或者: from dtk.ui.application.Application import __init__ [as 别名]
def __init__(self,
app_support_colormap=True,
resizable=True,
window_type=gtk.WINDOW_TOPLEVEL,
destroy_func=None,
always_at_center=True,
max_callback=None,
):
'''
Initialize the Application class.
@param app_support_colormap: Set False if your program don't allow manipulate colormap,
such as mplayer, otherwise you should keep this option as True.
@param resizable: Set this option with False if you want window's size fixed, default is True.
'''
# Init.
Application.__init__(
self,
app_support_colormap,
resizable,
window_type,
destroy_func,
always_at_center
)
''' Initialize
self.app_support_colormap = app_support_colormap
self.resizable = resizable
self.window_type = window_type
self.close_callback = self.close_window
self.skin_preview_pixbuf = None
self.destroy_func = destroy_func
self.always_at_center = always_at_center
self.init()
'''
if max_callback:
self.max_callback = max_callback
else:
self.max_callback = lambda w:self.window.toggle_max_window()
self.skin_preview_pixbuf = None