本文整理汇总了Python中miro.frontends.widgets.gtk.base.Widget.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Widget.__init__方法的具体用法?Python Widget.__init__怎么用?Python Widget.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类miro.frontends.widgets.gtk.base.Widget
的用法示例。
在下文中一共展示了Widget.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self):
Widget.__init__(self)
self.set_widget(gtk.VolumeButton())
self.wrapped_widget_connect('value-changed', self.on_value_changed)
self._widget.get_popup().connect("hide", self.on_hide)
self.create_signal('changed')
self.create_signal('released')
示例2: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, xalign=0, yalign=0, xscale=0, yscale=0,
top_pad=0, bottom_pad=0, left_pad=0, right_pad=0):
Widget.__init__(self)
self.set_widget(gtk.Notebook())
self._widget.set_tab_pos(gtk.POS_TOP)
self.children = []
self._page_to_select = None
self.wrapped_widget_connect('realize', self._on_realize)
示例3: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, initial_text=None, border=False):
Widget.__init__(self)
self.set_widget(self.entry_class())
if initial_text is not None:
self.set_text(initial_text)
self._widget.set_wrap_mode(gtk.WRAP_WORD)
self._widget.set_accepts_tab(False)
self.border = border
示例4: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, path):
Widget.__init__(self)
self.set_widget(gtk.Image())
self._animation = gtk.gdk.PixbufAnimation(path)
# Set to animate before we are shown and stop animating after
# we disappear.
self._widget.connect("map", lambda w: self._set_animate(True))
self._widget.connect("unmap-event", lambda w, a: self._set_animate(False))
示例5: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, text=""):
Widget.__init__(self)
self.set_widget(gtk.Label())
self.wrapped_widget_connect('style-set', self.on_style_set)
if text:
self.set_text(text)
self.attr_list = pango.AttrList()
self.font_description = self._widget.style.font_desc.copy()
self.scale_factor = 1.0
示例6: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, text, style='normal'):
Widget.__init__(self)
# We just ignore style here, GTK users expect their own buttons.
self.set_widget(gtk.Button())
self.create_signal('clicked')
self.forward_signal('clicked')
self.label = Label(text)
self._widget.add(self.label._widget)
self.label._widget.show()
示例7: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, text=None, bold=False):
Widget.__init__(self)
BinBaselineCalculator.__init__(self)
if text is None:
text = ''
self.set_widget(gtk.CheckButton())
self.label = Label(text)
self._widget.add(self.label._widget)
self.label._widget.show()
self.create_signal('toggled')
self.forward_signal('toggled')
if bold:
self.label.set_bold(True)
示例8: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self, model):
Widget.__init__(self)
self.model = model
self.set_widget(MiroTreeView(model._model))
self.selection = self._widget.get_selection()
self.columns = []
self.attr_map_for_column = {}
self.gtk_column_to_wrapper = {}
self.background_color = None
self.drag_button_down = False
self._renderer_xpad = self._renderer_ypad = 0
self.context_menu_callback = self.drag_source = self.drag_dest = None
self.hotspot_tracker = None
self.hover_info = None
self.in_bulk_change = False
self.handled_last_button_press = False
self.delaying_press = False
self.ignore_selection_changed = False
self.set_columns_draggable(False)
self.create_signal('row-expanded')
self.create_signal('row-collapsed')
self.create_signal('selection-changed')
self.create_signal('hotspot-clicked')
self.create_signal('row-double-clicked')
self.create_signal('row-activated')
self.wrapped_widget_connect('row-activated', self.on_row_activated)
self.wrapped_widget_connect('row-expanded', self.on_row_expanded)
self.wrapped_widget_connect('row-collapsed', self.on_row_collapsed)
self.wrapped_widget_connect('button-press-event', self.on_button_press)
self.wrapped_widget_connect('button-release-event',
self.on_button_release)
self.wrapped_widget_connect('motion-notify-event',
self.on_motion_notify)
self.wrapped_widget_connect('drag-data-get', self.on_drag_data_get)
self.wrapped_widget_connect('drag-end', self.on_drag_end)
self.wrapped_widget_connect('drag-motion', self.on_drag_motion)
self.wrapped_widget_connect('drag-leave', self.on_drag_leave)
self.wrapped_widget_connect('drag-data-received',
self.on_drag_data_received)
self.wrapped_widget_connect('unrealize', self.on_unrealize)
weak_connect(self.selection, 'changed', self.on_selection_changed)
self._connect_hotspot_signals()
self.layout_manager = LayoutManager(self._widget)
self.selected = None
if hasattr(self, 'get_tooltip'):
self._widget.set_property('has-tooltip', True)
self.wrapped_widget_connect('query-tooltip', self.on_tooltip)
self._last_tooltip_place = None
示例9: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self):
Widget.__init__(self)
Drawable.__init__(self)
self._gtk_cursor = None
self._entry_handlers = None
示例10: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self):
Widget.__init__(self)
self.set_widget(gtk.HSeparator())
示例11: __init__
# 需要导入模块: from miro.frontends.widgets.gtk.base import Widget [as 别名]
# 或者: from miro.frontends.widgets.gtk.base.Widget import __init__ [as 别名]
def __init__(self):
Widget.__init__(self)
Drawable.__init__(self)
self.set_widget(MiroDrawingArea())