Module CustomTreeCtrl :: Class GenericTreeItem
[hide private]
[frames] | no frames]

Class GenericTreeItem
source code

This class holds all the information and methods for every single item in CustomTreeCtrl. No wx based.

Instance Methods [hide private]
  AssignAttributes(self, attr)
Assigns the item attributes (font, colours).
  Attr(self)
Creates a new attribute (font, colours).
  Check(self, checked=True)
Check an item.
  Collapse(self)
Collapse the item.
  DeleteChildren(self, tree)
Deletes the item children.
  Enable(self, enable=True)
Enables/disables the item.
  Expand(self)
Expand the item.
  GetAttributes(self)
Returns the item attributes (font, colours).
  GetCheckedImage(self, which=0)
Returns the item check image.
  GetChildren(self)
Returns the item's children.
  GetChildrenCount(self, recursively=True)
Gets the number of children.
  GetCurrentCheckedImage(self)
Returns the current item check image.
  GetCurrentImage(self)
Returns the current item image.
  GetData(self)
Returns the data associated to this item.
  GetHeight(self)
Returns the height of the item.
  GetImage(self, which=0)
Returns the item image for a particular state.
  GetParent(self)
Gets the item parent.
  GetSize(self, x, y, theButton)
Returns the item size.
  GetText(self)
Returns the item text.
  GetType(self)
Returns the item type.
  GetVisited(self)
Returns whether an hypertext item was visited or not.
  GetWidth(self)
Returns the width of the item.
  GetWindow(self)
Returns the window associated to the item.
  GetWindowEnabled(self)
Returns whether the associated window is enabled or not.
  GetWindowSize(self)
Returns the associated window size.
  GetX(self)
Returns the x position on an item in the ScrolledWindow.
  GetY(self)
Returns the y position on an item in the ScrolledWindow.
  HasChildren(self)
Returns whether the item has children or not.
  HasPlus(self)
Returns whether the item has the plus button or not.
  HitTest(self, point, theCtrl, flags=0, level=0)
HitTest method for an item.
  Insert(self, child, index)
Inserts an item in the item children.
  IsBold(self)
Returns whether the item font is bold or not.
  IsChecked(self)
Returns whether the item is checked or not.
  IsEnabled(self)
Returns whether the item is enabled or not.
  IsExpanded(self)
Returns whether the item is expanded or not.
  IsHyperText(self)
Returns whether the item is hypetext or not.
  IsItalic(self)
Returns whether the item font is italic or not.
  IsOk(self)
Returns whether the item is ok or not.
  IsSelected(self)
Returns whether the item is selected or not.
  OnSetFocus(self, event)
Handles the wx.EVT_SET_FOCUS event for the associated window.
  SetAttributes(self, attr)
Sets the item attributes (font, colours).
  SetBold(self, bold)
Sets the item font bold.
  SetData(self, data)
Sets the data associated to this item.
  SetHasPlus(self, has=True)
Sets whether an item has the 'plus' button.
  SetHeight(self, h)
Sets the height of the item.
  SetHilight(self, set=True)
Sets the item focus/unfocus.
  SetHyperText(self, hyper=True)
Sets whether the item is hypertext or not.
  SetImage(self, image, which)
Sets the item image.
  SetItalic(self, italic)
Sets the item font italic.
  SetText(self, text)
Sets the item text.
  SetVisited(self, visited=True)
Sets whether an hypertext item was visited or not.
  SetWidth(self, w)
Sets the width of the item.
  SetWindow(self, wnd)
Sets the window associated to the item.
  SetWindowEnabled(self, enable=True)
Sets whether the associated window is enabled or not.
  SetX(self, x)
Sets the x position on an item in the ScrolledWindow.
  SetY(self, y)
Sets the y position on an item in the ScrolledWindow.
  __init__(self, parent, text='', ct_type=0, wnd=None, image=-1, selImage=-1, data=None)
Default class constructor.

Method Details [hide private]

AssignAttributes(self, attr)

source code 
Assigns the item attributes (font, colours).

Attr(self)

source code 
Creates a new attribute (font, colours).

Check(self, checked=True)

source code 
Check an item. Meaningful only for check and radio items.

Collapse(self)

