[Python-checkins] python/dist/src/Lib/lib-tk Tix.py,1.14,1.15
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
2002年12月30日 15:52:02 -0800
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1:/tmp/cvs-serv16864/Lib/lib-tk
Modified Files:
Tix.py
Log Message:
Tix update from Mike Clarkson (maintainer)
Index: Tix.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tix.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Tix.py 10 Dec 2002 02:18:49 -0000 1.14
--- Tix.py 30 Dec 2002 23:52:00 -0000 1.15
***************
*** 204,213 ****
self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib)
# Load Tix - this should work dynamically or statically
! # If it's static, lib/tix8.1/pkgIndex.tcl should have
# 'load {} Tix'
! # If it's dynamic under Unix, lib/tix8.1/pkgIndex.tcl should have
# 'load libtix8.1.8.3.so Tix'
self.tk.eval('package require Tix')
# The Tix 'tixForm' geometry manager
--- 204,217 ----
self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib)
# Load Tix - this should work dynamically or statically
! # If it's static, tcl/tix8.1/pkgIndex.tcl should have
# 'load {} Tix'
! # If it's dynamic under Unix, tcl/tix8.1/pkgIndex.tcl should have
# 'load libtix8.1.8.3.so Tix'
self.tk.eval('package require Tix')
+ def destroy(self):
+ # For safety, remove an delete_window binding before destroy
+ self.protocol("WM_DELETE_WINDOW", "")
+ Tkinter.Tk.destroy(self)
# The Tix 'tixForm' geometry manager
***************
*** 1670,1683 ****
class _dummyComboBox(ComboBox, TixSubWidget):
def __init__(self, master, name, destroy_physically=1):
! TixSubWidget.__init__(self, master, name, destroy_physically)
self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
! # I'm not sure about this destroy_physically=0 in all cases;
! # it may depend on if -dropdown is true; I've added as a trial
self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
! 'slistbox',
! destroy_physically=0)
! self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox',
! destroy_physically=0)
class _dummyDirList(DirList, TixSubWidget):
--- 1674,1691 ----
class _dummyComboBox(ComboBox, TixSubWidget):
def __init__(self, master, name, destroy_physically=1):
! TixSubWidget.__init__(self, master, name, ['fancy',destroy_physically])
! self.subwidget_list['label'] = _dummyLabel(self, 'label')
self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
!
self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
! 'slistbox')
! try:
! self.subwidget_list['tick'] = _dummyButton(self, 'tick')
! #cross Button : present if created with the fancy option
! self.subwidget_list['cross'] = _dummyButton(self, 'cross')
! except TypeError:
! # unavailable when -fancy not specified
! pass
class _dummyDirList(DirList, TixSubWidget):
***************
*** 1739,1745 ****
########################
! # Returns the qualified path name for the widget. Normally used to set
! # default options for subwidgets. See tixwidgets.py
def OptionName(widget):
return widget.tk.call('tixOptionName', widget._w)
--- 1747,1755 ----
########################
! #mike Should tixDestroy be exposed as a wrapper? - but not for widgets.
!
def OptionName(widget):
+ '''Returns the qualified path name for the widget. Normally used to set
+ default options for subwidgets. See tixwidgets.py'''
return widget.tk.call('tixOptionName', widget._w)
***************
*** 1767,1770 ****
--- 1777,1812 ----
pass
+ class Grid(TixWidget):
+ '''The Tix Grid command creates a new window and makes it into a
+ tixGrid widget. Additional options, may be specified on the command
+ line or in the option database to configure aspects such as its cursor
+ and relief.
+
+ A Grid widget displays its contents in a two dimensional grid of cells.
+ Each cell may contain one Tix display item, which may be in text,
+ graphics or other formats. See the DisplayStyle class for more information
+ about Tix display items. Individual cells, or groups of cells, can be
+ formatted with a wide range of attributes, such as its color, relief and
+ border.
+
+ Subwidgets - None'''
+ pass
+
+ # def anchor option ?args ...?
+ # def bdtype
+ # def delete dim from ?to?
+ # def edit apply
+ # def edit set x y
+ # def entrycget x y option
+ # def entryconfigure x y ?option? ?value option value ...?
+ # def format
+ # def index
+ # def move dim from to offset
+ # def set x y ?-itemtype type? ?option value...?
+ # def size dim index ?option value ...?
+ # def unset x y
+ # def xview
+ # def yview
+
class ScrolledGrid(TixWidget):
'''Scrolled Grid widgets'''