Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
idlelib.WindowList.WindowList Class Reference

List of all members.

Public Member Functions

def __init__
def add
def delete
def add_windows_to_menu
def register_callback
def unregister_callback
def call_callbacks

Public Attributes

 dict
 callbacks

Detailed Description

Definition at line 3 of file WindowList.py.


Constructor & Destructor Documentation

Definition at line 5 of file WindowList.py.

00005 
00006     def __init__(self):
00007         self.dict = {}
00008         self.callbacks = []

Here is the caller graph for this function:


Member Function Documentation

def idlelib.WindowList.WindowList.add (   self,
  window 
)

Definition at line 9 of file WindowList.py.

00009 
00010     def add(self, window):
00011         window.after_idle(self.call_callbacks)
00012         self.dict[str(window)] = window

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 21 of file WindowList.py.

00021 
00022     def add_windows_to_menu(self,  menu):
00023         list = []
00024         for key in self.dict:
00025             window = self.dict[key]
00026             try:
00027                 title = window.get_title()
00028             except TclError:
00029                 continue
00030             list.append((title, key, window))
00031         list.sort()
00032         for title, key, window in list:
00033             menu.add_command(label=title, command=window.wakeup)

Definition at line 43 of file WindowList.py.

00043 
00044     def call_callbacks(self):
00045         for callback in self.callbacks:
00046             try:
00047                 callback()
00048             except:
00049                 t, v, tb = sys.exc_info()
00050                 print("warning: callback failed in WindowList", t, ":", v)

Here is the caller graph for this function:

def idlelib.WindowList.WindowList.delete (   self,
  window 
)

Definition at line 13 of file WindowList.py.

00013 
00014     def delete(self, window):
00015         try:
00016             del self.dict[str(window)]
00017         except KeyError:
00018             # Sometimes, destroy() is called twice
00019             pass
00020         self.call_callbacks()

Here is the call graph for this function:

def idlelib.WindowList.WindowList.register_callback (   self,
  callback 
)

Definition at line 34 of file WindowList.py.

00034 
00035     def register_callback(self, callback):
00036         self.callbacks.append(callback)

def idlelib.WindowList.WindowList.unregister_callback (   self,
  callback 
)

Definition at line 37 of file WindowList.py.

00037 
00038     def unregister_callback(self, callback):
00039         try:
00040             self.callbacks.remove(callback)
00041         except ValueError:
00042             pass


Member Data Documentation

Definition at line 7 of file WindowList.py.

Definition at line 6 of file WindowList.py.


The documentation for this class was generated from the following file: