Back to index

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

List of all members.

Public Member Functions

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

Public Attributes

 labeltext
 object
 setfunction

Static Public Attributes

 expandable = None

Detailed Description

Definition at line 73 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.TreeWidget.TreeItem.

Reimplemented in idlelib.StackViewer.VariablesTreeItem, idlelib.ObjectBrowser.SequenceTreeItem, and idlelib.ObjectBrowser.ClassTreeItem.

Definition at line 44 of file ObjectBrowser.py.

00044 
00045     def GetSubList(self):
00046         keys = dir(self.object)
00047         sublist = []
00048         for key in keys:
00049             try:
00050                 value = getattr(self.object, key)
00051             except AttributeError:
00052                 continue
00053             item = make_objecttreeitem(
00054                 str(key) + " =",
00055                 value,
00056                 lambda value, key=key, object=self.object:
00057                     setattr(object, key, value))
00058             sublist.append(item)
00059         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 74 of file ObjectBrowser.py.

00074 
00075     def IsExpandable(self):
00076         return 0

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: