本文整理汇总了Python中miro.frontends.widgets.gtk.base.Widget类的典型用法代码示例。如果您正苦于以下问题:Python Widget类的具体用法?Python Widget怎么用?Python Widget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Widget类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
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')
开发者ID:cool-RR,项目名称:Miro,代码行数:7,代码来源:customcontrols.py
示例2: set_widget
def set_widget(self, drawing_widget):
if self.is_opaque() and 0:
box = gtk.EventBox()
box.add(drawing_widget)
Widget.set_widget(self, box)
else:
Widget.set_widget(self, drawing_widget)
self.layout_manager = LayoutManager(self._widget)
开发者ID:CodeforEvolution,项目名称:miro,代码行数:8,代码来源:drawing.py
示例3: __init__
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
开发者ID:bbucommander,项目名称:miro,代码行数:8,代码来源:controls.py
示例4: __init__
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)
开发者ID:stephenjudge,项目名称:mirovideoconverter3,代码行数:8,代码来源:layout.py
示例5: __init__
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))
开发者ID:k-nut,项目名称:miro,代码行数:8,代码来源:simple.py
示例6: __init__
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
开发者ID:cool-RR,项目名称:Miro,代码行数:9,代码来源:simple.py
示例7: __init__
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()
开发者ID:nxmirrors,项目名称:miro,代码行数:9,代码来源:controls.py
示例8: __init__
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)
开发者ID:foxi,项目名称:miro,代码行数:13,代码来源:controls.py
示例9: __init__
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
开发者ID:cool-RR,项目名称:Miro,代码行数:48,代码来源:tableview.py
示例10: __init__
def __init__(self):
Widget.__init__(self)
self.set_widget(gtk.HSeparator())
开发者ID:kmshi,项目名称:miro,代码行数:3,代码来源:simple.py
示例11: __init__
def __init__(self):
Widget.__init__(self)
Drawable.__init__(self)
self._gtk_cursor = None
self._entry_handlers = None
开发者ID:bbucommander,项目名称:miro,代码行数:5,代码来源:customcontrols.py
示例12: __init__
def __init__(self):
Widget.__init__(self)
Drawable.__init__(self)
self.set_widget(MiroDrawingArea())
开发者ID:CodeforEvolution,项目名称:miro,代码行数:4,代码来源:drawing.py
注:本文中的miro.frontends.widgets.gtk.base.Widget类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论