本文整理匯總了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