コード例 #1
0
def do_close(win):
    if win.busy:
        stdwin.message('Can\'t close busy window')
        return  # need to fail if quitting??
    win.editor = None  # Break circular reference
    #del win.editmenu	# What about the filemenu??
    mainloop.unregister(win)
    win.close()
コード例 #2
0
ファイル: python.py プロジェクト: asottile/ancient-pythons
def do_close(win):
	if win.busy:
		stdwin.message('Can\'t close busy window')
		return		# need to fail if quitting??
	win.editor = None # Break circular reference
	#del win.editmenu	# What about the filemenu??
	mainloop.unregister(win)
	win.close()
コード例 #3
0
ファイル: wwww.py プロジェクト: asottile/ancient-pythons
	def close(self):
		if self in allwindows:
			allwindows.remove(self)
		mainloop.unregister(self.window)
		self.window.dispatch = None
		self.window.close()
		if self.history:
			wwwutil.save_file(self.history + [self.cur_addr], \
					  history_file, HISTORY)
		wwwutil.save_file(bookmarks, bookmarks_file, BOOKMARKS)
		wwwutil.save_file(places, places_file, PLACES)
コード例 #4
0
def lpdispatch(event):
	type, win, detail = event
	if type == WE_CLOSE or type == WE_CHAR and detail in ('q', 'Q'):
		mainloop.unregister(win)
	elif type == WE_DRAW:
		drawproc(win)
	elif type == WE_TIMER:
		update(win)
		win.change((0,0), (10000, 10000))
	elif type == WE_MOUSE_UP:
		win.settimer(1)
コード例 #5
0
ファイル: wwww.py プロジェクト: olympu/ancient-pythons
 def close(self):
     if self in allwindows:
         allwindows.remove(self)
     mainloop.unregister(self.window)
     self.window.dispatch = None
     self.window.close()
     if self.history:
         wwwutil.save_file(self.history + [self.cur_addr], \
             history_file, HISTORY)
     wwwutil.save_file(bookmarks, bookmarks_file, BOOKMARKS)
     wwwutil.save_file(places, places_file, PLACES)
コード例 #6
0
ファイル: clock.py プロジェクト: olympu/ancient-pythons
def cdispatch(event):
	type, win, detail = event
	if type == WE_DRAW:
		drawproc(win, detail)
	elif type == WE_TIMER:
		settimer(win)
		drawproc(win, EVERYWHERE)
	elif type in MOUSE_EVENTS:
		mouseclick(win, type, detail)
	elif type == WE_ACTIVATE:
		if win.ring:
			# Turn the ringing off
			win.ring = 0
			win.begindrawing().invert(win.mainarea)
	elif type == WE_SIZE:
		win.change(EVERYWHERE)
		setdimensions(win)
	elif type == WE_CLOSE:
		mainloop.unregister(win)
		win.close()
コード例 #7
0
def cdispatch(event):
    type, win, detail = event
    if type == WE_DRAW:
        drawproc(win, detail)
    elif type == WE_TIMER:
        settimer(win)
        drawproc(win, EVERYWHERE)
    elif type in MOUSE_EVENTS:
        mouseclick(win, type, detail)
    elif type == WE_ACTIVATE:
        if win.ring:
            # Turn the ringing off
            win.ring = 0
            win.begindrawing().invert(win.mainarea)
    elif type == WE_SIZE:
        win.change(EVERYWHERE)
        setdimensions(win)
    elif type == WE_CLOSE:
        mainloop.unregister(win)
        win.close()
コード例 #8
0
ファイル: cdwin.py プロジェクト: asottile/ancient-pythons
def cddispatch(type, win, detail):
	if type == WE_NULL:
		pass
	elif type == WE_CLOSE:
		mainloop.unregister(win)
		win.close()
	elif type == WE_DRAW:
		draw(win)
	elif type == WE_TIMER:
		update(win)
	elif type == WE_MOUSE_UP:
		left, top, right, bottom, v1, v2 = getgeo(win)
		h, v = detail[0]
		if left < h < right:
			if top < v < v1:
				but1(win)
			elif v1 < v < v2:
				but2(win)
			elif v2 < v < bottom:
				but3(win)
			else:
				stdwin.fleep()
コード例 #9
0
ファイル: cdwin.py プロジェクト: 8Banana/py1.0
def cddispatch(type, win, detail):
    if type == WE_NULL:
        pass
    elif type == WE_CLOSE:
        mainloop.unregister(win)
        win.close()
    elif type == WE_DRAW:
        draw(win)
    elif type == WE_TIMER:
        update(win)
    elif type == WE_MOUSE_UP:
        left, top, right, bottom, v1, v2 = getgeo(win)
        h, v = detail[0]
        if left < h < right:
            if top < v < v1:
                but1(win)
            elif v1 < v < v2:
                but2(win)
            elif v2 < v < bottom:
                but3(win)
            else:
                stdwin.fleep()
コード例 #10
0
ファイル: gwin.py プロジェクト: arandilopez/z-eves
def close(w):				# Close method
	unregister(w)
	del w.close	# Delete our close function
	w.close()	# Call the close method
コード例 #11
0
	def destroy(self):
		mainloop.unregister(self.win)
		if self.child: self.child.destroy()
		self._reset()
コード例 #12
0
def close(w):  # Close method
    unregister(w)
    del w.close  # Delete our close function
    w.close()  # Call the close method
コード例 #13
0
	def close(self):
		mainloop.unregister(self.win)
		del self.win.dispatch
		self.win.close()