[Python-checkins] python/dist/src/Lib/lib-tk Tix.py,1.12,1.13

loewis@users.sourceforge.net loewis@users.sourceforge.net
2002年12月06日 02:33:47 -0800


Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1:/tmp/cvs-serv13675/Lib/lib-tk
Modified Files:
	Tix.py 
Log Message:
Patch #649184: Update to tix-8.1.4 RC3.
Index: Tix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tix.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Tix.py	14 Nov 2002 02:43:40 -0000	1.12
--- Tix.py	6 Dec 2002 10:33:44 -0000	1.13
***************
*** 35,40 ****
 
 import _tkinter # If this fails your Python may not be configured for Tk
- # TixVersion = float(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
- # WARNING - TixVersion is a limited precision floating point number
 
 # Some more constants (for consistency with Tkinter)
--- 35,38 ----
***************
*** 242,246 ****
 z = z + (self.tk.getint(x),)
 return z
! self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
 
 def info(self, option=None):
--- 240,244 ----
 z = z + (self.tk.getint(x),)
 return z
! return self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
 
 def info(self, option=None):
***************
*** 498,501 ****
--- 496,500 ----
 message Message"""
 
+ # FIXME: It should inherit -superclass tixShell
 def __init__(self, master=None, cnf={}, **kw):
 # static seem to be -installcolormap -initwait -statusbar -cursor
***************
*** 550,553 ****
--- 549,553 ----
 cross Button : present if created with the fancy option"""
 
