.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.agw.hypertreelist

.. highlight:: python



.. _wx.lib.agw.hypertreelist.TreeListMainWindow:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.hypertreelist.TreeListMainWindow**
==========================================================================================================================================

This class represents the main window (and thus the main column) in :class:`HyperTreeList`.

:note: This is a subclass of :class:`~wx.lib.agw.customtreectrl.CustomTreeCtrl`.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>TreeListMainWindow</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.agw.hypertreelist.TreeListMainWindow_inheritance.png" alt="Inheritance diagram of TreeListMainWindow" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.hypertreelist.TreeListMainWindow.html" title="wx.lib.agw.hypertreelist.TreeListMainWindow" alt="" coords="5,547,320,576"/> <area shape="rect" id="node2" href="wx.lib.agw.customtreectrl.CustomTreeCtrl.html" title="wx.lib.agw.customtreectrl.CustomTreeCtrl" alt="" coords="15,469,310,499"/> <area shape="rect" id="node3" href="wx.ScrolledWindow.html" title="wx.ScrolledWindow" alt="" coords="88,392,237,421"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="114,237,211,267"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="98,160,227,189"/> <area shape="rect" id="node7" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="104,83,221,112"/> <area shape="rect" id="node8" href="wx.Object.html" title="wx.Object" alt="" coords="59,5,146,35"/> <area shape="rect" id="node9" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="171,5,277,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.agw.customtreectrl.CustomTreeCtrl`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.__init__`                    Default class constructor.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.AddRoot`                     Adds a root item to the :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.AdjustMyScrollbars`          Internal method used to adjust the :class:`ScrolledWindow` scrollbars.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.CalculateLevel`              Calculates the level of an item inside the tree hierarchy.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.CalculatePositions`          Recalculates all the items positions.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.CalculateSize`               Calculates overall position and size of an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.ChildrenClosing`             We are about to destroy the item's children.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.Delete`                      Deletes an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.DeleteAllItems`              Delete all items in the :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.DeleteItemWindow`            Deletes the window in the column associated to an item (if any).
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.DeleteRoot`                  Removes the tree root item (and subsequently all the items in
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.DoInsertItem`                Actually inserts an item in the tree.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.EditLabel`                   Starts editing an item label.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.EnableItem`                  Enables/disables an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetBestColumnWidth`          Returns the best column's width based on the items width in this column.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetColumnCount`              Returns the total number of columns.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetCurrentItem`              Returns the current item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetFirstExpandedItem`        Returns the first item which is in the expanded state.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetFirstVisibleItem`         Returns the first visible item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemBackgroundColour`     Returns the column background colour of the item
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemImage`                Returns the item image.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemText`                 Returns the item text label.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemWidth`                Returns the item width.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemWindow`               Returns the window associated with an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetItemWindowEnabled`        Returns whether the window associated with an item is enabled or not.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetMainColumn`               Returns the :class:`HyperTreeList` main column (i.e. the position of the underlying
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetNextExpanded`             Returns the next expanded item after the input one.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetPrevChild`                Returns the previous child of an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetPrevExpanded`             Returns the previous expanded item before the input one.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.GetPrevVisible`              Returns the previous visible item before the input one.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.HideItem`                    Hides/shows an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.HideWindows`                 Scans all item windows in the tree and hides those whose items
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.HitTest`                     Calculates which (if any) item is under the given point, returning the tree item
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.IsItemEnabled`               Returns whether an item is enabled or disabled.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.IsItemVisible`               Returns whether the item is visible or not.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.IsVirtual`                   Returns ``True`` if :class:`TreeListMainWindow` has the ``TR_VIRTUAL`` flag set.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnAcceptEdit`                Called by :class:`EditTextCtrl`, to accept the changes and to send the
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnCancelEdit`                Called by :class:`EditCtrl`, to cancel the changes and to send the
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnEditTimer`                 The timer for editing has expired. Start editing.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnEraseBackground`           Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnMouse`                     Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnPaint`                     Handles the ``wx.EVT_PAINT`` event for :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.OnScroll`                    Handles the ``wx.EVT_SCROLLWIN`` event for :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.PaintItem`                   Actually draws an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.PaintLevel`                  Paint a level in the hierarchy of :class:`TreeListMainWindow`.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.ScrollTo`                    Scrolls the specified item into view.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetBuffered`                 Sets/unsets the double buffering for the main window.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetDragItem`                 Sets the specified item as member of a current drag and drop operation.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetItemBackgroundColour`     Sets the column background colour of the item
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetItemImage`                Sets the item image for a particular item state.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetItemText`                 Sets the item text label.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetItemWindow`               Sets the window associated to an item.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetItemWindowEnabled`        Sets whether the window associated with an item is enabled or not.
:meth:`~wx.lib.agw.hypertreelist.TreeListMainWindow.SetMainColumn`               Sets the :class:`HyperTreeList` main column (i.e. the position of the underlying
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: TreeListMainWindow(CustomTreeCtrl)

   This class represents the main window (and thus the main column) in :class:`HyperTreeList`.
   
   :note: This is a subclass of :class:`~wx.lib.agw.customtreectrl.CustomTreeCtrl`.

   .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=wx.TR_DEFAULT_STYLE, validator=wx.DefaultValidator, name="wxtreelistmainwindow")

      Default class constructor.
      
      :param `parent`: parent window. Must not be ``None``;
      :param `id`: window identifier. A value of -1 indicates a default value;
      :param `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `style`: the underlying :class:`ScrolledWindow` style;
      :param `agwStyle`: the AGW-specific :class:`TreeListMainWindow` window style. This can be a
       combination of the following bits:
      
       ============================== =========== ==================================================
       Window Styles                  Hex Value   Description
       ============================== =========== ==================================================
       ``TR_NO_BUTTONS``                      0x0 For convenience to document that no buttons are to be drawn.
       ``TR_SINGLE``                          0x0 For convenience to document that only one item may be selected at a time. Selecting another item causes the current selection, if any, to be deselected. This is the default.
       ``TR_HAS_BUTTONS``                     0x1 Use this style to show + and - buttons to the left of parent items.
       ``TR_NO_LINES``                        0x4 Use this style to hide vertical level connectors.
       ``TR_LINES_AT_ROOT``                   0x8 Use this style to show lines between root nodes. Only applicable if ``TR_HIDE_ROOT`` is set and ``TR_NO_LINES`` is not set.
       ``TR_DEFAULT_STYLE``                   0x9 The set of flags that are closest to the defaults for the native control for a particular toolkit.
       ``TR_TWIST_BUTTONS``                  0x10 Use old Mac-twist style buttons.
       ``TR_MULTIPLE``                       0x20 Use this style to allow a range of items to be selected. If a second range is selected, the current range, if any, is deselected.
       ``TR_EXTENDED``                       0x40 Use this style to allow disjoint items to be selected. (Only partially implemented; may not work in all cases).
       ``TR_HAS_VARIABLE_ROW_HEIGHT``        0x80 Use this style to cause row heights to be just big enough to fit the content. If not set, all rows use the largest row height. The default is that this flag is unset.
       ``TR_EDIT_LABELS``                   0x200 Use this style if you wish the user to be able to edit labels in the tree control.
       ``TR_ROW_LINES``                     0x400 Use this style to draw a contrasting border between displayed rows.
       ``TR_HIDE_ROOT``                     0x800 Use this style to suppress the display of the root node, effectively causing the first-level nodes to appear as a series of root nodes.
       ``TR_FULL_ROW_HIGHLIGHT``           0x2000 Use this style to have the background colour and the selection highlight extend  over the entire horizontal row of the tree control window.
       ``TR_AUTO_CHECK_CHILD``             0x4000 Only meaningful for checkbox-type items: when a parent item is checked/unchecked its children are checked/unchecked as well.
       ``TR_AUTO_TOGGLE_CHILD``            0x8000 Only meaningful for checkbox-type items: when a parent item is checked/unchecked its children are toggled accordingly.
       ``TR_AUTO_CHECK_PARENT``           0x10000 Only meaningful for checkbox-type items: when a child item is checked/unchecked its parent item is checked/unchecked as well.
       ``TR_ALIGN_WINDOWS``               0x20000 Flag used to align windows (in items with windows) at the same horizontal position.
       ``TR_NO_HEADER``                   0x40000 Use this style to hide the columns header.
       ``TR_ELLIPSIZE_LONG_ITEMS``        0x80000 Flag used to ellipsize long items when the horizontal space for :class:`~wx.lib.agw.customtreectrl.CustomTreeCtrl` is low.
       ``TR_VIRTUAL``                    0x100000 :class:`HyperTreeList` will have virtual behaviour.
       ============================== =========== ==================================================
      
      :param `validator`: window validator;
      :param `name`: window name.


   .. method:: AddRoot(self, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None)

      Adds a root item to the :class:`TreeListMainWindow`.
      
      :param `text`: the item text label;
      :param `ct_type`: the item type (see :meth:`CustomTreeCtrl.SetItemType() <lib.agw.customtreectrl.CustomTreeCtrl.SetItemType>`
       for a list of valid item types);
      :param `wnd`: if not ``None``, a non-toplevel window to show next to the item;
      :param `image`: an index within the normal image list specifying the image to
       use for the item in unselected state;
      :param `selImage`: an index within the normal image list specifying the image to
       use for the item in selected state; if `image` > -1 and `selImage` is -1, the
       same image is used for both selected and unselected items;
      :param `data`: associate the given Python object `data` with the item.
      
      .. warning::
      
         Only one root is allowed to exist in any given instance of :class:`TreeListMainWindow`.


   .. method:: AdjustMyScrollbars(self)

      Internal method used to adjust the :class:`ScrolledWindow` scrollbars. 


   .. method:: CalculateLevel(self, item, dc, level, y, x_colstart)

      Calculates the level of an item inside the tree hierarchy.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `dc`: an instance of :class:`wx.DC`;
      :param `level`: the item level in the tree hierarchy;
      :param `y`: the current vertical position inside the :class:`ScrolledWindow`;
      :param `x_colstart`: the x coordinate at which the item's column starts.


   .. method:: CalculatePositions(self)

      Recalculates all the items positions. 


   .. method:: CalculateSize(self, item, dc)

      Calculates overall position and size of an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `dc`: an instance of :class:`wx.DC`.


   .. method:: ChildrenClosing(self, item)

      We are about to destroy the item's children.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: Delete(self, item)

      Deletes an item.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: DeleteAllItems(self)

      Delete all items in the :class:`TreeListMainWindow`. 


   .. method:: DeleteItemWindow(self, item, column=None)

      Deletes the window in the column associated to an item (if any).
      
      :param `item`: an instance of :class:`GenericTreeItem`.
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: DeleteRoot(self)

      Removes the tree root item (and subsequently all the items in
      :class:`TreeListMainWindow`.


   .. method:: DoInsertItem(self, parent, previous, text, ct_type=0, wnd=None, image=-1, selImage=-1, data=None, \*ignored_args)

      Actually inserts an item in the tree.
      
      :param `parentId`: an instance of :class:`TreeListItem` representing the
       item's parent;
      :param `previous`: the index at which we should insert the item;
      :param `text`: the item text label;
      :param `ct_type`: the item type (see :meth:`CustomTreeCtrl.SetItemType() <lib.agw.customtreectrl.CustomTreeCtrl.SetItemType>` for a list of valid
       item types);
      :param `wnd`: if not ``None``, a non-toplevel window to show next to the item;
      :param `image`: an index within the normal image list specifying the image to
       use for the item in unselected state;
      :param `selImage`: an index within the normal image list specifying the image to
       use for the item in selected state; if `image` > -1 and `selImage` is -1, the
       same image is used for both selected and unselected items;
      :param `data`: associate the given Python object `data` with the item.
      :param `ignored_args`: unused at the moment, this parameter is present to comply with
       :meth:`CustomTreeCtrl.DoInsertItem() <lib.agw.customtreectrl.CustomTreeCtrl.DoInsertItem>` changed API.


   .. method:: EditLabel(self, item, column=None)

      Starts editing an item label.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: EnableItem(self, item, enable=True, torefresh=True)

      Enables/disables an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `enable`: ``True`` to enable the item, ``False`` otherwise;
      :param `torefresh`: whether to redraw the item or not.


   .. method:: GetBestColumnWidth(self, column, parent=None)

      Returns the best column's width based on the items width in this column.
      
      :param `column`: an integer specifying the column index;
      :param `parent`: an instance of :class:`TreeListItem`.


   .. method:: GetColumnCount(self)

      Returns the total number of columns. 


   .. method:: GetCurrentItem(self)

      Returns the current item. 


   .. method:: GetFirstExpandedItem(self)

      Returns the first item which is in the expanded state. 


   .. method:: GetFirstVisibleItem(self)

      Returns the first visible item. 


   .. method:: GetItemBackgroundColour(self, item, column=0)

      Returns the column background colour of the item
      
      :param `item`: an instance of :class:`TreeListItem`
      :param integer `column`


   .. method:: GetItemImage(self, item, column=None, which=wx.TreeItemIcon_Normal)

      Returns the item image.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used;
      :param `which`: can be one of the following bits:
      
       ================================= ========================
       Item State                        Description
       ================================= ========================
       ``TreeItemIcon_Normal``           To get the normal item image
       ``TreeItemIcon_Selected``         To get the selected item image (i.e. the image which is shown when the item is currently selected)
       ``TreeItemIcon_Expanded``         To get the expanded image (this only makes sense for items which have children - then this image is shown when the item is expanded and the normal image is shown when it is collapsed)
       ``TreeItemIcon_SelectedExpanded`` To get the selected expanded image (which is shown when an expanded item is currently selected)
       ================================= ========================


   .. method:: GetItemText(self, item, column=None)

      Returns the item text label.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: GetItemWidth(self, item, column)

      Returns the item width.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: an integer specifying the column index.


   .. method:: GetItemWindow(self, item, column=None)

      Returns the window associated with an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: GetItemWindowEnabled(self, item, column=None)

      Returns whether the window associated with an item is enabled or not.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: GetMainColumn(self)

      Returns the :class:`HyperTreeList` main column (i.e. the position of the underlying
      :class:`~wx.lib.agw.customtreectrl.CustomTreeCtrl`.


   .. method:: GetNextExpanded(self, item)

      Returns the next expanded item after the input one.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: GetPrevChild(self, item, cookie)

      Returns the previous child of an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `cookie`: a parameter which is opaque for the application but is necessary
       for the library to make these functions reentrant (i.e. allow more than one
       enumeration on one and the same object simultaneously).
      
      :note: This method returns ``None`` if there are no further siblings.


   .. method:: GetPrevExpanded(self, item)

      Returns the previous expanded item before the input one.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: GetPrevVisible(self, item)

      Returns the previous visible item before the input one.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: HideItem(self, item, hide=True)

      Hides/shows an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `hide`: ``True`` to hide the item, ``False`` to show it.


   .. method:: HideWindows(self)

      Scans all item windows in the tree and hides those whose items
      they belong to are not currently visible. Used internally. 


   .. method:: HitTest(self, point, flags=0)

      Calculates which (if any) item is under the given point, returning the tree item
      at this point plus extra information flags plus the item's column.
      
      :param `point`: an instance of :class:`wx.Point`, a point to test for hits;
      :param `flags`: a bitlist of the following values:
      
       ================================== =============== =================================
       HitTest Flags                      Hex Value       Description
       ================================== =============== =================================
       ``TREE_HITTEST_ABOVE``                         0x1 Above the client area
       ``TREE_HITTEST_BELOW``                         0x2 Below the client area
       ``TREE_HITTEST_NOWHERE``                       0x4 No item has been hit
       ``TREE_HITTEST_ONITEMBUTTON``                  0x8 On the button associated to an item
       ``TREE_HITTEST_ONITEMICON``                   0x10 On the icon associated to an item
       ``TREE_HITTEST_ONITEMINDENT``                 0x20 On the indent associated to an item
       ``TREE_HITTEST_ONITEMLABEL``                  0x40 On the label (string) associated to an item
       ``TREE_HITTEST_ONITEM``                       0x50 Anywhere on the item
       ``TREE_HITTEST_ONITEMRIGHT``                  0x80 On the right of the label associated to an item
       ``TREE_HITTEST_TOLEFT``                      0x200 On the left of the client area
       ``TREE_HITTEST_TORIGHT``                     0x400 On the right of the client area
       ``TREE_HITTEST_ONITEMUPPERPART``             0x800 On the upper part (first half) of the item
       ``TREE_HITTEST_ONITEMLOWERPART``            0x1000 On the lower part (second half) of the item
       ``TREE_HITTEST_ONITEMCHECKICON``            0x2000 On the check/radio icon, if present
       ================================== =============== =================================
      
      :return: the item (if any, ``None`` otherwise), the `flags` and the column are always
       returned as a tuple.


   .. method:: IsItemEnabled(self, item)

      Returns whether an item is enabled or disabled.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: IsItemVisible(self, item)

      Returns whether the item is visible or not.
      
      :param `item`: an instance of :class:`TreeListItem`;


   .. method:: IsVirtual(self)

      Returns ``True`` if :class:`TreeListMainWindow` has the ``TR_VIRTUAL`` flag set. 


   .. method:: OnAcceptEdit(self, value)

      Called by :class:`EditTextCtrl`, to accept the changes and to send the
      ``EVT_TREE_END_LABEL_EDIT`` event.
      
      :param `value`: the new value of the item label.


   .. method:: OnCancelEdit(self)

      Called by :class:`EditCtrl`, to cancel the changes and to send the
      ``EVT_TREE_END_LABEL_EDIT`` event.


   .. method:: OnEditTimer(self)

      The timer for editing has expired. Start editing. 


   .. method:: OnEraseBackground(self, event)

      Handles the ``wx.EVT_ERASE_BACKGROUND`` event for :class:`TreeListMainWindow`.
      
      :param `event`: a :class:`EraseEvent` event to be processed.


   .. method:: OnMouse(self, event)

      Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`TreeListMainWindow`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnPaint(self, event)

      Handles the ``wx.EVT_PAINT`` event for :class:`TreeListMainWindow`.
      
      :param `event`: a :class:`PaintEvent` event to be processed.


   .. method:: OnScroll(self, event)

      Handles the ``wx.EVT_SCROLLWIN`` event for :class:`TreeListMainWindow`.
      
      :param `event`: a :class:`ScrollEvent` event to be processed.


   .. method:: PaintItem(self, item, dc)

      Actually draws an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `dc`: an instance of :class:`wx.DC`.


   .. method:: PaintLevel(self, item, dc, level, y, x_maincol)

      Paint a level in the hierarchy of :class:`TreeListMainWindow`.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `dc`: an instance of :class:`wx.DC`;
      :param `level`: the item level in the tree hierarchy;
      :param `y`: the current vertical position in the :class:`ScrolledWindow`;
      :param `x_maincol`: the horizontal position of the main column.


   .. method:: ScrollTo(self, item)

      Scrolls the specified item into view.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: SetBuffered(self, buffered)

      Sets/unsets the double buffering for the main window.
      
      :param `buffered`: ``True`` to use double-buffering, ``False`` otherwise.
      
      :note: Currently we are using double-buffering only on Windows XP.


   .. method:: SetDragItem(self, item)

      Sets the specified item as member of a current drag and drop operation.
      
      :param `item`: an instance of :class:`TreeListItem`.


   .. method:: SetItemBackgroundColour(self, item, colour, column=0)

      Sets the column background colour of the item
      
      :param `item`: an instance of :class:`TreeListItem`
      :param `colour`: a valid :class:`wx.Colour` instance.
      :param integer `column`


   .. method:: SetItemImage(self, item, image, column=None, which=wx.TreeItemIcon_Normal)

      Sets the item image for a particular item state.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `image`: an index within the normal image list specifying the image to use;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used;
      :param `which`: the item state.
      
      :see: :meth:`~TreeListMainWindow.GetItemImage` for a list of valid item states.


   .. method:: SetItemText(self, item, text, column=None)

      Sets the item text label.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `text`: a string specifying the new item label;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: SetItemWindow(self, item, window, column=None)

      Sets the window associated to an item.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `wnd`: a non-toplevel window to be displayed next to the item;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.
      
      :note: The window parent should not be the :class:`HyperTreeList` itself, but actually
       an instance of :class:`TreeListMainWindow`. The current solution here is to reparent
       the window to this class.


   .. method:: SetItemWindowEnabled(self, item, enable=True, column=None)

      Sets whether the window associated with an item is enabled or not.
      
      :param `item`: an instance of :class:`TreeListItem`;
      :param `enable`: ``True`` to enable the associated window, ``False`` to disable it;
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


   .. method:: SetMainColumn(self, column)

      Sets the :class:`HyperTreeList` main column (i.e. the position of the underlying
      :class:`~wx.lib.agw.customtreectrl.CustomTreeCtrl`.
      
      :param `column`: if not ``None``, an integer specifying the column index.
       If it is ``None``, the main column index is used.


