Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
idlelib.ObjectBrowser.SequenceTreeItem Class Reference
Inheritance diagram for idlelib.ObjectBrowser.SequenceTreeItem:
Inheritance graph
[legend]
Collaboration diagram for idlelib.ObjectBrowser.SequenceTreeItem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def IsExpandable
def keys
def GetSubList
def GetLabelText
def GetText
def GetIconName
def IsEditable
def SetText
def GetSelectedIconName
def OnDoubleClick

Public Attributes

 labeltext
 object
 setfunction

Static Public Attributes

 expandable = None

Detailed Description

Definition at line 77 of file ObjectBrowser.py.


Member Function Documentation

Return name of icon to be displayed normally.

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 29 of file ObjectBrowser.py.

00029 
00030     def GetIconName(self):
00031         if not self.IsExpandable():
            return "python"

Here is the call graph for this function:

Return label text string to display in front of text (if any).

Reimplemented from idlelib.TreeWidget.TreeItem.

Reimplemented in idlelib.StackViewer.VariablesTreeItem.

Definition at line 25 of file ObjectBrowser.py.

00025 
00026     def GetLabelText(self):
        return self.labeltext
Return name of icon to be displayed when selected.

Definition at line 352 of file TreeWidget.py.

00352 
00353     def GetSelectedIconName(self):
00354         """Return name of icon to be displayed when selected."""

Return list of items forming sublist.

Reimplemented from idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 82 of file ObjectBrowser.py.

00082 
00083     def GetSubList(self):
00084         sublist = []
00085         for key in self.keys():
00086             try:
00087                 value = self.object[key]
00088             except KeyError:
00089                 continue
00090             def setfunction(value, key=key, object=self.object):
00091                 object[key] = value
00092             item = make_objecttreeitem("%r:" % (key,), value, setfunction)
00093             sublist.append(item)
00094         return sublist

Here is the call graph for this function:

Here is the caller graph for this function:

Return text string to display.

Reimplemented from idlelib.TreeWidget.TreeItem.

Reimplemented in idlelib.StackViewer.VariablesTreeItem.

Definition at line 27 of file ObjectBrowser.py.

00027 
00028     def GetText(self):
        return myrepr.repr(self.object)
Return whether the item's text may be edited.

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 32 of file ObjectBrowser.py.

00032 
00033     def IsEditable(self):
        return self.setfunction is not None
Return whether there are subitems.

Reimplemented from idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 78 of file ObjectBrowser.py.

00078 
00079     def IsExpandable(self):
        return len(self.object) > 0

Here is the caller graph for this function:

Reimplemented in idlelib.ObjectBrowser.DictTreeItem.

Definition at line 80 of file ObjectBrowser.py.

00080 
00081     def keys(self):
        return range(len(self.object))

Here is the caller graph for this function:

def idlelib.TreeWidget.TreeItem.OnDoubleClick (   self) [inherited]
Called on a double-click on the item.

Reimplemented in idlelib.ClassBrowser.MethodBrowserTreeItem, idlelib.ClassBrowser.ClassBrowserTreeItem, idlelib.StackViewer.FrameTreeItem, and idlelib.ClassBrowser.ModuleBrowserTreeItem.

Definition at line 358 of file TreeWidget.py.

00358 
00359     def OnDoubleClick(self):
00360         """Called on a double-click on the item."""
00361 
00362 
00363 # Example application

def idlelib.ObjectBrowser.ObjectTreeItem.SetText (   self,
  text 
) [inherited]
Change the item's text (if it is editable).

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 34 of file ObjectBrowser.py.

00034 
00035     def SetText(self, text):
00036         try:
00037             value = eval(text)
00038             self.setfunction(value)
00039         except:
00040             pass
00041         else:
            self.object = value

Member Data Documentation

idlelib.TreeWidget.TreeItem.expandable = None [static, inherited]
Do not override!  Called by TreeNode.

Definition at line 322 of file TreeWidget.py.

Definition at line 22 of file ObjectBrowser.py.

Definition at line 23 of file ObjectBrowser.py.

Definition at line 24 of file ObjectBrowser.py.


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