source code 
Collapse the item.

DeleteChildren(self, tree)

source code 
Deletes the item children.

Enable(self, enable=True)

source code 
Enables/disables the item.

Expand(self)

source code 
Expand the item.

GetAttributes(self)

source code 
Returns the item attributes (font, colours).

GetCheckedImage(self, which=0)

source code 
Returns the item check image. Meaningful only for radio & check items.

GetChildren(self)

source code 
Returns the item's children.

GetChildrenCount(self, recursively=True)

source code 
Gets the number of children.

GetCurrentCheckedImage(self)

source code 
Returns the current item check image.

GetCurrentImage(self)

source code 
Returns the current item image.

GetData(self)

source code 
Returns the data associated to this item.

GetHeight(self)

source code 
Returns the height of the item.

GetImage(self, which=0)

source code 
Returns the item image for a particular state.

GetParent(self)

source code 
Gets the item parent.

GetSize(self, x, y, theButton)

source code 
Returns the item size.

GetText(self)

source code 
Returns the item text.

GetType(self)

source code 
Returns the item type. It should be one of: 0: normal items 1: checkbox item 2: radiobutton item

GetVisited(self)

source code 
Returns whether an hypertext item was visited or not.

GetWidth(self)

source code 
Returns the width of the item.

GetWindow(self)

source code 
Returns the window associated to the item.

GetWindowEnabled(self)

source code 
Returns whether the associated window is enabled or not.

GetWindowSize(self)

source code 
Returns the associated window size.

GetX(self)

source code 
Returns the x position on an item in the ScrolledWindow.

GetY(self)

source code 
Returns the y position on an item in the ScrolledWindow.

HasChildren(self)

source code 
Returns whether the item has children or not.

HasPlus(self)

source code 
Returns whether the item has the plus button or not.

HitTest(self, point, theCtrl, flags=0, level=0)

source code 
HitTest method for an item. Called from the main window HitTest. see the CustomTreeCtrl HitTest method for the flags explanation.

Insert(self, child, index)

source code 
Inserts an item in the item children.

IsBold(self)

source code 
Returns whether the item font is bold or not.

IsChecked(self)

source code 
Returns whether the item is checked or not.

IsEnabled(self)

source code 
Returns whether the item is enabled or not.

IsExpanded(self)

source code 
Returns whether the item is expanded or not.

IsHyperText(self)

source code 
Returns whether the item is hypetext or not.

IsItalic(self)

source code 
Returns whether the item font is italic or not.

IsOk(self)

source code 
Returns whether the item is ok or not. Useless on Python, but added for backward compatibility with the C++ implementation.

IsSelected(self)

source code 
Returns whether the item is selected or not.

OnSetFocus(self, event)

source code 
Handles the wx.EVT_SET_FOCUS event for the associated window.

SetAttributes(self, attr)

source code 
Sets the item attributes (font, colours).

SetBold(self, bold)

source code 
Sets the item font bold.

SetData(self, data)

source code 
Sets the data associated to this item.

SetHasPlus(self, has=True)

source code 
Sets whether an item has the 'plus' button.

SetHeight(self, h)

source code 
Sets the height of the item.

SetHilight(self, set=True)

source code 
Sets the item focus/unfocus.

SetHyperText(self, hyper=True)

source code 
Sets whether the item is hypertext or not.

SetImage(self, image, which)

source code 
Sets the item image.

SetItalic(self, italic)

source code 
Sets the item font italic.

SetText(self, text)

source code 
Sets the item text.

SetVisited(self, visited=True)

source code 
Sets whether an hypertext item was visited or not.

SetWidth(self, w)

source code 
Sets the width of the item.

SetWindow(self, wnd)

source code 
Sets the window associated to the item.

SetWindowEnabled(self, enable=True)

source code 
Sets whether the associated window is enabled or not.

SetX(self, x)

source code 
Sets the x position on an item in the ScrolledWindow.

SetY(self, y)

source code 
Sets the y position on an item in the ScrolledWindow.

__init__(self, parent, text='', ct_type=0, wnd=None, image=-1, selImage=-1, data=None)
(Constructor)

source code 
Default class constructor. For internal use: do not call it in your code!"