Ejemplo n.º 1
0
 def destroy(self):
     GComponent.destroy(self)
     wo = self._win
     if wo:
         wo.AttachObject(None)
         wo.ShowWindow(wc.SW_HIDE)
         application()._win_recycle(wo)
Ejemplo n.º 2
0
 def __init__(self, _win, **kwds):
     if self._win_transparent:
         _win.ModifyStyleEx(0, wc.WS_EX_TRANSPARENT, 0)
     self._win = _win
     self._bounds = self._win_get_actual_bounds()
     _win.AttachObject(self)
     self._win_install_event_hooks()
     GComponent.__init__(self, **kwds)
Ejemplo n.º 3
0
 def __init__(self, _ns_view, _ns_inner_view = None, _ns_responder = None,
         _ns_set_autoresizing_mask = True, **kwds):
     self._ns_view = _ns_view
     if not _ns_inner_view:
         _ns_inner_view = _ns_view
     self._ns_inner_view = _ns_inner_view
     self._ns_responder = _ns_responder or _ns_inner_view
     Globals._ns_view_to_component[_ns_view] = self
     GComponent.__init__(self, **kwds)
Ejemplo n.º 4
0
 def _change_container(self, new_container):
     GComponent._change_container(self, new_container)
     if new_container:
         win_new_parent = new_container._win
     else:
         win_new_parent = win_none
     hwnd = self._win.GetSafeHwnd()
     gui.SetParent(hwnd, win_new_parent.GetSafeHwnd())
     if new_container:
         self._win_move_window(self._bounds)
Ejemplo n.º 5
0
 def destroy(self):
     #print "Component.destroy:", self ###
     GComponent.destroy(self)
     _ns_view = self._ns_view
     if _ns_view in Globals._ns_view_to_component:
         #print "Component.destroy: removing", _ns_view, "from mapping" ###
         del Globals._ns_view_to_component[_ns_view]
     #print "Component.destroy: breaking link to", self._ns_view ###
     self._ns_view = None
     #if self._ns_inner_view: print "Component.destroy: breaking inner link to", self._ns_inner_view ###
     self._ns_inner_view = None
     self._ns_responder = None
Ejemplo n.º 6
0
 def destroy(self):
     #print "Component.destroy:", self ###
     GComponent.destroy(self)
     _ns_view = self._ns_view
     if _ns_view in Globals._ns_view_to_component:
         #print "Component.destroy: removing", _ns_view, "from mapping" ###
         del Globals._ns_view_to_component[_ns_view]
     #print "Component.destroy: breaking link to", self._ns_view ###
     self._ns_view = None
     #if self._ns_inner_view: print "Component.destroy: breaking inner link to", self._ns_inner_view ###
     self._ns_inner_view = None
     self._ns_responder = None
Ejemplo n.º 7
0
 def __init__(self,
              _ns_view,
              _ns_inner_view=None,
              _ns_responder=None,
              _ns_set_autoresizing_mask=True,
              **kwds):
     self._ns_view = _ns_view
     if not _ns_inner_view:
         _ns_inner_view = _ns_view
     self._ns_inner_view = _ns_inner_view
     self._ns_responder = _ns_responder or _ns_inner_view
     Globals._ns_view_to_component[_ns_view] = self
     GComponent.__init__(self, **kwds)
Ejemplo n.º 8
0
 def __init__(self, _gtk_outer, _gtk_inner = None,
         _gtk_focus = None, _gtk_input = None, **kwds):
     self._position = (0, 0)
     self._size = _gtk_outer.size_request()
     _gtk_inner = _gtk_inner or _gtk_outer
     self._gtk_outer_widget = _gtk_outer
     self._gtk_inner_widget = _gtk_inner
     self._gtk_focus_widget = _gtk_focus
     _gtk_widget_to_component[_gtk_outer] = self
     self._gtk_connect_input_events(_gtk_input or _gtk_inner)
     if _gtk_focus:
         _gtk_focus.set_property('can-focus', True)
         self._gtk_connect(_gtk_focus, 'focus-in-event', self._gtk_focus_in)
     GComponent.__init__(self, **kwds)
Ejemplo n.º 9
0
	def __init__(self, _gtk_outer, _gtk_inner = None,
			_gtk_focus = None, _gtk_input = None, **kwds):
		self._position = (0, 0)
		req = _gtk_outer.size_request()
		self._size = (req.width, req.height)
		_gtk_inner = _gtk_inner or _gtk_outer
		self._gtk_outer_widget = _gtk_outer
		self._gtk_inner_widget = _gtk_inner
		self._gtk_focus_widget = _gtk_focus
		_gtk_widget_to_component[_gtk_outer] = self
		self._gtk_connect_input_events(_gtk_input or _gtk_inner)
		if _gtk_focus:
			_gtk_focus.set_property('can-focus', True)
			self._gtk_connect(_gtk_focus, 'focus-in-event', self._gtk_focus_in)
		GComponent.__init__(self, **kwds)
Ejemplo n.º 10
0
 def destroy(self):
     gtk_widget = self._gtk_outer_widget
     if gtk_widget in _gtk_widget_to_component:
         del _gtk_widget_to_component[gtk_widget]
     GComponent.destroy(self)
Ejemplo n.º 11
0
 def destroy(self):
     gtk_widget = self._gtk_outer_widget
     if gtk_widget in _gtk_widget_to_component:
         del _gtk_widget_to_component[gtk_widget]
     GComponent.destroy(self)