This file contains the SVN revision history for hypertreelist, at revision 68881.
Available information include commit date, the name of the committer, the file size, the SVN log messages and a diff from the previous version (if available).
The following log message was entered by the committer:
AGW: General overhaul of the documentation, much improved. All the widgets have their own sample usage in the docs as well;
FlatNotebook: Added the FNB_NAV_BUTTONS_WHEN_NEEDED style, which hides the navigation left/right arrows if all tabs fit;
RibbonBar: - Added the EVT_RIBBONBAR_TAB_LEFT_DCLICK event, which generates a special event
when a ribbon bar tab is double-clicked;
XLSGrid: a new widget was added to AGW, termed XLSGrid. It’s based on wx.grid.Grid and can be used to faithfully reproduce the appearance of a Microsoft Excel spreadsheets.
Version SVN diff:
--- wxPython/3rdParty/AGW/agw/hypertreelist.py 2011/07/26 20:21:45 68436
+++ wxPython/3rdParty/AGW/agw/hypertreelist.py 2011/08/25 16:40:17 68881
@@ -3,7 +3,7 @@
# Inspired By And Heavily Based On wx.gizmos.TreeListCtrl.
#
# Andrea Gavana, @ 08 May 2006
-# Latest Revision: 26 Jul 2011, 22.00 GMT
+# Latest Revision: 17 Aug 2011, 15.00 GMT
#
#
# TODO List
@@ -41,25 +41,25 @@
"""
-HyperTreeList is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
+L{HyperTreeList} is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
some more functionalities.
Description
===========
-HyperTreeList is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
+L{HyperTreeList} is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
almost the same base functionalities plus some more enhancements. This class does
not rely on the native control, as it is a full owner-drawn tree-list control.
-HyperTreeList is somewhat an hybrid between L{CustomTreeCtrl} and `wx.gizmos.TreeListCtrl`.
+L{HyperTreeList} is somewhat an hybrid between L{CustomTreeCtrl} and `wx.gizmos.TreeListCtrl`.
In addition to the standard `wx.gizmos.TreeListCtrl` behaviour this class supports:
* CheckBox-type items: checkboxes are easy to handle, just selected or unselected
state with no particular issues in handling the item's children;
* Added support for 3-state value checkbox items;
-* RadioButton-type items: since I elected to put radiobuttons in CustomTreeCtrl, I
+* RadioButton-type items: since I elected to put radiobuttons in L{CustomTreeCtrl}, I
needed some way to handle them, that made sense. So, I used the following approach:
- All peer-nodes that are radiobuttons will be mutually exclusive. In other words,
@@ -79,10 +79,10 @@
* Default selection style, gradient (horizontal/vertical) selection style and Windows
Vista selection style;
* Customized drag and drop images built on the fly;
-* Setting the HyperTreeList item buttons to a personalized imagelist;
-* Setting the HyperTreeList check/radio item icons to a personalized imagelist;
+* Setting the L{HyperTreeList} item buttons to a personalized imagelist;
+* Setting the L{HyperTreeList} check/radio item icons to a personalized imagelist;
* Changing the style of the lines that connect the items (in terms of `wx.Pen` styles);
-* Using an image as a HyperTreeList background (currently only in "tile" mode);
+* Using an image as a L{HyperTreeList} background (currently only in "tile" mode);
And a lot more. Check the demo for an almost complete review of the functionalities.
@@ -90,7 +90,7 @@
Base Functionalities
====================
-HyperTreeList supports all the `wx.gizmos.TreeListCtrl` styles, except:
+L{HyperTreeList} supports all the `wx.gizmos.TreeListCtrl` styles, except:
- ``TR_EXTENDED``: supports for this style is on the todo list (Am I sure of this?).
@@ -102,16 +102,54 @@
And a style useful to hide the TreeListCtrl header:
-- ``TR_NO_HEADER``: hides the HyperTreeList header.
+- ``TR_NO_HEADER``: hides the L{HyperTreeList} header.
-All the methods available in `wx.gizmos.TreeListCtrl` are also available in HyperTreeList.
+All the methods available in `wx.gizmos.TreeListCtrl` are also available in L{HyperTreeList}.
+
+
+Usage
+=====
+
+Usage example::
+
+ import wx
+ import wx.lib.agw.hypertreelist as HTL
+
+ class MyFrame(wx.Frame):
+
+ def __init__(self, parent):
+
+ wx.Frame.__init__(self, parent, -1, "HyperTreeList Demo")
+
+ tree_list = HTL.HyperTreeList(self)
+
+ tree_list.AddColumn("First column")
+
+ root = tree_list.AddRoot("Root", ct_type=1)
+
+ parent = tree_list.AppendItem(root, "First child", ct_type=1)
+ child = tree_list.AppendItem(parent, "First Grandchild", ct_type=1)
+
+ tree_list.AppendItem(root, "Second child", ct_type=1)
+
+
+ # our normal wxApp-derived class, as usual
+
+ app = wx.PySimpleApp()
+
+ frame = MyFrame(None)
+ app.SetTopWindow(frame)
+ frame.Show()
+
+ app.MainLoop()
+
Events
======
-All the events supported by `wx.gizmos.TreeListCtrl` are also available in HyperTreeList,
+All the events supported by `wx.gizmos.TreeListCtrl` are also available in L{HyperTreeList},
with a few exceptions:
- ``EVT_TREE_GET_INFO`` (don't know what this means);
@@ -119,7 +157,7 @@
- ``EVT_TREE_ITEM_MIDDLE_CLICK`` (not implemented, but easy to add);
- ``EVT_TREE_STATE_IMAGE_CLICK`` (no need for that, look at the checking events below).
-Plus, HyperTreeList supports the events related to the checkbutton-type items:
+Plus, L{HyperTreeList} supports the events related to the checkbutton-type items:
- ``EVT_TREE_ITEM_CHECKING``: an item is being checked;
- ``EVT_TREE_ITEM_CHECKED``: an item has been checked.
@@ -133,7 +171,7 @@
Supported Platforms
===================
-HyperTreeList has been tested on the following platforms:
+L{HyperTreeList} has been tested on the following platforms:
* Windows (Windows XP);
@@ -165,7 +203,7 @@
``TR_AUTO_CHECK_PARENT`` 0x10000 Only meaningful foe 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_VIRTUAL`` 0x80000 `HyperTreeList` will have virtual behaviour.
+``TR_VIRTUAL`` 0x80000 L{HyperTreeList} will have virtual behaviour.
============================== =========== ==================================================
@@ -183,38 +221,38 @@
``EVT_LIST_COL_END_DRAG`` A column has been resized by the user.
``EVT_LIST_COL_RIGHT_CLICK`` A column has been right-clicked.
``EVT_TREE_BEGIN_DRAG`` Begin dragging with the left mouse button.
-``EVT_TREE_BEGIN_LABEL_EDIT`` Begin editing a label. This can be prevented by calling `Veto()`.
+``EVT_TREE_BEGIN_LABEL_EDIT`` Begin editing a label. This can be prevented by calling L{TreeEvent.Veto}.
``EVT_TREE_BEGIN_RDRAG`` Begin dragging with the right mouse button.
``EVT_TREE_DELETE_ITEM`` Delete an item.
``EVT_TREE_END_DRAG`` End dragging with the left or right mouse button.
-``EVT_TREE_END_LABEL_EDIT`` End editing a label. This can be prevented by calling `Veto()`.
-``EVT_TREE_GET_INFO`` Request information from the application (not implemented in `CustomTreeCtrl`).
+``EVT_TREE_END_LABEL_EDIT`` End editing a label. This can be prevented by calling L{TreeEvent.Veto}.
+``EVT_TREE_GET_INFO`` Request information from the application (not implemented in L{HyperTreeList}).
``EVT_TREE_ITEM_ACTIVATED`` The item has been activated, i.e. chosen by double clicking it with mouse or from keyboard.
``EVT_TREE_ITEM_CHECKED`` A checkbox or radiobox type item has been checked.
``EVT_TREE_ITEM_CHECKING`` A checkbox or radiobox type item is being checked.
``EVT_TREE_ITEM_COLLAPSED`` The item has been collapsed.
-``EVT_TREE_ITEM_COLLAPSING`` The item is being collapsed. This can be prevented by calling `Veto()`.
-``EVT_TREE_ITEM_EXPANDED`` The item has been expanded.
-``EVT_TREE_ITEM_EXPANDING`` The item is being expanded. This can be prevented by calling `Veto()`.
-``EVT_TREE_ITEM_GETTOOLTIP`` The opportunity to set the item tooltip is being given to the application (call `TreeEvent.SetToolTip`).
+``EVT_TREE_ITEM_COLLAPSING`` The item is being collapsed. This can be prevented by calling L{TreeEvent.Veto}.
+``EVT_TREE_ITEM_EXPANDED`` The item has been expanded.s
+``EVT_TREE_ITEM_EXPANDING`` The item is being expanded. This can be prevented by calling L{TreeEvent.Veto}.
+``EVT_TREE_ITEM_GETTOOLTIP`` The opportunity to set the item tooltip is being given to the application (call L{TreeEvent.SetToolTip}).
``EVT_TREE_ITEM_HYPERLINK`` An hyperlink type item has been clicked.
``EVT_TREE_ITEM_MENU`` The context menu for the selected item has been requested, either by a right click or by using the menu key.
-``EVT_TREE_ITEM_MIDDLE_CLICK`` The user has clicked the item with the middle mouse button (not implemented in `CustomTreeCtrl`).
+``EVT_TREE_ITEM_MIDDLE_CLICK`` The user has clicked the item with the middle mouse button (not implemented in L{HyperTreeList}).
``EVT_TREE_ITEM_RIGHT_CLICK`` The user has clicked the item with the right mouse button.
``EVT_TREE_KEY_DOWN`` A key has been pressed.
``EVT_TREE_SEL_CHANGED`` Selection has changed.
-``EVT_TREE_SEL_CHANGING`` Selection is changing. This can be prevented by calling `Veto()`.
-``EVT_TREE_SET_INFO`` Information is being supplied to the application (not implemented in `CustomTreeCtrl`).
-``EVT_TREE_STATE_IMAGE_CLICK`` The state image has been clicked (not implemented in `CustomTreeCtrl`).
+``EVT_TREE_SEL_CHANGING`` Selection is changing. This can be prevented by calling L{TreeEvent.Veto}.
+``EVT_TREE_SET_INFO`` Information is being supplied to the application (not implemented in L{HyperTreeList}).
+``EVT_TREE_STATE_IMAGE_CLICK`` The state image has been clicked (not implemented in L{HyperTreeList}).
============================== ==================================================
License And Version
===================
-HyperTreeList is distributed under the wxPython license.
+L{HyperTreeList} is distributed under the wxPython license.
-Latest Revision: Andrea Gavana @ 26 Jul 2011, 22.00 GMT
+Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT
Version 1.2
@@ -306,7 +344,7 @@
TR_ALIGN_WINDOWS = 0x20000 # to align windows horizontally for items at the same level
""" Flag used to align windows (in items with windows) at the same horizontal position. """
TR_VIRTUAL = 0x80000
-""" `HyperTreeList` will have virtual behaviour. """
+""" L{HyperTreeList} will have virtual behaviour. """
# --------------------------------------------------------------------------
# Additional HyperTreeList style to hide the header
@@ -4019,7 +4057,7 @@
class HyperTreeList(wx.PyControl):
"""
- HyperTreeList is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
+ L{HyperTreeList} is a class that mimics the behaviour of `wx.gizmos.TreeListCtrl`, with
almost the same base functionalities plus some more enhancements. This class does
not rely on the native control, as it is a full owner-drawn tree-list control.
"""
@@ -4282,7 +4320,7 @@
you may wish to call `wx.Window.ClearBackground` or `wx.Window.Refresh` after
calling this function.
- :note: Overridden from `wx.PyControl`.
+ :note: Overridden from `wx.PyControl`.
"""
if not self._main_win:
@@ -4644,6 +4682,8 @@
Gets the size which best suits the window: for a control, it would be the
minimal size which doesn't truncate the control, for a panel - the same size
as it would have after a call to `Fit()`.
+
+ :note: Overridden from `wx.PyControl`.
"""
# something is better than nothing...