+ # FIXME: It should inherit -superclass tixLabelWidget
 def __init__ (self, master=None, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixComboBox',
***************
*** 591,594 ****
--- 591,595 ----
 label Label"""
 
+ # FIXME: It should inherit -superclass tixLabelWidget
 def __init__ (self, master=None, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw)
***************
*** 621,624 ****
--- 622,626 ----
 vsb Scrollbar"""
 
+ # FIXME: It should inherit -superclass tixScrolledHList
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
***************
*** 642,645 ****
--- 644,648 ----
 vsb Scrollbar"""
 
+ # FIXME: It should inherit -superclass tixScrolledHList
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixDirTree', ['options'], cnf, kw)
***************
*** 713,716 ****
--- 716,720 ----
 dirbox DirSelectDialog"""
 
+ # FIXME: It should inherit -superclass tixDialogShell
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixDirSelectDialog',
***************
*** 735,738 ****
--- 739,743 ----
 fsbox ExFileSelectBox"""
 
+ # FIXME: It should inherit -superclass tixDialogShell
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixExFileSelectDialog',
***************
*** 782,785 ****
--- 787,791 ----
 fsbox FileSelectBox"""
 
+ # FIXME: It should inherit -superclass tixStdDialogShell
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixFileSelectDialog',
***************
*** 805,808 ****
--- 811,815 ----
 entry Entry"""
 
+ # FIXME: It should inherit -superclass tixLabelWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixFileEntry',
***************
*** 815,819 ****
 
 def file_dialog(self):
! # XXX return python object
 pass
 
--- 822,826 ----
 
 def file_dialog(self):
! # FIXME: return python object
 pass
 
***************
*** 1004,1008 ****
 
 class InputOnly(TixWidget):
! """InputOnly - Invisible widget.
 
 Subwidgets - None"""
--- 1011,1015 ----
 
 class InputOnly(TixWidget):
! """InputOnly - Invisible widget. Unix only.
 
 Subwidgets - None"""
***************
*** 1132,1136 ****
 
 class NoteBookFrame(TixWidget):
! """Will be added when Tix documentation is available !!!"""
 pass
 
--- 1139,1143 ----
 
 class NoteBookFrame(TixWidget):
! # FIXME: This is dangerous to expose to be called on its own.
 pass
 
***************
*** 1224,1227 ****
--- 1231,1235 ----
 menu Menu"""
 
+ # FIXME: It should inherit -superclass tixShell
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixPopupMenu', ['options'], cnf, kw)
***************
*** 1240,1244 ****
 class ResizeHandle(TixWidget):
 """Internal widget to draw resize handles on Scrolled widgets."""
! 
 def __init__(self, master, cnf={}, **kw):
 # There seems to be a Tix bug rejecting the configure method
--- 1248,1253 ----
 class ResizeHandle(TixWidget):
 """Internal widget to draw resize handles on Scrolled widgets."""
! # FIXME: This is dangerous to expose to be called on its own.
! # Perhaps rename ResizeHandle to _ResizeHandle
 def __init__(self, master, cnf={}, **kw):
 # There seems to be a Tix bug rejecting the configure method
***************
*** 1266,1269 ****
--- 1275,1279 ----
 """ScrolledHList - HList with automatic scrollbars."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixScrolledHList', ['options'],
***************
*** 1276,1279 ****
--- 1286,1290 ----
 """ScrolledListBox - Listbox with automatic scrollbars."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw)
***************
*** 1285,1288 ****
--- 1296,1300 ----
 """ScrolledText - Text with automatic scrollbars."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw)
***************
*** 1294,1297 ****
--- 1306,1310 ----
 """ScrolledTList - TList with automatic scrollbars."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixScrolledTList', ['options'],
***************
*** 1304,1307 ****
--- 1317,1321 ----
 """ScrolledWindow - Window with automatic scrollbars."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw)
***************
*** 1316,1319 ****
--- 1330,1334 ----
 Subwidgets are buttons added dynamically using the add method."""
 
+ # FIXME: It should inherit -superclass tixLabelWidget
 def __init__(self, master, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixSelect',
***************
*** 1348,1351 ****
--- 1363,1367 ----
 Subwidgets - None"""
 
+ # FIXME: It should inherit from Shell
 def __init__ (self,master=None,cnf={}, **kw):
 TixWidget.__init__(self, master,
***************
*** 1475,1478 ****
--- 1491,1495 ----
 the view of the tree by opening or closing parts of the tree."""
 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 def __init__(self, master=None, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixTree',
***************
*** 1483,1498 ****
--- 1500,1531 ----
 
 def autosetmode(self):
+ '''This command calls the setmode method for all the entries in this
+ Tree widget: if an entry has no child entries, its mode is set to
+ none. Otherwise, if the entry has any hidden child entries, its mode is
+ set to open; otherwise its mode is set to close.'''
 self.tk.call(self._w, 'autosetmode')
 
 def close(self, entrypath):
+ '''Close the entry given by entryPath if its mode is close.'''
 self.tk.call(self._w, 'close', entrypath)
 
 def getmode(self, entrypath):
+ '''Returns the current mode of the entry given by entryPath.'''
 return self.tk.call(self._w, 'getmode', entrypath)
 
 def open(self, entrypath):
+ '''Open the entry given by entryPath if its mode is open.'''
 self.tk.call(self._w, 'open', entrypath)
 
 def setmode(self, entrypath, mode='none'):
+ '''This command is used to indicate whether the entry given by
+ entryPath has children entries and whether the children are visible. mode
+ must be one of open, close or none. If mode is set to open, a (+)
+ indicator is drawn next the the entry. If mode is set to close, a (-)
+ indicator is drawn next the the entry. If mode is set to none, no
+ indicators will be drawn for this entry. The default mode is none. The
+ open mode indicates the entry has hidden children and this entry can be
+ opened by the user. The close mode indicates that all the children of the
+ entry are now visible and the entry can be closed by the user.'''
 self.tk.call(self._w, 'setmode', entrypath, mode)
 
***************
*** 1505,1509 ****
 capable of handling many more items than checkbuttons or radiobuttons.
 """
! 
 def __init__(self, master=None, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixCheckList',
--- 1538,1542 ----
 capable of handling many more items than checkbuttons or radiobuttons.
 """
! # FIXME: It should inherit -superclass tixTree
 def __init__(self, master=None, cnf={}, **kw):
 TixWidget.__init__(self, master, 'tixCheckList',
***************
*** 1514,1536 ****
 
 def autosetmode(self):
 self.tk.call(self._w, 'autosetmode')
 
 def close(self, entrypath):
 self.tk.call(self._w, 'close', entrypath)
 
 def getmode(self, entrypath):
 return self.tk.call(self._w, 'getmode', entrypath)
 
 def open(self, entrypath):
 self.tk.call(self._w, 'open', entrypath)
 
 def getselection(self, mode='on'):
! '''Mode can be on, off, default'''
! self.tk.call(self._w, 'getselection', mode)
 
 def getstatus(self, entrypath):
! self.tk.call(self._w, 'getstatus', entrypath)
 
 def setstatus(self, entrypath, mode='on'):
 self.tk.call(self._w, 'setstatus', entrypath, mode)
 
--- 1547,1582 ----
 
 def autosetmode(self):
+ '''This command calls the setmode method for all the entries in this
+ Tree widget: if an entry has no child entries, its mode is set to
+ none. Otherwise, if the entry has any hidden child entries, its mode is
+ set to open; otherwise its mode is set to close.'''
 self.tk.call(self._w, 'autosetmode')
 
 def close(self, entrypath):
+ '''Close the entry given by entryPath if its mode is close.'''
 self.tk.call(self._w, 'close', entrypath)
 
 def getmode(self, entrypath):
+ '''Returns the current mode of the entry given by entryPath.'''
 return self.tk.call(self._w, 'getmode', entrypath)
 
 def open(self, entrypath):
+ '''Open the entry given by entryPath if its mode is open.'''
 self.tk.call(self._w, 'open', entrypath)
 
 def getselection(self, mode='on'):
! '''Returns a list of items whose status matches status. If status is
! not specified, the list of items in the "on" status will be returned.
! Mode can be on, off, default'''
! c = self.tk.split(self.tk.call(self._w, 'getselection', mode))
! return self.tk.splitlist(c)
 
 def getstatus(self, entrypath):
! '''Returns the current status of entryPath.'''
! return self.tk.call(self._w, 'getstatus', entrypath)
 
 def setstatus(self, entrypath, mode='on'):
+ '''Sets the status of entryPath to be status. A bitmap will be
+ displayed next to the entry its status is on, off or default.'''
 self.tk.call(self._w, 'setstatus', entrypath, mode)
 
***************
*** 1691,1694 ****
--- 1737,1741 ----
 
 # Still to be done:
+ # tixIconView
 class CObjView(TixWidget):
 """This file implements the Canvas Object View widget. This is a base
***************
*** 1698,1700 ****
--- 1745,1754 ----
 to see all the objects.
 """
+ # FIXME: It should inherit -superclass tixScrolledWidget
+ pass
+ 
+ class ScrolledGrid(TixWidget):
+ '''Scrolled Grid widgets'''
+ 
+ # FIXME: It should inherit -superclass tixScrolledWidget
 pass

AltStyle によって変換されたページ (->オリジナル) /