Back to index

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

List of all members.

Public Member Functions

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

Public Attributes

 info
 flist

Static Public Attributes

 expandable = None

Detailed Description

Definition at line 56 of file StackViewer.py.


Constructor & Destructor Documentation

def idlelib.StackViewer.FrameTreeItem.__init__ (   self,
  info,
  flist 
)

Definition at line 58 of file StackViewer.py.

00058 
00059     def __init__(self, info, flist):
00060         self.info = info
00061         self.flist = flist

Here is the caller graph for this function:


Member Function Documentation

def idlelib.TreeWidget.TreeItem.GetIconName (   self) [inherited]
Return name of icon to be displayed normally.

Reimplemented in idlelib.TreeWidget.FileTreeItem, idlelib.ClassBrowser.MethodBrowserTreeItem, idlelib.ClassBrowser.ClassBrowserTreeItem, idlelib.ClassBrowser.ModuleBrowserTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 349 of file TreeWidget.py.

00349 
00350     def GetIconName(self):
00351         """Return name of icon to be displayed normally."""

def idlelib.TreeWidget.TreeItem.GetLabelText (   self) [inherited]
Return label text string to display in front of text (if any).

Reimplemented in idlelib.StackViewer.VariablesTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 319 of file TreeWidget.py.

00319 
00320     def GetLabelText(self):
00321         """Return label text string to display in front of text (if any)."""

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.

Definition at line 80 of file StackViewer.py.

00080 
00081     def GetSubList(self):
00082         frame, lineno = self.info
00083         sublist = []
00084         if frame.f_globals is not frame.f_locals:
00085             item = VariablesTreeItem("<locals>", frame.f_locals, self.flist)
00086             sublist.append(item)
00087         item = VariablesTreeItem("<globals>", frame.f_globals, self.flist)
00088         sublist.append(item)
00089         return sublist

Here is the caller graph for this function:

Return text string to display.

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 62 of file StackViewer.py.

00062 
00063     def GetText(self):
00064         frame, lineno = self.info
00065         try:
00066             modname = frame.f_globals["__name__"]
00067         except:
00068             modname = "?"
00069         code = frame.f_code
00070         filename = code.co_filename
00071         funcname = code.co_name
00072         sourceline = linecache.getline(filename, lineno)
00073         sourceline = sourceline.strip()
00074         if funcname in ("?", "", None):
00075             item = "%s, line %d: %s" % (modname, lineno, sourceline)
00076         else:
00077             item = "%s.%s(...), line %d: %s" % (modname, funcname,
00078                                              lineno, sourceline)
00079         return item

Here is the call graph for this function:

def idlelib.TreeWidget.TreeItem.IsEditable (   self) [inherited]
Return whether the item's text may be edited.

Reimplemented in idlelib.TreeWidget.FileTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 343 of file TreeWidget.py.

00343 
00344     def IsEditable(self):
00345         """Return whether the item's text may be edited."""

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

Reimplemented from idlelib.TreeWidget.TreeItem.

Definition at line 90 of file StackViewer.py.

00090 
00091     def OnDoubleClick(self):
00092         if self.flist:
00093             frame, lineno = self.info
00094             filename = frame.f_code.co_filename
00095             if os.path.isfile(filename):
00096                 self.flist.gotofileline(filename, lineno)

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

Reimplemented in idlelib.TreeWidget.FileTreeItem, and idlelib.ObjectBrowser.ObjectTreeItem.

Definition at line 346 of file TreeWidget.py.

00346 
00347     def SetText(self, text):
00348         """Change the item's text (if it is editable)."""


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 60 of file StackViewer.py.

Definition at line 59 of file StackViewer.py.


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