]> git.saurik.com Git - wxWidgets.git/commitdiff
Support for new native OS/2 tree control with drag-and-drop.
authorDavid Webster <Dave.Webster@bhmi.com>
Fri, 24 Jan 2003 22:31:41 +0000 (22:31 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Fri, 24 Jan 2003 22:31:41 +0000 (22:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 files changed:
include/wx/os2/dataform.h
include/wx/os2/dataobj.h
include/wx/os2/dnd.h
include/wx/os2/textctrl.h
include/wx/os2/treectrl.h [new file with mode: 0644]
src/os2/control.cpp
src/os2/dataobj.cpp
src/os2/dnd.cpp
src/os2/listctrl.cpp
src/os2/makefile.va
src/os2/treectrl.cpp [new file with mode: 0644]
src/os2/window.cpp
src/os2/wx25.def

index 1b5b229e1a5f963d6db8d3e561174f9e9e7a08be..18336bb54096845ea8b93945b0e89af56993f892 100644 (file)
 class wxDataFormat
 {
 public:
-    // the clipboard formats under GDK are GdkAtoms
-    typedef unsigned short NativeFormat;
+    wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
+    wxDataFormat(const wxChar* zFormat) { SetId(zFormat); }
 
-    wxDataFormat();
-    wxDataFormat(wxDataFormatId vType);
-    wxDataFormat(const wxString& rId);
-    wxDataFormat(const wxChar* pId);
-    wxDataFormat(NativeFormat vFormat);
+    wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
+    wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
 
-    wxDataFormat& operator=(NativeFormat vFormat)
-        { SetId(vFormat); return *this; }
+    //
+    // Comparison (must have both versions)
+    //
+    bool operator==(wxDataFormatId eFormat) const { return (m_uFormat == (unsigned int)eFormat); }
+    bool operator!=(wxDataFormatId eFormat) const { return (m_uFormat != (unsigned int)eFormat); }
+    bool operator==(const wxDataFormat& rFormat) const { return (m_uFormat == rFormat.m_uFormat); }
+    bool operator!=(const wxDataFormat& rFormat) const { return (m_uFormat != rFormat.m_uFormat); }
+         operator unsigned int(void) const { return m_uFormat; }
 
-    // comparison (must have both versions)
-    bool operator==(NativeFormat vFormat) const
-        { return m_vFormat == (NativeFormat)vFormat; }
-    bool operator!=(NativeFormat vFormat) const
-        { return m_vFormat != (NativeFormat)vFormat; }
+    unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
+    unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
 
-    // explicit and implicit conversions to NativeFormat which is one of
-    // standard data types (implicit conversion is useful for preserving the
-    // compatibility with old code)
-    NativeFormat GetFormatId() const { return m_vFormat; }
-    operator NativeFormat() const { return m_vFormat; }
+    bool IsStandard(void) const;
 
-    void SetId(NativeFormat vFormat);
+    void SetType(unsigned int uType){ m_uFormat = uType; }
 
-    // string ids are used for custom types - this SetId() must be used for
+    //
+    // String ids are used for custom types - this SetId() must be used for
     // application-specific formats
-    wxString GetId() const;
-    void SetId(const wxChar* pId);
-
-    // implementation
-    wxDataFormatId GetType() const;
+    //
+    wxString GetId(void) const;
+    void     SetId(const wxChar* pId);
 
 private:
-    wxDataFormatId                  m_vType;
-    NativeFormat                    m_vFormat;
-
-    void PrepareFormats();
-    void SetType(wxDataFormatId vType);
-};
+    unsigned int                    m_uFormat;
+}; // end of CLASS wxDataFormat
 
 #endif // _WX_GTK_DATAFORM_H
index 148b637c77442f3015d0c7ba979bc93438d286b7..865e45a7a8e37eb28bb9559c765a07206784083c 100644 (file)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // Name:        mac/dataobj.h
 // Purpose:     declaration of the wxDataObject
-// Author:      Stefan Csomor 
+// Author:      Stefan Csomor
 // Modified by:
 // Created:     10/21/99
 // RCS-ID:      $Id$
@@ -24,8 +24,20 @@ class wxDataObject : public wxDataObjectBase
 {
 public:
     wxDataObject();
+    virtual ~wxDataObject();
 
-    virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
+    virtual bool IsSupportedFormat( const wxDataFormat& eFormat
+                                   ,Direction           eDir = Get
+                                  ) const
+    {
+        return(IsSupported( eFormat
+                           ,eDir
+                          ));
+    }
+
+    PDRAGITEM GetInterface(void) const {return m_pDataObject;}
+private:
+    PDRAGITEM                       m_pDataObject;
 };
 
 #endif // _WX_MAC_DATAOBJ_H_
index 48976e760f9adbc4dceb844306edc835568edb20..57124c6144ab732b489b5cf23284da174ab6b6b0 100644 (file)
@@ -23,6 +23,8 @@
 #include <pmstddlg.h>
 #endif
 
+class CIDropTarget;
+
 //-------------------------------------------------------------------------
 // wxDropSource
 //-------------------------------------------------------------------------
@@ -41,41 +43,57 @@ public:
 
     /* start drag action */
     virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
+    virtual bool         GiveFeedback(wxDragResult eEffect);
 
 protected:
     void Init(void);
-    bool                            m_bLazyDrag;
 
-    DRAGIMAGE*                      m_pDragImage;
-    DRAGINFO*                       m_pDragInfo;
-    DRAGTRANSFER*                   m_pDragTransfer;
-};
+    ULONG                           m_ulItems;
+    PDRAGINFO                       m_pDragInfo;
+    DRAGIMAGE                       m_vDragImage;
+    PDRAGITEM                       m_pDragItem;
+    wxWindow*                       m_pWindow;
+}; // end of CLASS wxDropSource
 
 //-------------------------------------------------------------------------
 // wxDropTarget
 //-------------------------------------------------------------------------
 
-class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
+class WXDLLEXPORT wxDropTarget : public wxDropTargetBase
 {
 public:
-    wxDropTarget(wxDataObject *dataObject = (wxDataObject*)NULL);
+    wxDropTarget(wxDataObject* pDataObject = (wxDataObject*)NULL);
     virtual ~wxDropTarget();
 
-    void Register(WXHWND hwnd);
-    void Revoke(WXHWND hwnd);
-
-    virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
-    virtual bool OnDrop(wxCoord x, wxCoord y);
-    virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult vResult);
-    virtual bool GetData();
+    //
+    // These functions are called when data is moved over position (x, y) and
+    // may return either wxDragCopy, wxDragMove or wxDragNone depending on
+    // what would happen if the data were dropped here.
+    //
+    // The last parameter is what would happen by default and is determined by
+    // the platform-specific logic (for example, under Windows it's wxDragCopy
+    // if Ctrl key is pressed and wxDragMove otherwise) except that it will
+    // always be wxDragNone if the carried data is in an unsupported format.
+    //
+    // OnData must be implemented and other should be overridden by derived classes
+    //
+    virtual wxDragResult OnData( wxCoord      vX
+                                ,wxCoord      vY
+                                ,wxDragResult eResult
+                               );
+    virtual bool         OnDrop( wxCoord vX
+                                ,wxCoord vY
+                               );
+            bool         IsAcceptedData(PDRAGINFO pDataSource) const;
 
-  // implementation
 protected:
-    virtual bool IsAcceptable(DRAGINFO* pInfo);
+    virtual bool         GetData(void);
+            wxDataFormat GetSupportedFormat(PDRAGINFO pDataSource) const;
+            void         Release(void);
 
-    DRAGINFO*                       m_pDragInfo;
-    DRAGTRANSFER*                   m_pDragTransfer;
-};
+private:
+    CIDropTarget*                   m_pDropTarget;
+}; // end of CLASS wxDropTarget
 
 #endif //__OS2DNDH__
 
index b4408f36e9622f0189d655f4c23fe354c919445d..836bd5f4381321559ae17183953dc239aba1c665 100644 (file)
@@ -12,6 +12,8 @@
 #ifndef _WX_TEXTCTRL_H_
 #define _WX_TEXTCTRL_H_
 
+typedef int (wxCALLBACK *wxTreeCtrlCompare)(long lItem1, long lItem2, long lSortData);
+
 class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
 {
 public:
diff --git a/include/wx/os2/treectrl.h b/include/wx/os2/treectrl.h
new file mode 100644 (file)
index 0000000..b22498f
--- /dev/null
@@ -0,0 +1,701 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/os2/treectrl.h
+// Purpose:     wxTreeCtrl class
+// Author:      David Webster
+// Modified by:
+// Created:     01/23/03
+// RCS-ID:      $Id$
+// Copyright:   (c) David Webster
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_TREECTRL_H_
+#define _WX_TREECTRL_H_
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+    #pragma interface "treectrl.h"
+#endif
+
+#if wxUSE_TREECTRL
+
+#include "wx/textctrl.h"
+#include "wx/dynarray.h"
+#include "wx/treebase.h"
+
+// the type for "untyped" data
+typedef long wxDataType;
+
+// fwd decl
+class  WXDLLEXPORT wxImageList;
+class  WXDLLEXPORT wxDragImage;
+struct WXDLLEXPORT wxTreeViewItem;
+
+// a callback function used for sorting tree items, it should return -1 if the
+// first item precedes the second, +1 if the second precedes the first or 0 if
+// they're equivalent
+class wxTreeItemData;
+
+// flags for deprecated `Expand(int action)'
+enum
+{
+    wxTREE_EXPAND_EXPAND,
+    wxTREE_EXPAND_COLLAPSE,
+    wxTREE_EXPAND_COLLAPSE_RESET,
+    wxTREE_EXPAND_TOGGLE
+};
+
+// flags for deprecated InsertItem() variant
+#define wxTREE_INSERT_FIRST 0xFFFF0001
+#define wxTREE_INSERT_LAST  0xFFFF0002
+
+// ----------------------------------------------------------------------------
+// wxTreeCtrl
+// ----------------------------------------------------------------------------
+class WXDLLEXPORT wxTreeCtrl : public wxControl
+{
+public:
+    // creation
+    // --------
+    wxTreeCtrl() { Init(); }
+
+    wxTreeCtrl( wxWindow*          pParent
+               ,wxWindowID         vId = -1
+               ,const wxPoint&     rPos = wxDefaultPosition
+               ,const wxSize&      rSize = wxDefaultSize
+               ,long               lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT
+               ,const wxValidator& rValidator = wxDefaultValidator
+               ,const wxString&    rsName = wxTreeCtrlNameStr
+              )
+    {
+        Create( pParent
+               ,vId
+               ,rPos
+               ,rSize
+               ,lStyle
+               ,rValidator
+               ,rsName
+              );
+    }
+    virtual ~wxTreeCtrl();
+
+    bool Create( wxWindow*          pParent
+                ,wxWindowID         vId = -1
+                ,const wxPoint&     rPos = wxDefaultPosition
+                ,const wxSize&      rSize = wxDefaultSize
+                ,long               lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT
+                ,const wxValidator& rValidator = wxDefaultValidator
+                ,const wxString&    rsName = wxTreeCtrlNameStr
+               );
+
+    //
+    // Accessors
+    // ---------
+    //
+
+    //
+    // Get the total number of items in the control
+    //
+    size_t GetCount(void) const;
+
+    //
+    // Indent is the number of pixels the children are indented relative to
+    // the parents position. SetIndent() also redraws the control
+    // immediately.
+    //
+    unsigned int GetIndent(void) const;
+    void         SetIndent(unsigned int uIndent);
+
+    //
+    // Spacing is the number of pixels between the start and the Text
+    //
+    unsigned int GetSpacing(void) const { return 18; } // return wxGTK default
+    void SetSpacing(unsigned int uSpacing) { }
+
+    //
+    // Image list: these functions allow to associate an image list with
+    // the control and retrieve it. Note that the control does _not_ delete
+    // the associated image list when it's deleted in order to allow image
+    // lists to be shared between different controls.
+    //
+    // OS/2 doesn't really use imagelists as MSW does, but since the MSW
+    // control is the basis for this one, until I decide how to get rid of
+    // the need for them they are here for now.
+    //
+    wxImageList* GetImageList(void) const;
+    wxImageList* GetStateImageList(void) const;
+
+    void         AssignImageList(wxImageList* pImageList);
+    void         AssignStateImageList(wxImageList* pImageList);
+    void         SetImageList(wxImageList* pImageList);
+    void         SetStateImageList(wxImageList* pImageList);
+
+    //
+    // Functions to work with tree ctrl items. Unfortunately, they can _not_ be
+    // member functions of wxTreeItem because they must know the tree the item
+    // belongs to for Windows implementation and storing the pointer to
+    // wxTreeCtrl in each wxTreeItem is just too much waste.
+
+    //
+    // Item's label
+    //
+    wxString GetItemText(const wxTreeItemId& rItem) const;
+    void     SetItemText( const wxTreeItemId& rItem
+                         ,const wxString&     rsText
+                        );
+
+    //
+    // One of the images associated with the item (normal by default)
+    //
+    int  GetItemImage( const wxTreeItemId& rItem
+                      ,wxTreeItemIcon      vWhich = wxTreeItemIcon_Normal
+                     ) const;
+    void SetItemImage( const wxTreeItemId& rItem
+                      ,int                 nImage
+                      ,wxTreeItemIcon      vWhich = wxTreeItemIcon_Normal
+                     );
+
+    //
+    // Data associated with the item
+    //
+    wxTreeItemData* GetItemData(const wxTreeItemId& rItem) const;
+    void            SetItemData( const wxTreeItemId& rItem
+                                ,wxTreeItemData*     pData
+                               );
+
+    //
+    // Item's text colour
+    //
+    wxColour GetItemTextColour(const wxTreeItemId& rItem) const;
+    void     SetItemTextColour( const wxTreeItemId& rItem
+                               ,const wxColour&     rColor
+                              );
+
+    //
+    // Item's background colour
+    //
+    wxColour GetItemBackgroundColour(const wxTreeItemId& rItem) const;
+    void     SetItemBackgroundColour( const wxTreeItemId& rItem
+                                     ,const wxColour&     rColour
+                                    );
+
+    //
+    // Item's font
+    //
+    wxFont GetItemFont(const wxTreeItemId& rItem) const;
+    void   SetItemFont( const wxTreeItemId& rItem
+                       ,const wxFont&       rFont
+                      );
+
+    //
+    // Force appearance of [+] button near the item. This is useful to
+    // allow the user to expand the items which don't have any children now
+    // - but instead add them only when needed, thus minimizing memory
+    // usage and loading time.
+    //
+    void SetItemHasChildren( const wxTreeItemId& rItem
+                            ,bool                bHas = TRUE
+                           );
+
+    //
+    // The item will be shown in bold
+    //
+    void SetItemBold( const wxTreeItemId& rItem
+                     ,bool                bBold = TRUE
+                    );
+
+    //
+    // The item will be shown with a drop highlight
+    //
+    void SetItemDropHighlight( const wxTreeItemId& rItem
+                              ,bool                bHighlight = TRUE
+                             );
+
+    //
+    // Item status inquiries
+    // ---------------------
+    //
+
+    //
+    // Is the item visible (it might be outside the view or not expanded)?
+    //
+    bool IsVisible(const wxTreeItemId& rItem) const;
+
+    //
+    // Does the item has any children?
+    //
+    bool ItemHasChildren(const wxTreeItemId& rItem) const;
+
+    //
+    // Is the item expanded (only makes sense if HasChildren())?
+    //
+    bool IsExpanded(const wxTreeItemId& rItem) const;
+
+    //
+    // Is this item currently selected (the same as has focus)?
+    //
+    bool IsSelected(const wxTreeItemId& rItem) const;
+
+    //
+    // Is item text in bold font?
+    //
+    bool IsBold(const wxTreeItemId& rItem) const;
+
+    //
+    // Number of children
+    // ------------------
+    //
+
+    //
+    // If 'recursively' is FALSE, only immediate children count, otherwise
+    // the returned number is the number of all items in this branch
+    //
+    size_t GetChildrenCount( const wxTreeItemId& rItem
+                            ,bool                bRecursively = TRUE
+                           ) const;
+
+    //
+    // Navigation
+    // ----------
+    //
+
+    //
+    // Get the root tree item
+    //
+    wxTreeItemId GetRootItem(void) const;
+
+    //
+    // Get the item currently selected (may return NULL if no selection)
+    //
+    wxTreeItemId GetSelection(void) const;
+
+    //
+    // Get the items currently selected, return the number of such item
+    //
+    size_t GetSelections(wxArrayTreeItemIds& rSelections) const;
+
+    //
+    // Get the parent of this item (may return NULL if root)
+    //
+    wxTreeItemId GetItemParent(const wxTreeItemId& rItem) const;
+
+#if WXWIN_COMPATIBILITY_2_2
+    // deprecated:  Use GetItemParent instead.
+    wxTreeItemId GetParent(const wxTreeItemId& rItem) const
+       { return GetItemParent(rItem); }
+
+       // Expose the base class method hidden by the one above.
+    wxWindow* GetParent(void) const { return wxControl::GetParent(); }
+#endif  // WXWIN_COMPATIBILITY_2_2
+
+    //
+    // For this enumeration function you must pass in a "cookie" 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). Of course,
+    // the "cookie" passed to GetFirstChild() and GetNextChild() should be
+    // the same!
+    //
+
+    //
+    // Get the first child of this item
+    //
+    wxTreeItemId GetFirstChild( const wxTreeItemId& rItem
+                               ,long&               rCookie
+                              ) const;
+
+    //
+    // Get the next child
+    //
+    wxTreeItemId GetNextChild( const wxTreeItemId& rItem
+                              ,long&               rCookie
+                             ) const;
+
+    //
+    // Get the last child of this item - this method doesn't use cookies
+    //
+    wxTreeItemId GetLastChild(const wxTreeItemId& rItem) const;
+
+    //
+    // Get the next sibling of this item
+    //
+    wxTreeItemId GetNextSibling(const wxTreeItemId& rItem) const;
+
+    //
+    // Get the previous sibling
+    //
+    wxTreeItemId GetPrevSibling(const wxTreeItemId& rItem) const;
+
+    //
+    // Get first visible item
+    //
+    wxTreeItemId GetFirstVisibleItem(void) const;
+
+    //
+    // Get the next visible item: item must be visible itself!
+    // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
+    //
+    wxTreeItemId GetNextVisible(const wxTreeItemId& rItem) const;
+
+    //
+    // Get the previous visible item: item must be visible itself!
+    //
+    wxTreeItemId GetPrevVisible(const wxTreeItemId& rItem) const;
+
+    //
+    // Operations
+    // ----------
+    //
+
+    //
+    // Add the root node to the tree
+    //
+    wxTreeItemId AddRoot( const wxString& rsText
+                         ,int             nImage = -1
+                         ,int             nSelectedImage = -1
+                         ,wxTreeItemData* pData = NULL
+                        );
+
+    //
+    // Insert a new item in as the first child of the parent
+    //
+    wxTreeItemId PrependItem( const wxTreeItemId& rParent
+                             ,const wxString&     rsText
+                             ,int                 nImage = -1
+                             ,int                 nSelectedImage = -1
+                             ,wxTreeItemData*     pData = NULL
+                            );
+
+    //
+    // Insert a new item after a given one
+    //
+    wxTreeItemId InsertItem( const wxTreeItemId& rParent
+                            ,const wxTreeItemId& rIdPrevious
+                            ,const wxString&     rsText
+                            ,int                 nImage = -1
+                            ,int                 nSelectedImage = -1
+                            ,wxTreeItemData*     pData = NULL
+                           );
+
+    //
+    // Insert a new item before the one with the given index
+    //
+    wxTreeItemId InsertItem( const wxTreeItemId& pParent
+                            ,size_t              nIndex
+                            ,const wxString&     rsText
+                            ,int                 nImage = -1
+                            ,int                 nSelectedImage = -1
+                            ,wxTreeItemData*     pData = NULL
+                           );
+
+    //
+    // Insert a new item in as the last child of the parent
+    //
+    wxTreeItemId AppendItem( const wxTreeItemId& rParent
+                            ,const wxString&     rsText
+                            ,int                 nImage = -1
+                            ,int                 nSelectedImage = -1
+                            ,wxTreeItemData*     pData = NULL
+                           );
+
+    //
+    // Delete this item and associated data if any
+    //
+    void Delete(const wxTreeItemId& rItem);
+
+    //
+    // Delete all children (but don't delete the item itself)
+    //
+    void DeleteChildren(const wxTreeItemId& rItem);
+
+    //
+    // Delete all items from the tree
+    //
+    void DeleteAllItems(void);
+
+    //
+    // Expand this item
+    //
+    void Expand(const wxTreeItemId& rItem);
+
+    //
+    // Collapse the item without removing its children
+    //
+    void Collapse(const wxTreeItemId& rItem);
+
+    //
+    // Collapse the item and remove all children
+    //
+    void CollapseAndReset(const wxTreeItemId& rItem);
+
+    //
+    // Toggles the current state
+    //
+    void Toggle(const wxTreeItemId& rItem);
+
+    //
+    // Remove the selection from currently selected item (if any)
+    //
+    void Unselect(void);
+
+    //
+    // Unselect all items (only makes sense for multiple selection control)
+    //
+    void UnselectAll(void);
+
+    //
+    // Select this item
+    //
+    void SelectItem(const wxTreeItemId& rItem);
+
+    //
+    // Make sure this item is visible (expanding the parent item and/or
+    // scrolling to this item if necessary)
+    //
+    void EnsureVisible(const wxTreeItemId& rItem);
+
+    //
+    // Scroll to this item (but don't expand its parent)
+    //
+    void ScrollTo(const wxTreeItemId& rItem);
+
+    //
+    // OS/2 does not use a separate edit field for editting text. Here for
+    // interface compatibility, only.
+    //
+    wxTextCtrl* EditLabel( const wxTreeItemId& rItem
+                          ,wxClassInfo*        pTextCtrlClass = CLASSINFO(wxTextCtrl)
+                         );
+
+    //
+    // returns NULL for OS/2 in ALL cases
+    //
+    wxTextCtrl* GetEditControl(void) const {return (wxTextCtrl*)NULL;}
+
+    //
+    // End editing and accept or discard the changes to item label
+    //
+    void EndEditLabel( const wxTreeItemId& rItem
+                      ,bool                bDiscardChanges = FALSE
+                     );
+
+    //
+    // Sorting
+    // -------
+    //
+
+    //
+    // This function is called to compare 2 items and should return -1, 0
+    // or +1 if the first item is less than, equal to or greater than the
+    // second one. The base class version performs alphabetic comparaison
+    // of item labels (GetText)
+    //
+    virtual int OnCompareItems( const wxTreeItemId& rItem1
+                               ,const wxTreeItemId& rItem2
+                              );
+
+    //
+    // Sort the children of this item using OnCompareItems
+    //
+    void SortChildren(const wxTreeItemId& rItem);
+
+    //
+    // Helpers
+    // -------
+    //
+
+    //
+    // Determine to which item (if any) belongs the given point (the
+    // coordinates specified are relative to the client area of tree ctrl)
+    // and fill the flags parameter with a bitmask of wxTREE_HITTEST_xxx
+    // constants.
+
+    //
+    // The first function is more portable (because easier to implement
+    // on other platforms), but the second one returns some extra info.
+    //
+    wxTreeItemId HitTest(const wxPoint& rPoint)
+        { int nDummy = 0; return HitTest(rPoint, nDummy); }
+    wxTreeItemId HitTest( const wxPoint& rPoint
+                         ,int&           rFlags
+                        );
+
+    //
+    // Get the bounding rectangle of the item (or of its label only)
+    //
+    bool GetBoundingRect( const wxTreeItemId& rItem
+                         ,wxRect&             rRect
+                         ,bool                bTextOnly = FALSE
+                        ) const;
+
+    //
+    // Deprecated
+    // ----------
+    //
+    // These methods are deprecated and will be removed in future versions of
+    // wxWindows, they're here for compatibility only, don't use them in new
+    // code (the comments indicate why these methods are now useless and how to
+    // replace them)
+    //
+
+    //
+    // Use Expand, Collapse, CollapseAndReset or Toggle
+    //
+    void ExpandItem( const wxTreeItemId& rItem
+                    ,int                 nAction
+                   );
+
+    //
+    // Use AddRoot, PrependItem or AppendItem
+    //
+    wxTreeItemId InsertItem( const wxTreeItemId& pParent
+                            ,const wxString&     rsText
+                            ,int                 nImage = -1
+                            ,int                 nSelImage = -1
+                            ,long                lInsertAfter = wxTREE_INSERT_LAST
+                           );
+
+    //
+    // Use Set/GetImageList and Set/GetStateImageList
+    //
+    wxImageList* GetImageList(int nVal) const
+        { return GetImageList(); }
+    void SetImageList(wxImageList* pImageList, int nVal)
+        { SetImageList(pImageList); }
+
+    //
+    // Use Set/GetItemImage directly
+    //
+    int GetItemSelectedImage(const wxTreeItemId& rItem) const
+        { return GetItemImage(rItem, wxTreeItemIcon_Selected); }
+    void SetItemSelectedImage(const wxTreeItemId& rItem, int nImage)
+        { SetItemImage(rItem, nImage, wxTreeItemIcon_Selected); }
+
+    //
+    // Implementation
+    // --------------
+    //
+
+    virtual MRESULT OS2WindowProc( WXUINT   uMsg
+                                  ,WXWPARAM wParam
+                                  ,WXLPARAM lParam
+                                 );
+    virtual bool    OS2Command( WXUINT uParam
+                               ,WXWORD wId
+                              );
+//    virtual bool    OMSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+
+    //
+    // Override some base class virtuals
+    //
+    virtual bool SetBackgroundColour(const wxColour& rColour);
+    virtual bool SetForegroundColour(const wxColour& rColour);
+
+    //
+    // Get/set the check state for the item (only for wxTR_MULTIPLE)
+    //
+    bool IsItemChecked(const wxTreeItemId& rItem) const;
+    void SetItemCheck( const wxTreeItemId& rItem
+                      ,bool                bCheck = TRUE
+                     );
+
+protected:
+    //
+    // SetImageList helper
+    //
+    void SetAnyImageList( wxImageList* pImageList
+                         ,int          nWhich
+                        );
+
+    //
+    // Refresh a single item
+    //
+    void RefreshItem(const wxTreeItemId& rItem);
+
+    wxImageList*                    m_pImageListNormal; // images for tree elements
+    wxImageList*                    m_pImageListState;  // special images for app defined states
+    bool                            m_bOwnsImageListNormal;
+    bool                            m_bOwnsImageListState;
+
+private:
+
+    //
+    // The common part of all ctors
+    //
+    void Init(void);
+
+    //
+    // Helper functions
+    //
+    inline bool DoGetItem(wxTreeViewItem* pTvItem) const;
+    inline void DoSetItem(wxTreeViewItem* pTvItem);
+
+    inline void DoExpand( const wxTreeItemId& rItem
+                         ,int                 nFlag
+                        );
+    wxTreeItemId DoInsertItem( const wxTreeItemId& pParent
+                              ,wxTreeItemId        hInsertAfter
+                              ,const wxString&     rsText
+                              ,int                 nImage
+                              ,int                 nSelectedImage
+                              ,wxTreeItemData*     pData
+                             );
+    int  DoGetItemImageFromData( const wxTreeItemId& rItem
+                                ,wxTreeItemIcon      vWhich
+                               ) const;
+    void DoSetItemImageFromData( const wxTreeItemId& rItem
+                                ,int                 nImage
+                                ,wxTreeItemIcon      vWhich
+                               ) const;
+    void DoSetItemImages( const wxTreeItemId& rItem
+                         ,int                 nImage
+                         ,int                 nImageSel
+                        );
+    void DeleteTextCtrl() { };
+
+    //
+    // support for additional item images which we implement using
+    // wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp
+    //
+    void SetIndirectItemData( const wxTreeItemId&           rItem
+                             ,class wxTreeItemIndirectData* pData
+                            );
+    bool HasIndirectData(const wxTreeItemId& rItem) const;
+    bool IsDataIndirect(wxTreeItemData* pData) const
+        { return pData && pData->GetId().m_pItem == 0; }
+
+    //
+    // The hash storing the items attributes (indexed by items ids)
+    //
+    wxHashTable                     m_vAttrs;
+
+    //
+    // TRUE if the hash above is not empty
+    //
+    bool                            m_bHasAnyAttr;
+
+    //
+    // Used for dragging
+    //
+    wxDragImage*                    m_pDragImage;
+
+    // Virtual root item, if wxTR_HIDE_ROOT is set.
+//    void* m_pVirtualRoot;
+
+    // the starting item for selection with Shift
+//    WXHTREEITEM m_htSelStart;
+//
+    friend class wxTreeItemIndirectData;
+    friend class wxTreeSortHelper;
+
+    DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
+    DECLARE_NO_COPY_CLASS(wxTreeCtrl)
+}; // end of CLASS wxTreeCtrl
+
+#endif // wxUSE_TREECTRL
+
+#endif
+    // _WX_TREECTRL_H_
index ed246a1d4e0b989bffc80d668c229bb73c892555..218236ec34efc16143182ea1cc57d73f5b4d9b67 100644 (file)
@@ -133,6 +133,8 @@ bool wxControl::OS2CreateControl(
         zClass = WC_BUTTON;
     else if ((strcmp(zClassname, "NOTEBOOK")) == 0)
         zClass = WC_NOTEBOOK;
+    else if ((strcmp(zClassname, "CONTAINER")) == 0)
+        zClass = WC_CONTAINER;
     dwStyle |= WS_VISIBLE;
 
     m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle
index b6738a028d52d91da7128ac36f3f3dfded8f07ac..5ec5bb269d4ac0db1f4f2e12da699b18d1d85c61 100644 (file)
 // wxDataFormat
 // ----------------------------------------------------------------------------
 
-wxDataFormat::wxDataFormat()
-{
-    m_vType = wxDF_INVALID;
-    m_vFormat = 0;
-}
-
-wxDataFormat::wxDataFormat(
-  wxDataFormatId                    vType
-)
+wxString wxDataFormat::GetId() const
 {
-    PrepareFormats();
-    SetType(vType);
-}
+    char                            zBuf[256];
+    wxString                        sRet;
+
+    ::WinQueryAtomName( ::WinQuerySystemAtomTable()
+                       ,m_uFormat
+                       ,zBuf
+                       ,256
+                      );
+    sRet = zBuf;
+    return sRet;
+} // end of wxDataFormat::GetId()
 
-wxDataFormat::wxDataFormat(
+void wxDataFormat::SetId (
   const wxChar*                     zId
 )
 {
-    PrepareFormats();
-    SetId(zId);
-}
+    m_uFormat = ::WinAddAtom( ::WinQuerySystemAtomTable()
+                             ,zId
+                            );
+} // end of wxDataFormat::SetId
 
-wxDataFormat::wxDataFormat(
-  const wxString&                   rId
-)
+class CIDataObject
 {
-    PrepareFormats();
-    SetId(rId);
-}
-
-wxDataFormat::wxDataFormat(
-  NativeFormat                      vFormat
+public:
+    CIDataObject(wxDataObject* pDataObject);
+    ~CIDataObject();
+
+    //
+    // Operations on the DRAGITEM struct
+    //
+    bool GetData( const wxDataFormat& rFormat
+                 ,char*               pzBuffer
+                 ,ULONG               ulLen
+                );
+    void GetDataHere( const wxDataFormat& rFormat
+                     ,char*               pzBuffer
+                     ,ULONG               ulLen
+                    );
+    void QueryGetData(const wxDataFormat& rFormat);
+    void SetData( const wxDataFormat& rFormat
+                 ,char*               pzBuffer
+                );
+private:
+    wxDataObject*                   m_pDataObject;      // pointer to C++ class we belong to
+    DRAGITEM                        m_vDragItem;
+}; // end of CLASS CIDataObject
+
+bool CIDataObject::GetData (
+  const wxDataFormat&               rFormat
+, char*                             pzBuffer
+, ULONG                             ulLen
 )
 {
-    PrepareFormats();
-    SetId(vFormat);
-}
+    QueryGetData(rFormat);
+    if (rFormat.GetType() == wxDF_INVALID)
+        return FALSE;
 
-void wxDataFormat::SetType(
-  wxDataFormatId                    vType
-)
-{
-    m_vType = vType;
-
-    if (m_vType == wxDF_TEXT)
-        m_vFormat = 0;
-    else
-    if (m_vType == wxDF_BITMAP)
-        m_vFormat = 0;
-    else
-    if (m_vType == wxDF_FILENAME)
-        m_vFormat = 0;
-    else
+    ULONG                           ulSize = m_pDataObject->GetDataSize(rFormat);
+
+    if (ulSize == 0)
     {
-       wxFAIL_MSG( wxT("invalid dataformat") );
+        //
+        // It probably means that the method is just not implemented
+        //
+        return FALSE;
+    }
+    if (rFormat.GetType() == wxDF_PRIVATE)
+    {
+        //
+        // For custom formats, put the size with the data - alloc the
+        // space for it
+        //
+        ulSize += sizeof(ULONG);
     }
-}
 
-wxDataFormatId wxDataFormat::GetType() const
-{
-    return m_vType;
-}
+    if (ulSize > ulLen) // not enough room to copy
+        return FALSE;
 
-wxString wxDataFormat::GetId() const
-{
-    wxString                        sRet("");  // TODO: gdk_atom_name( m_format ) );
-    return sRet;
-}
+    //
+    // Copy the data
+    //
+    GetDataHere( rFormat
+                ,pzBuffer
+                ,ulSize
+               );
+    return TRUE;
+} // end of CIDataObject::GetData
 
-void wxDataFormat::SetId(
-  NativeFormat                      vFormat
+void CIDataObject::GetDataHere(
+  const wxDataFormat&               rFormat
+, char*                             pzBuffer
+, ULONG                             WXUNUSED(ulLen)
 )
 {
-    m_vFormat = vFormat;
-// TODO:
-/*
-    if (m_format == g_textAtom)
-        m_type = wxDF_TEXT;
-    else
-    if (m_format == g_pngAtom)
-        m_type = wxDF_BITMAP;
-    else
-    if (m_format == g_fileAtom)
-        m_type = wxDF_FILENAME;
-    else
-        m_type = wxDF_PRIVATE;
-*/
-}
+    m_pDataObject->GetDataHere( rFormat
+                               ,(void*)pzBuffer
+                              );
+} // end of CIDataObject::GetDataHere
 
-void wxDataFormat::SetId(
-  const wxChar*                     zId
+void CIDataObject::QueryGetData (
+  const wxDataFormat&               rFormat
 )
 {
-    wxString                        tmp(zId);
-
-    m_vType = wxDF_PRIVATE;
-    m_vFormat = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
-}
+    m_pDataObject->IsSupportedFormat(rFormat);
+} // end of CIDataObject::QueryGetData
 
-void wxDataFormat::PrepareFormats()
+void CIDataObject::SetData (
+  const wxDataFormat&               rFormat
+, char*                             pzBuffer
+)
 {
-// TODO:
-/*
-    if (!g_textAtom)
-        g_textAtom = gdk_atom_intern( "STRING", FALSE );
-    if (!g_pngAtom)
-        g_pngAtom = gdk_atom_intern( "image/png", FALSE );
-    if (!g_fileAtom)
-        g_fileAtom = gdk_atom_intern( "file:ALL", FALSE );
-*/
-}
+    ULONG                           ulSize;
+
+    switch (rFormat.GetType())
+    {
+        case wxDF_TEXT:
+        case wxDF_OEMTEXT:
+        case wxDF_FILENAME:
+        case wxDF_HTML:
+            ulSize = strlen((const char *)pzBuffer);
+            break;
+
+        case wxDF_UNICODETEXT:
+             ulSize = ::wcslen((const wchar_t *)pzBuffer);
+             break;
+
+        case wxDF_BITMAP:
+        case wxDF_METAFILE:
+        case wxDF_ENHMETAFILE:
+        case wxDF_TIFF:
+        case wxDF_DIB:
+            ulSize = 0; // pass via a handle
+            break;
+
+
+        case wxDF_SYLK:
+        case wxDF_DIF:
+        case wxDF_PALETTE:
+        case wxDF_PENDATA:
+        case wxDF_RIFF:
+        case wxDF_WAVE:
+        case wxDF_LOCALE:
+            //PUNT
+            break;
+
+        case wxDF_PRIVATE:
+            size_t*                 p = (size_t *)pzBuffer;
+
+            ulSize = *p++;
+            pzBuffer = (char*)p;
+            break;
+    }
+    m_pDataObject->SetData( rFormat
+                           ,ulSize
+                           ,(void*)pzBuffer
+                          );
+} // end of CIDataObject::SetData
 
 //-------------------------------------------------------------------------
 // wxDataObject
 //-------------------------------------------------------------------------
 
-wxDataObject::wxDataObject()
+wxDataObject::wxDataObject ()
 {
-}
+    m_pDataObject = new DRAGITEM;
+} // end of wxDataObject::wxDataObject
 
-bool wxDataObject::IsSupportedFormat(
-  const wxDataFormat&               rFormat
-, Direction                         vDir
-) const
+wxDataObject::~wxDataObject ()
 {
-    size_t                          nFormatCount = GetFormatCount(vDir);
-
-    if (nFormatCount == 1)
-    {
-        return rFormat == GetPreferredFormat();
-    }
-    else
-    {
-        wxDataFormat*               pFormats = new wxDataFormat[nFormatCount];
-        GetAllFormats( pFormats
-                      ,vDir
-                     );
-
-        size_t                      n;
-
-        for (n = 0; n < nFormatCount; n++)
-        {
-            if (pFormats[n] == rFormat)
-                break;
-        }
-
-        delete [] pFormats;
-
-        // found?
-        return n < nFormatCount;
-    }
-}
+    delete m_pDataObject;
+} // end of wxDataObject::~wxDataObject
 
 // ----------------------------------------------------------------------------
 // wxFileDataObject
index 463d738fa9a1851a86d400468649544e02a16968..6a645291fcb00a8c1b1c0cb90d96a4c316ac006b 100644 (file)
 // global
 // ----------------------------------------------------------------------------
 
+/////////////////////////////////////////////////////////////////////////////
+// Private functions
+/////////////////////////////////////////////////////////////////////////////
+
+static wxDragResult ConvertDragEffectToResult (
+  DWORD                             dwEffect
+)
+{
+    switch (dwEffect)
+    {
+        case DO_COPY:
+            return wxDragCopy;
+
+        case DO_LINK:
+            return wxDragLink;
+
+        case DO_MOVE:
+            return wxDragMove;
+
+        default:
+        case DO_DEFAULT:
+            return wxDragNone;
+    }
+} // end of ConvertDragEffectToResult
+
+static DWORD ConvertDragResultToEffect (
+  wxDragResult                      eResult
+)
+{
+    switch (eResult)
+    {
+        case wxDragCopy:
+            return DO_COPY;
+
+        case wxDragLink:
+            return DO_LINK;
+
+        case wxDragMove:
+            return DO_MOVE;
+
+        default:
+        case wxDragNone:
+            return DO_DEFAULT;
+    }
+} // end of ConvertDragResultToEffect
+
+class CIDropTarget
+{
+public:
+    CIDropTarget(wxDropTarget* pTarget)
+    {
+        m_pTarget   = pTarget;
+        m_pDragItem = NULL;
+    }
+    virtual ~CIDropTarget() { }
+
+    //
+    // Accessors for CDropTarget
+    //
+    void      Free(void) { ::DrgFreeDraginfo(m_pDragInfo); }
+    PDRAGINFO GetDataSource(void) { return m_pDragInfo; }
+    void      SetDataSource(PDRAGINFO pDragInfo) { m_pDragInfo = pDragInfo; }
+    void      SetHWND(HWND hWnd) { m_hWnd = hWnd; }
+
+    //
+    // CIDropTarget methods
+    //
+           bool    DragLeave(void);
+           MRESULT DragOver(void);
+           MRESULT Drop(void);
+
+protected:
+
+    PDRAGINFO                       m_pDragInfo;
+    PDRAGITEM                       m_pDragItem; // !NULL between DragEnter and DragLeave/Drop
+    wxDropTarget*                   m_pTarget;   // the real target (we're just a proxy)
+    HWND                            m_hWnd;      // window we're associated with
+}; // end of CLASS CIDropTarget
+
+bool CIDropTarget::DragLeave()
+{
+    //
+    // Remove the UI feedback
+    //
+    m_pTarget->OnLeave();
+
+    //
+    // Release the held object
+    //
+    Free();
+    return TRUE;
+} // end of CIDropTarget::DragLeave
+
+MRESULT CIDropTarget::DragOver ()
+{
+    char                            zBuffer[128];
+    ULONG                           ulBytes;
+    USHORT                          uOp;
+    USHORT                          uIndicator;
+    ULONG                           ulItems;
+    ULONG                           i;
+
+    ::DrgAccessDraginfo(m_pDragInfo);
+    switch(m_pDragInfo->usOperation)
+    {
+        case DO_UNKNOWN:
+            Free();
+            return (MRFROM2SHORT(DOR_NODROPOP, 0));
+
+        case DO_DEFAULT:
+            m_pDragItem = ::DrgQueryDragitemPtr(m_pDragInfo, 0);
+            ulBytes     = ::DrgQueryStrName( m_pDragItem->hstrContainerName
+                                            ,128
+                                            ,zBuffer
+                                           );
+            if (!ulBytes)
+                return (MRFROM2SHORT(DOR_NODROPOP, 0));
+            else
+                uOp = DO_MOVE;
+            break;
+
+        case DO_COPY:
+        case DO_MOVE:
+            uOp = m_pDragInfo->usOperation;
+            break;
+    }
+    uIndicator = DOR_DROP;
+    ulItems = (ULONG)::DrgQueryDragitemCount(m_pDragInfo);
+    for (i = 0; i < ulItems; i++)
+    {
+        m_pDragItem = ::DrgQueryDragitemPtr(m_pDragInfo, i);
+        if (((m_pDragItem->fsSupportedOps & DO_COPYABLE) &&
+             (uOp == (USHORT)DO_COPY))                   ||
+            ((m_pDragItem->fsSupportedOps & DO_MOVEABLE) &&
+             (uOp == (USHORT)DO_COPY)))
+        {
+            if (::DrgVerifyRMF(m_pDragItem, "DRM_OS2FILE", "DRF_UNKNOWN"))
+                uIndicator = (USHORT)DOR_DROP;
+            else
+                uIndicator = (USHORT)DOR_NEVERDROP;
+        }
+    }
+    Free();
+    return (MRFROM2SHORT(uIndicator, uOp));
+} // end of CIDropTarget::DragOver
+
+// #pragma page   "CIDropTarget::Drop"
+/////////////////////////////////////////////////////////////////////////////
+//
+// CIDropTarget::Drop
+//
+//   Instructs the drop target to paste data that was just now dropped on it.
+//
+// PARAMETERS
+//   pIDataSource -- the data to paste
+//   dwKeyState   -- kbd & mouse state
+//   pt           -- mouse coordinates
+//   pdwEffect    -- effect flag
+//
+// RETURN VALUE
+//  STDMETHODIMP S_OK
+//
+/////////////////////////////////////////////////////////////////////////////
+MRESULT CIDropTarget::Drop ()
+{
+    char                            zBuffer[128];
+    ULONG                           ulBytes;
+    USHORT                          uOp;
+    USHORT                          uIndicator;
+    ULONG                           ulItems;
+    ULONG                           i;
+
+    ::DrgAccessDraginfo(m_pDragInfo);
+    switch(m_pDragInfo->usOperation)
+    {
+        case DO_UNKNOWN:
+            Free();
+            return (MRFROM2SHORT(DOR_NODROPOP, 0));
+
+        case DO_DEFAULT:
+            m_pDragItem = ::DrgQueryDragitemPtr(m_pDragInfo, 0);
+            ulBytes     = ::DrgQueryStrName( m_pDragItem->hstrContainerName
+                                            ,128
+                                            ,zBuffer
+                                           );
+            if (!ulBytes)
+                return (MRFROM2SHORT(DOR_NODROPOP, 0));
+            else
+                uOp = DO_MOVE;
+            break;
+
+        case DO_COPY:
+        case DO_MOVE:
+            uOp = m_pDragInfo->usOperation;
+            break;
+    }
+    uIndicator = DOR_DROP;
+    ulItems = (ULONG)::DrgQueryDragitemCount(m_pDragInfo);
+    for (i = 0; i < ulItems; i++)
+    {
+        m_pDragItem = ::DrgQueryDragitemPtr(m_pDragInfo, i);
+        if (((m_pDragItem->fsSupportedOps & DO_COPYABLE) &&
+             (uOp == (USHORT)DO_COPY))                   ||
+            ((m_pDragItem->fsSupportedOps & DO_MOVEABLE) &&
+             (uOp == (USHORT)DO_COPY)))
+        {
+            if (::DrgVerifyRMF(m_pDragItem, "DRM_OS2FILE", "DRF_UNKNOWN"))
+                uIndicator = (USHORT)DOR_DROP;
+            else
+                uIndicator = (USHORT)DOR_NEVERDROP;
+        }
+    }
+
+    //
+    // First ask the drop target if it wants data
+    //
+    if (m_pTarget->OnDrop( m_pDragInfo->xDrop
+                          ,m_pDragInfo->yDrop
+                         ))
+    {
+        wxDragResult                 eRc;
+
+        //
+        // And now it has the data
+        //
+        eRc = m_pTarget->OnData( m_pDragInfo->xDrop
+                                ,m_pDragInfo->yDrop
+                                ,eRc
+                               );
+    }
+    //else: OnDrop() returned FALSE, no need to copy data
+
+    //
+    // Release the held object
+    //
+    Free();
+    return (MRFROM2SHORT(uIndicator, uOp));
+} // end of CIDropTarget::Drop
+
 // ----------------------------------------------------------------------------
 // wxDropTarget
 // ----------------------------------------------------------------------------
 
-wxDropTarget::wxDropTarget(
+wxDropTarget::wxDropTarget (
   wxDataObject*                     pDataObject
 )
 {
-    // TODO:
-};
+    m_dataObject  = pDataObject;
+    m_pDropTarget = new CIDropTarget(this);
+} // end of wxDropTarget::wxDropTarget
 
 wxDropTarget::~wxDropTarget()
 {
-};
+    Release();
+} // end of wxDropTarget::~wxDropTarget
 
-void wxDropTarget::Register(
-  WXHWND                            hwnd
-)
+bool wxDropTarget::GetData ()
 {
-    //TODO:
-};
+    wxDataFormat                    vFormat = GetSupportedFormat(m_pDropTarget->GetDataSource());
 
-void wxDropTarget::Revoke(
-  WXHWND                            hwnd
-)
+    if (vFormat == wxDF_INVALID)
+    {
+        return FALSE;
+    }
+    //
+    // Under OS/2 we already have the data via the attached DRAGITEM's
+    //
+    return TRUE;
+} // end of wxDropTarget::GetData
+
+wxDataFormat wxDropTarget::GetSupportedFormat (
+  PDRAGINFO                         pDataSource
+) const
 {
-    //TODO:
-};
+    PDRAGITEM                       pDragItem;
+    wxDataFormat                    vFormat;
+    wxDataFormat*                   pFormats;
+    ULONG                           ulFormats = m_dataObject->GetFormatCount(wxDataObject::Set);
+    ULONG                           ulItems = (ULONG)::DrgQueryDragitemCount(pDataSource);
+    ULONG                           i;
+    ULONG                           n;
+    wxString                        sMechanism;
+    wxString                        sFormat;
+    bool                            bValid = FALSE;
 
-wxDragResult wxDropTarget::OnDragOver(
-  wxCoord                           x
-, wxCoord                           y
-, wxDragResult                      vDef
-)
+    pFormats = ulFormats == 1 ? &vFormat :  new wxDataFormat[ulFormats];
+    m_dataObject->GetAllFormats( pFormats
+                                ,wxDataObject::Set
+                               );
+
+    for (n = 0; n < ulFormats; n++)
+    {
+        switch(pFormats[n].GetType())
+        {
+            case wxDF_TEXT:
+            case wxDF_FILENAME:
+            case wxDF_HTML:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_TEXT";
+                break;
+
+            case wxDF_OEMTEXT:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_OEMTEXT";
+                break;
+
+            case wxDF_BITMAP:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_BITMAP";
+                break;
+
+            case wxDF_METAFILE:
+            case wxDF_ENHMETAFILE:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_METAFILE";
+                break;
+
+            case wxDF_TIFF:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_TIFF";
+                break;
+
+            case wxDF_SYLK:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_SYLK";
+                break;
+
+            case wxDF_DIF:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_DIF";
+                break;
+
+            case wxDF_DIB:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_DIB";
+                break;
+
+            case wxDF_PALETTE:
+            case wxDF_PENDATA:
+            case wxDF_RIFF:
+            case wxDF_WAVE:
+            case wxDF_UNICODETEXT:
+            case wxDF_LOCALE:
+                sMechanism = "DRM_OS2FILE";
+                sFormat    = "DRF_UNKNOWN";
+                break;
+
+            case wxDF_PRIVATE:
+                sMechanism = "DRM_OBJECT";
+                sFormat    = "DRF_UNKNOWN";
+                break;
+        }
+        for (i = 0; i < ulItems; i++)
+        {
+            pDragItem = ::DrgQueryDragitemPtr(pDataSource, i);
+            if (::DrgVerifyRMF(pDragItem, sMechanism.c_str(), sFormat.c_str()))
+            {
+                bValid = TRUE;
+                break;
+            }
+        }
+        if (bValid)
+        {
+            vFormat = pFormats[n];
+            break;
+        }
+    }
+    if (pFormats != &vFormat)
+    {
+        //
+        // Free memory if we allocated it
+        //
+        delete [] pFormats;
+    }
+    return (n < ulFormats ? vFormat : wxFormatInvalid);
+} // end of wxDropTarget::GetSupportedFormat
+
+bool wxDropTarget::IsAcceptedData (
+  PDRAGINFO                         pDataSource
+) const
 {
-    //TODO:
-    return vDef;
-};
+    return (GetSupportedFormat(pDataSource) != wxDF_INVALID);
+} // end of wxDropTarget::IsAcceptedData
 
-bool wxDropTarget::OnDrop(
-  wxCoord                           x
-, wxCoord                           y
-)
+void wxDropTarget::Release ()
 {
-    //TODO:
-    return FALSE;
-};
+    m_pDropTarget->Free();
+} // end of wxDropTarget::Release
+
 
-wxDragResult wxDropTarget::OnData(
-  wxCoord                           x
-, wxCoord                           y
-, wxDragResult                      vResult
+wxDragResult wxDropTarget::OnData (
+  wxCoord                           WXUNUSED(vX)
+, wxCoord                           WXUNUSED(y)
+, wxDragResult                      WXUNUSED(vResult)
 )
 {
-    //TODO:
     return (wxDragResult)0;
-};
+} // end of wxDropTarget::OnData
 
-bool wxDropTarget::GetData()
-{
-    //TODO:
-    return FALSE;
-};
-
-bool wxDropTarget::IsAcceptable(
-  DRAGINFO*                         pInfo
+bool wxDropTarget::OnDrop (
+  wxCoord                           WXUNUSED(x)
+, wxCoord                           WXUNUSED(y)
 )
 {
-    //TODO:
-    return FALSE;
-};
+    return TRUE;
+} // end of wxDropTarget::OnDrop
 
 //-------------------------------------------------------------------------
 // wxDropSource
 //-------------------------------------------------------------------------
 
-wxDropSource::wxDropSource(
+wxDropSource::wxDropSource (
   wxWindow*                         pWin
 )
 {
-    // TODO
-};
+    Init();
+} // end of wxDropSource::wxDropSource
 
-wxDropSource::wxDropSource(
+wxDropSource::wxDropSource (
   wxDataObject&                     rData
 , wxWindow*                         pWin
 )
 {
-    // TODO
-};
+    Init();
+    SetData(rData);
+} // end of wxDropSource::wxDropSource
 
-wxDropSource::~wxDropSource()
+wxDropSource::~wxDropSource ()
 {
-    // TODO
-};
+    ::DrgFreeDraginfo(m_pDragInfo);
+} // end of wxDropSource::~wxDropSource
 
-wxDragResult wxDropSource::DoDragDrop(
+wxDragResult wxDropSource::DoDragDrop (
   int                              WXUNUSED(flags)
 )
 {
-    // TODO
+    //
+    // Need to specify drag items in derived classes that know their data types
+    // before calling DoDragDrop
+    //
+    if (::DrgDrag( m_pWindow->GetHWND()
+                  ,m_pDragInfo
+                  ,&m_vDragImage
+                  ,m_ulItems
+                  ,VK_BUTTON2
+                  ,NULL
+                 ) != NULLHANDLE)
+    {
+        switch(m_pDragInfo->usOperation)
+        {
+            case DO_COPY:
+                return wxDragCopy;
+
+            case DO_MOVE:
+                return wxDragCopy;
+
+            case DO_LINK:
+                return wxDragCopy;
+
+            default:
+                return wxDragNone;
+        }
+    }
     return wxDragError;
-};
+} // end of wxDropSource::DoDragDrop
 
-void wxDropSource::Init()
+bool wxDropSource::GiveFeedback (
+  wxDragResult                      eEffect
+)
 {
-    // TODO
-};
+    const wxCursor&                 rCursor = GetCursor(eEffect);
+
+    if (rCursor.Ok())
+    {
+        ::WinSetPointer(HWND_DESKTOP, (HPOINTER)rCursor.GetHCURSOR());
+        m_vDragImage.hImage = (LHANDLE)rCursor.GetHCURSOR();
+        switch(eEffect)
+        {
+            case wxDragCopy:
+                m_pDragInfo->usOperation = DO_COPY;
+                break;
+
+            case wxDragMove:
+                m_pDragInfo->usOperation = DO_MOVE;
+                break;
+
+            case wxDragLink:
+                m_pDragInfo->usOperation = DO_LINK;
+                break;
+        }
+        return TRUE;
+    }
+    else
+    {
+        return FALSE;
+    }
+} // end of GuiAdvDnd_CDropSource::GiveFeedback
+
+void wxDropSource::Init ()
+{
+    m_pDragInfo = ::DrgAllocDraginfo(m_ulItems);
+
+    //
+    // Set a default drag image struct with what we know so far
+    //
+    m_vDragImage.cb             = sizeof(DRAGIMAGE);
+    m_vDragImage.cptl           = 0;  // non-zero if fl is DRG_POLYGON
+    m_vDragImage.hImage         = 0;  // Set in GiveFeedback
+    m_vDragImage.sizlStretch.cx = 20L;
+    m_vDragImage.sizlStretch.cy = 20L;
+    m_vDragImage.fl             = DRG_ICON | DRG_STRETCH;
+    m_vDragImage.cxOffset       = 0;
+    m_vDragImage.cyOffset       = 0;
+
+    HSTR                            hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
+    HSTR                            hStrRMF;
+    HSTR                            hStrContainer;
+    char                            zFormats[128];
+    char                            zContainer[128];
+    USHORT                          uSize = GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1;
+    char*                           pzBuffer = new char[uSize];
+
+    memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
+    pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
+    GetDataObject()->GetDataHere( GetDataObject()->GetPreferredFormat()
+                                 ,(void*)pzBuffer
+                                );
+
+    strcpy(zFormats, "<DRM_OS2FILE, DRF_UNKNOWN>");
+    strcpy(zContainer, GetDataObject()->GetPreferredFormat().GetId().c_str());
+
+    hStrRMF       = ::DrgAddStrHandle(zFormats);
+    hStrContainer = ::DrgAddStrHandle(zContainer);
+
+    m_pDragItem = new DRAGITEM[m_ulItems];
+    for (ULONG i = 0; i < m_ulItems; i++);
+    {
+        m_pDragItem[i].hwndItem          = m_pWindow->GetHWND();
+        m_pDragItem[i].hstrType          = hStrType;
+        m_pDragItem[i].hstrRMF           = hStrRMF;
+        m_pDragItem[i].hstrContainerName = hStrContainer;
+        m_pDragItem[i].fsControl         = 0;
+        m_pDragItem[i].fsSupportedOps    = DO_COPYABLE | DO_MOVEABLE | DO_LINKABLE;
+        m_pDragItem[i].hstrSourceName    = ::DrgAddStrHandle(pzBuffer);
+        m_pDragItem[i].hstrTargetName    = m_pDragItem[i].hstrSourceName;
+        m_pDragItem[i].ulItemID          = i;
+        ::DrgSetDragitem( m_pDragInfo
+                         ,&m_pDragItem[i]
+                         ,sizeof(DRAGITEM)
+                         ,0
+                        );
+    }
+    delete [] pzBuffer;
+    delete [] m_pDragItem;
+} // end of wxDropSource::Init
 
 #endif //wxUSE_DRAG_AND_DROP
index adaa9a053279d5e78a9329cdaba75a047f23abb0..38709224872ff90592235ba1e91c09b673f02fc3 100644 (file)
@@ -2266,7 +2266,7 @@ long wxListCtrl::InsertItem (
     ::WinSendMsg( GetHWND()
                  ,CM_INSERTRECORD
                  ,MPFROMP(pRecord)
-                 ,MPFROMP(pRecordAfter)
+                 ,MPFROMP(&vInsert)
                 );
     //
     // OS/2 must mannually bump the index's of following records
index 84a0958f34df1b17d21497580e86831ae304dd9f..f1cda8a892a8892b4c00392d588d57bbb2e26016 100644 (file)
@@ -134,7 +134,6 @@ GENERICOBJS= \
   ..\generic\$D\textdlgg.obj \
   ..\generic\$D\tipdlg.obj \
   ..\generic\$D\tipwin.obj \
-  ..\generic\$D\treectlg.obj \
   ..\generic\$D\treelay.obj \
   ..\generic\$D\wizard.obj
 
@@ -180,7 +179,6 @@ GENLIBOBJS= \
   textdlgg.obj \
   tipdlg.obj \
   tipwin.obj \
-  treectlg.obj \
   treelay.obj \
   wizard.obj
 
@@ -542,6 +540,7 @@ OS2OBJS = \
   ..\os2\$D\toolbar.obj \
   ..\os2\$D\tooltip.obj \
   ..\os2\$D\toplevel.obj \
+  ..\os2\$D\treectrl.obj \
   ..\os2\$D\utils.obj \
   ..\os2\$D\utilsexc.obj \
   ..\os2\$D\wave.obj \
@@ -624,6 +623,7 @@ OS2LIBOBJS2 = \
   toolbar.obj \
   tooltip.obj \
   toplevel.obj \
+  treectrl.obj \
   utils.obj \
   utilsexc.obj \
   wave.obj \
@@ -876,7 +876,6 @@ $(GENLIBOBJS):
   copy ..\generic\$D\textdlgg.obj
   copy ..\generic\$D\tipdlg.obj
   copy ..\generic\$D\tipwin.obj
-  copy ..\generic\$D\treectlg.obj
   copy ..\generic\$D\treelay.obj
   copy ..\generic\$D\wizard.obj
 
@@ -979,6 +978,7 @@ $(OS2LIBOBJS2):
   copy ..\os2\$D\toolbar.obj
   copy ..\os2\$D\tooltip.obj
   copy ..\os2\$D\toplevel.obj
+  copy ..\os2\$D\treectrl.obj
   copy ..\os2\$D\utils.obj
   copy ..\os2\$D\utilsexc.obj
   copy ..\os2\$D\wave.obj
diff --git a/src/os2/treectrl.cpp b/src/os2/treectrl.cpp
new file mode 100644 (file)
index 0000000..8ea6c25
--- /dev/null
@@ -0,0 +1,2099 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/treectrl.cpp
+// Purpose:     wxTreeCtrl
+// Author:      Julian Smart
+// Modified by: Vadim Zeitlin to be less MSW-specific on 10.10.98
+// Created:     1997
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+    #pragma implementation "treectrl.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_TREECTRL
+
+#include "wx/os2/private.h"
+
+#include "wx/app.h"
+#include "wx/log.h"
+#include "wx/dynarray.h"
+#include "wx/imaglist.h"
+#include "wx/settings.h"
+#include "wx/os2/treectrl.h"
+
+// a macro to hide the ugliness of nested casts
+#define HITEM(item)     (HTREEITEM)(WXHTREEITEM)(item)
+
+// the native control doesn't support multiple selections under MSW and we
+// have 2 ways to emulate them: either using TVS_CHECKBOXES style and let
+// checkboxes be the selection status (checked == selected) or by really
+// emulating everything, i.e. intercepting mouse and key events &c. The first
+// approach is much easier but doesn't work with comctl32.dll < 4.71 and also
+// looks quite ugly.
+#define wxUSE_CHECKBOXES_IN_MULTI_SEL_TREE 0
+
+// ----------------------------------------------------------------------------
+// private functions
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// private classes
+// ----------------------------------------------------------------------------
+
+typedef struct _MYRECORD
+{
+    RECORDCORE                      m_vRecord;
+    ULONG                           m_ulItemId;
+    ULONG                           m_ulUserData;
+} MYRECORD, *PMYRECORD;
+
+struct wxTreeViewItem : public MYRECORD
+{
+    wxTreeViewItem(const wxTreeItemId& rItem)
+    {
+        m_ulItemId = (ULONG)rItem.m_pItem;
+    }
+}; // end of STRUCT wxTreeViewItem
+
+class wxTreeItemInternalData
+{
+public:
+
+    wxTreeItemInternalData() {}
+    ~wxTreeItemInternalData()
+    {
+        if(m_pAttr)
+        {
+            delete m_pAttr;
+            m_pAttr = NULL;
+        }
+    }
+
+    wxTreeItemAttr*                 m_pAttr;
+    WXLPARAM                        m_lParam; // user data
+#if defined(C_CM_COS232)
+    PMYRECORD                       m_pMyRecord; // so we can set the m_ulUserData to 0 when this is deleted
+#endif
+}; // end of CLASS wxTreeItemInternalData
+
+void BumpTreeRecordIds (
+  HWND                              hWnd
+, PMYRECORD                         pRecord
+)
+{
+    while(pRecord)
+    {
+        pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( hWnd
+                                                      ,CM_QUERYRECORD
+                                                      ,MPFROMP(pRecord)
+                                                      ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                     ));
+        if (pRecord)
+            pRecord->m_ulItemId++;
+    }
+} // end of BumpTreeRecordIds
+
+PMYRECORD FindOS2TreeRecordByID (
+  HWND                              hWnd
+, long                              lItemId
+)
+{
+    PMYRECORD                       pRecord = NULL;
+    CNRINFO                         vCnrInfo;
+    unsigned long                   i;
+
+    if (!::WinSendMsg( hWnd
+                      ,CM_QUERYCNRINFO
+                      ,MPFROMP(&vCnrInfo)
+                      ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                     ))
+        return NULL;
+    for (i = 0; i < vCnrInfo.cRecords; i++)
+    {
+        if (i == 0)
+            pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( hWnd
+                                                          ,CM_QUERYRECORD
+                                                          ,MPFROMP(pRecord)
+                                                          ,MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)
+                                                         ));
+        else
+            pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( hWnd
+                                                          ,CM_QUERYRECORD
+                                                          ,MPFROMP(pRecord)
+                                                          ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                         ));
+        if (!pRecord)
+            return NULL;
+        if (pRecord->m_ulItemId == (ULONG)lItemId)
+            break;
+    }
+    return pRecord;
+} // end of FindOS2ListRecordByID
+
+
+
+class wxTreeTraversal
+{
+public:
+    wxTreeTraversal(const wxTreeCtrl* pTree)
+    {
+        m_pTree = pTree;
+    }
+
+    //
+    // Do traverse the tree: visit all items (recursively by default) under the
+    // given one; return TRUE if all items were traversed or FALSE if the
+    // traversal was aborted because OnVisit returned FALSE
+    //
+    bool DoTraverse( const wxTreeItemId& rRoot
+                    ,bool                bRecursively = TRUE
+                   );
+
+    //
+    // Override this function to do whatever is needed for each item, return
+    // FALSE to stop traversing
+    //
+    virtual bool OnVisit(const wxTreeItemId& rItem) = 0;
+
+protected:
+    const wxTreeCtrl* GetTree(void) const { return m_pTree; }
+
+private:
+    bool Traverse( const wxTreeItemId& rRoot
+                  ,bool                bRecursively
+                 );
+
+    const wxTreeCtrl*               m_pTree;
+    DECLARE_NO_COPY_CLASS(wxTreeTraversal)
+}; // end of CLASS wxTreeTraversal
+
+//
+// Internal class for getting the selected items
+//
+class TraverseSelections : public wxTreeTraversal
+{
+public:
+    TraverseSelections( const wxTreeCtrl*   pTree
+                       ,wxArrayTreeItemIds& raSelections
+                      )
+                      : wxTreeTraversal(pTree)
+                      , m_aSelections(raSelections)
+    {
+        m_aSelections.Empty();
+        DoTraverse(pTree->GetRootItem());
+    }
+
+    virtual bool OnVisit(const wxTreeItemId& rItem)
+    {
+        //
+        // Can't visit a virtual node.
+        //
+        if ((GetTree()->GetRootItem() == rItem) && (GetTree()->GetWindowStyle() & wxTR_HIDE_ROOT))
+        {
+            return TRUE;
+        }
+        PMYRECORD                   pRecord = FindOS2TreeRecordByID( GetTree()->GetHWND()
+                                                                    ,rItem.m_pItem
+                                                                   );
+        if (pRecord->m_vRecord.flRecordAttr & CRA_SELECTED)
+        {
+            m_aSelections.Add(rItem);
+        }
+        return TRUE;
+    }
+
+    size_t GetCount(void) const { return m_aSelections.GetCount(); }
+
+private:
+    wxArrayTreeItemIds&             m_aSelections;
+}; // end of CLASS TraverseSelections
+
+//
+// Internal class for counting tree items
+//
+class TraverseCounter : public wxTreeTraversal
+{
+public:
+    TraverseCounter( const wxTreeCtrl*   pTree
+                    ,const wxTreeItemId& rRoot
+                    ,bool                bRecursively
+                   )
+                   : wxTreeTraversal(pTree)
+    {
+        m_nCount = 0;
+        DoTraverse(rRoot, bRecursively);
+    }
+
+    virtual bool OnVisit(const wxTreeItemId& WXUNUSED(rItem))
+    {
+        m_nCount++;
+        return TRUE;
+    }
+
+    size_t GetCount(void) const { return m_nCount; }
+
+private:
+    size_t                          m_nCount;
+}; // end of CLASS TraverseCounter
+
+// ----------------------------------------------------------------------------
+// wxWin macros
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// indices in gs_expandEvents table below
+enum
+{
+    IDX_COLLAPSE,
+    IDX_EXPAND,
+    IDX_WHAT_MAX
+};
+
+enum
+{
+    IDX_DONE,
+    IDX_DOING,
+    IDX_HOW_MAX
+};
+
+// handy table for sending events - it has to be initialized during run-time
+// now so can't be const any more
+static /* const */ wxEventType gs_expandEvents[IDX_WHAT_MAX][IDX_HOW_MAX];
+
+/*
+   but logically it's a const table with the following entries:
+=
+{
+    { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxEVT_COMMAND_TREE_ITEM_COLLAPSING },
+    { wxEVT_COMMAND_TREE_ITEM_EXPANDED,  wxEVT_COMMAND_TREE_ITEM_EXPANDING  }
+};
+*/
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// tree traversal
+// ----------------------------------------------------------------------------
+
+bool wxTreeTraversal::DoTraverse (
+  const wxTreeItemId&               rRoot
+, bool                              bRecursively
+)
+{
+    if (!OnVisit(rRoot))
+        return FALSE;
+
+    return Traverse( rRoot
+                    ,bRecursively
+                   );
+} // end of wxTreeTraversal::DoTraverse
+
+bool wxTreeTraversal::Traverse (
+  const wxTreeItemId&               rRoot
+, bool                              bRecursively
+)
+{
+    long                            lCookie;
+    wxTreeItemId                    vChild = m_pTree->GetFirstChild( rRoot
+                                                                    ,lCookie
+                                                                   );
+    while (vChild.IsOk())
+    {
+        //
+        // Depth first traversal
+        //
+        if (bRecursively && !Traverse(vChild, TRUE))
+            return FALSE;
+        if (!OnVisit(vChild))
+            return FALSE;
+        vChild = m_pTree->GetNextChild( rRoot
+                                       ,lCookie
+                                      );
+    }
+    return TRUE;
+} // end of wxTreeTraversal::Traverse
+
+// ----------------------------------------------------------------------------
+// construction and destruction
+// ----------------------------------------------------------------------------
+
+void wxTreeCtrl::Init ()
+{
+    m_pImageListNormal     = NULL;
+    m_pImageListState      = NULL;
+    m_bOwnsImageListNormal = FALSE;
+    m_bOwnsImageListState  = FALSE;
+    m_bHasAnyAttr          = FALSE;
+    m_pDragImage           = NULL;
+
+    //
+    // Initialize the global array of events now as it can't be done statically
+    // with the wxEVT_XXX values being allocated during run-time only
+    //
+    gs_expandEvents[IDX_COLLAPSE][IDX_DONE]  = wxEVT_COMMAND_TREE_ITEM_COLLAPSED;
+    gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_COLLAPSING;
+    gs_expandEvents[IDX_EXPAND][IDX_DONE]    = wxEVT_COMMAND_TREE_ITEM_EXPANDED;
+    gs_expandEvents[IDX_EXPAND][IDX_DOING]   = wxEVT_COMMAND_TREE_ITEM_EXPANDING;
+} // end of wxTreeCtrl::Init
+
+bool wxTreeCtrl::Create (
+  wxWindow*                         pParent
+, wxWindowID                        vId
+, const wxPoint&                    rPos
+, const wxSize&                     rSize
+, long                              lStyle
+, const wxValidator&                rValidator
+, const wxString&                   rsName
+)
+{
+    CNRINFO                         vCnrInfo;
+
+    Init();
+    if (!CreateControl( pParent
+                       ,vId
+                       ,rPos
+                       ,rSize
+                       ,lStyle
+                       ,rValidator
+                       ,rsName
+                      ))
+        return FALSE;
+
+    DWORD                           dwStyle = WS_VISIBLE | WS_TABSTOP;
+
+    if (m_windowStyle & wxCLIP_SIBLINGS)
+        dwStyle |= WS_CLIPSIBLINGS;
+
+    // Create the tree control.
+    if (!OS2CreateControl( "CONTAINER"
+                          ,dwStyle
+                         ))
+        return FALSE;
+
+    //
+    // Now set the display attributes to show a TREE/ICON view of the
+    // OS/2 Container
+    //
+    if (!::WinSendMsg( GetHWND()
+                      ,CM_QUERYCNRINFO
+                      ,MPFROMP(&vCnrInfo)
+                      ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                     ))
+
+    vCnrInfo.flWindowAttr = CV_TREE|CV_ICON;
+    vCnrInfo.flWindowAttr |= CA_DRAWBITMAP;
+    if (m_windowStyle & wxTR_NO_LINES)
+        vCnrInfo.flWindowAttr |= CA_TREELINE;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)CMA_FLWINDOWATTR
+                );
+
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+    SetForegroundColour(wxWindow::GetParent()->GetForegroundColour());
+    SetFont(*wxSMALL_FONT);
+    SetXComp(0);
+    SetYComp(0);
+    SetSize( rPos.x
+            ,rPos.y
+            ,rSize.x
+            ,rSize.y
+           );
+    return TRUE;
+} // end of wxTreeCtrl::Create
+
+wxTreeCtrl::~wxTreeCtrl ()
+{
+    //
+    // Delete any attributes
+    //
+    if (m_bHasAnyAttr)
+    {
+        for (wxNode* pNode = m_vAttrs.Next(); pNode; pNode = m_vAttrs.Next())
+        {
+            delete (wxTreeItemAttr *)pNode->Data();
+        }
+        m_bHasAnyAttr = FALSE;
+    }
+    DeleteTextCtrl();
+
+    //
+    // Delete user data to prevent memory leaks
+    // also deletes hidden root node storage.
+    //
+    DeleteAllItems();
+    if (m_bOwnsImageListNormal)
+        delete m_pImageListNormal;
+    if (m_bOwnsImageListState)
+        delete m_pImageListState;
+} // end of wxTreeCtrl::~wxTreeCtrl
+
+// ----------------------------------------------------------------------------
+// accessors
+// ----------------------------------------------------------------------------
+
+//
+// simple wrappers which add error checking in debug mode.  These methods
+// assume the items are properly filled out already.  If not, you get errors
+//
+bool wxTreeCtrl::DoGetItem (
+  wxTreeViewItem*                   pTvItem
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID( GetHWND()
+                                                                    ,pTvItem->m_ulItemId
+                                                                   );
+
+    if (!pRecord)
+    {
+        wxLogLastError(wxT("Item not obtained"));
+        return FALSE;
+    }
+    return TRUE;
+} // end of wxTreeCtrl::DoGetItem
+
+void wxTreeCtrl::DoSetItem (
+  wxTreeViewItem*                   pTvItem
+)
+{
+    //
+    // Just invalidate the record to redisplay it
+    //
+    if (!::WinSendMsg( GetHWND()
+                      ,CM_INVALIDATERECORD
+                      ,MPFROMP(pTvItem)
+                      ,MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION | CMA_TEXTCHANGED)
+                     ));
+    {
+        wxLogLastError(wxT("CM_INVALIDATERECORD"));
+    }
+} // end of wxTreeCtrl::DoSetItem
+
+size_t wxTreeCtrl::GetCount () const
+{
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    return (size_t)vCnrInfo.cRecords;
+} // end of wxTreeCtrl::GetCount
+
+unsigned int wxTreeCtrl::GetIndent () const
+{
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    return (unsigned int)vCnrInfo.cxTreeIndent;
+} // end of wxTreeCtrl::GetIndent
+
+void wxTreeCtrl::SetIndent (
+  unsigned int                  uIndent
+)
+{
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    vCnrInfo.cxTreeIndent = (LONG)uIndent;
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)CMA_CXTREEINDENT
+                );
+} // end of wxTreeCtrl::SetIndent
+
+wxImageList* wxTreeCtrl::GetImageList () const
+{
+    return m_pImageListNormal;
+} // end of wxTreeCtrl::GetImageList
+
+wxImageList* wxTreeCtrl::GetStateImageList () const
+{
+    return m_pImageListNormal;
+} // end of wxTreeCtrl::GetStateImageList
+
+//
+// The SETS of imagelists really do nothing under OS2 as a RECORDCORE
+// struct has the icon imbedded in it that it uses for the icon being
+// displayed via the TREEITEMDESC member.  Provided for interface
+// compatability only
+//
+void wxTreeCtrl::SetAnyImageList (
+  wxImageList*                      WXUNUSED(pImageList)
+, int                               WXUNUSED(nWhich)
+)
+{
+} // end of wxTreeCtrl::SetAnyImageList
+
+void wxTreeCtrl::SetImageList (
+  wxImageList*                      WXUNUSED(pImageList)
+)
+{
+    if (m_bOwnsImageListNormal)
+        delete m_pImageListNormal;
+    m_bOwnsImageListNormal = FALSE;
+} // end of wxTreeCtrl::SetImageList
+
+void wxTreeCtrl::SetStateImageList (
+  wxImageList*                      WXUNUSED(pImageList)
+)
+{
+    if (m_bOwnsImageListState)
+        delete m_pImageListState;
+    m_bOwnsImageListState = FALSE;
+} // end of wxTreeCtrl::SetStateImageList
+
+void wxTreeCtrl::AssignImageList (
+  wxImageList*                      WXUNUSED(pImageList)
+)
+{
+    m_bOwnsImageListNormal = TRUE;
+} // end of wxTreeCtrl::AssignImageList
+
+void wxTreeCtrl::AssignStateImageList (
+  wxImageList*                      WXUNUSED(pImageList)
+)
+{
+    m_bOwnsImageListState = TRUE;
+} // end of wxTreeCtrl::AssignStateImageList
+
+size_t wxTreeCtrl::GetChildrenCount (
+  const wxTreeItemId&               rItem
+, bool                              bRecursively
+) const
+{
+    TraverseCounter                 vCounter( this
+                                             ,rItem
+                                             ,bRecursively
+                                            );
+    return vCounter.GetCount() - 1;
+} // end of wxTreeCtrl::GetChildrenCount
+
+// ----------------------------------------------------------------------------
+// control colours
+// ----------------------------------------------------------------------------
+
+bool wxTreeCtrl::SetBackgroundColour (
+  const wxColour&                   rColour
+)
+{
+    ULONG                           ulColor = wxColourToRGB(rColour);
+
+    if ( !wxWindowBase::SetBackgroundColour(rColour) )
+        return FALSE;
+    ::WinSetPresParam( GetHWND()
+                      ,PP_BACKGROUNDCOLOR
+                      ,sizeof(ULONG)
+                      ,&ulColor
+                     );
+    return TRUE;
+} // end of wxTreeCtrl::SetBackgroundColour
+
+bool wxTreeCtrl::SetForegroundColour (
+  const wxColour&                   rColour
+)
+{
+    ULONG                           ulColor = wxColourToRGB(rColour);
+
+    if (!wxWindowBase::SetForegroundColour(rColour))
+        return FALSE;
+    ::WinSetPresParam( GetHWND()
+                      ,PP_FOREGROUNDCOLOR
+                      ,sizeof(ULONG)
+                      ,&ulColor
+                     );
+    return TRUE;
+} // end of wxTreeCtrl::SetForegroundColour
+
+// ----------------------------------------------------------------------------
+// Item access
+// ----------------------------------------------------------------------------
+
+wxString wxTreeCtrl::GetItemText (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxChar                          zBuf[512];  // the size is arbitrary...
+    wxTreeViewItem                  vTvItem(rItem);
+
+    if (!DoGetItem(&vTvItem))
+    {
+        //
+        // Don't return some garbage which was on stack, but an empty string
+        //
+        zBuf[0] = wxT('\0');
+    }
+    else
+        strcpy(zBuf, vTvItem.m_vRecord.pszTree);
+    return wxString(zBuf);
+} // end of wxTreeCtrl::GetItemText
+
+void wxTreeCtrl::SetItemText (
+  const wxTreeItemId&               rItem
+, const wxString&                   rsText
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    vTvItem.m_vRecord.pszTree = (wxChar *)rsText.c_str();  // conversion is ok
+    DoSetItem(&vTvItem);
+} // end of wxTreeCtrl::SetItemText
+
+//
+// These functions under OS/2 PM are not needed.  OS/2 containers in tree view
+// provide for storing a custom expanded and collapsed icons and selected
+// and non selected icons, natively.  For instance, by default, a disk display
+// will display a tree list of folder icons with "+" icons (collapsed) beside
+// those folder which contain child members.  Double clicking a folder changes
+// the closed folder icon to an open folder icon with hatched selection
+// highlighting indicating an ICON view container of the folder is open
+// elsewhere on the desktop.  So the below is not really needed, but we will
+// simply return the appropriate icon requested out of OS/2's native PM
+// data structures.
+//
+int wxTreeCtrl::DoGetItemImageFromData (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, wxTreeItemIcon                    nWhich
+) const
+{
+    //
+    // Image handles stored in CNRINFO.
+    //
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+
+    //
+    // We really only have two to chose from.  If not custom (set in CNRINFO
+    // then return the handle to system bitmap).  OS/2 automatically provides
+    // in_use and selected bitmaps/icons
+    //
+    switch(nWhich)
+    {
+        case wxTreeItemIcon_Normal:
+            if (vCnrInfo.hbmCollapsed == NULLHANDLE)
+                return (int)::WinGetSysBitmap(HWND_DESKTOP, SBMP_TREEPLUS);
+            return vCnrInfo.hbmCollapsed;
+
+
+        case wxTreeItemIcon_Expanded:
+            if (vCnrInfo.hbmExpanded == NULLHANDLE)
+                return (int)::WinGetSysBitmap(HWND_DESKTOP, SBMP_TREEMINUS);
+            return vCnrInfo.hbmExpanded;
+
+        default:
+            return vCnrInfo.hbmCollapsed;
+    }
+}
+
+void wxTreeCtrl::DoSetItemImageFromData (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, int                               nImage
+, wxTreeItemIcon                    nWhich
+) const
+{
+    //
+    // Image handles stored in CNRINFO.
+    //
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    if (nWhich == wxTreeItemIcon_Normal)
+         vCnrInfo.hbmCollapsed = (HBITMAP)nImage;
+    if (nWhich == wxTreeItemIcon_Expanded)
+        vCnrInfo.hbmExpanded = (HBITMAP)nImage;
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)CMA_TREEBITMAP
+                );
+} // end of wxTreeCtrl::DoSetItemImageFromData
+
+// Useless for OS/2
+void wxTreeCtrl::DoSetItemImages (
+  const wxTreeItemId&               rItem
+, int                               nImage
+, int                               nImageSel
+)
+{
+} // end of wxTreeCtrl::DoSetItemImages
+
+int wxTreeCtrl::GetItemImage (
+  const wxTreeItemId&               rItem
+, wxTreeItemIcon                    nWhich
+) const
+{
+    if (HasIndirectData(rItem))
+    {
+        return DoGetItemImageFromData( rItem
+                                      ,nWhich
+                                     );
+    }
+
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    switch (nWhich)
+    {
+        default:
+            wxFAIL_MSG( wxT("unknown tree item image type") );
+
+        case wxTreeItemIcon_Normal:
+            if (vCnrInfo.hbmCollapsed == NULLHANDLE)
+                return (int)::WinGetSysBitmap(HWND_DESKTOP, SBMP_TREEPLUS);
+            return vCnrInfo.hbmCollapsed;
+
+
+        case wxTreeItemIcon_Expanded:
+            if (vCnrInfo.hbmExpanded == NULLHANDLE)
+                return (int)::WinGetSysBitmap(HWND_DESKTOP, SBMP_TREEMINUS);
+            return vCnrInfo.hbmExpanded;
+
+        case wxTreeItemIcon_Selected:
+        case wxTreeItemIcon_SelectedExpanded:
+            return -1;
+    }
+}
+
+void wxTreeCtrl::SetItemImage (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, int                               nImage
+, wxTreeItemIcon                    nWhich
+)
+{
+    CNRINFO                         vCnrInfo;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)(USHORT)sizeof(CNRINFO)
+                );
+    switch (nWhich)
+    {
+        case wxTreeItemIcon_Normal:
+            vCnrInfo.hbmCollapsed = (HBITMAP)nImage;
+            break;
+
+        case wxTreeItemIcon_Expanded:
+            vCnrInfo.hbmExpanded = (HBITMAP)nImage;
+            break;
+
+        default:
+            wxFAIL_MSG( wxT("unknown tree item image type") );
+    }
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETCNRINFO
+                 ,MPFROMP(&vCnrInfo)
+                 ,(MPARAM)CMA_TREEBITMAP
+                );
+} // end of wxTreeCtrl::SetItemImage
+
+wxTreeItemData* wxTreeCtrl::GetItemData (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    if (!DoGetItem(&vTvItem))
+    {
+        return NULL;
+    }
+
+    return (wxTreeItemData *)vTvItem.m_ulUserData;
+} // end of wxTreeCtrl::GetItemData
+
+void wxTreeCtrl::SetItemData (
+  const wxTreeItemId&               rItem
+, wxTreeItemData*                   pData
+)
+{
+    //
+    // first, associate this piece of data with this item
+    if (pData)
+    {
+        pData->SetId(rItem);
+    }
+
+    wxTreeViewItem                  vTvItem(rItem);
+
+    vTvItem.m_ulUserData = (ULONG)pData;
+    DoSetItem(&vTvItem);
+} // end of wxTreeCtrl::SetItemData
+
+// The following two do nothing under OS/2
+void wxTreeCtrl::SetIndirectItemData (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, wxTreeItemIndirectData*           WXUNUSED(pData)
+)
+{
+} // end of wxTreeCtrl::SetIndirectItemData
+
+bool wxTreeCtrl::HasIndirectData (
+  const wxTreeItemId&               WXUNUSED(rItem)
+) const
+{
+    return FALSE;
+} // end of wxTreeCtrl::HasIndirectData
+
+// Irreleveant under OS/2 --- item either has child records or it doesn't.
+void wxTreeCtrl::SetItemHasChildren (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, bool                              WXUNUSED(bHas)
+)
+{
+} // end of wxTreeCtrl::SetItemHasChildren
+
+// Irreleveant under OS/2 --- function of the font in PM
+void wxTreeCtrl::SetItemBold (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, bool                              WXUNUSED(bBold)
+)
+{
+} // end of wxTreeCtrl::SetItemBold
+
+void wxTreeCtrl::SetItemDropHighlight (
+  const wxTreeItemId&               rItem
+, bool                              bHighlight
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETRECORDEMPHASIS
+                 ,MPFROMP(&vTvItem)
+                 ,MPFROM2SHORT(bHighlight, CRA_SELECTED)
+                );
+    DoSetItem(&vTvItem);
+} // end of wxTreeCtrl::SetItemDropHighlight
+
+void wxTreeCtrl::RefreshItem (
+  const wxTreeItemId&               rItem
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    //
+    // This just does a record invalidate causing it to be re-displayed
+    //
+    DoSetItem(&vTvItem);
+} // end of wxTreeCtrl::RefreshItem
+
+wxColour wxTreeCtrl::GetItemTextColour (
+  const wxTreeItemId&               rItem
+) const
+{
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        return wxNullColour;
+    }
+    return pAttr->GetTextColour();
+} // end of wxTreeCtrl::GetItemTextColour
+
+wxColour wxTreeCtrl::GetItemBackgroundColour (
+  const wxTreeItemId&               rItem
+) const
+{
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        return wxNullColour;
+    }
+    return pAttr->GetBackgroundColour();
+} // end of wxTreeCtrl::GetItemBackgroundColour
+
+wxFont wxTreeCtrl::GetItemFont (
+  const wxTreeItemId&               rItem
+) const
+{
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        return wxNullFont;
+    }
+    return pAttr->GetFont();
+} // end of wxTreeCtrl::GetItemFont
+
+void wxTreeCtrl::SetItemTextColour (
+  const wxTreeItemId&               rItem
+, const wxColour&                   rCol
+)
+{
+    m_bHasAnyAttr = TRUE;
+
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        pAttr = new wxTreeItemAttr;
+        m_vAttrs.Put(lId, (wxObject *)pAttr);
+    }
+    pAttr->SetTextColour(rCol);
+    RefreshItem(rItem);
+} // end of wxTreeCtrl::SetItemTextColour
+
+void wxTreeCtrl::SetItemBackgroundColour (
+  const wxTreeItemId&               rItem
+, const wxColour&                   rCol
+)
+{
+    m_bHasAnyAttr = TRUE;
+
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        pAttr = new wxTreeItemAttr;
+        m_vAttrs.Put(lId, (wxObject *)pAttr);
+    }
+    pAttr->SetBackgroundColour(rCol);
+    RefreshItem(rItem);
+} // end of wxTreeCtrl::SetItemBackgroundColour
+
+void wxTreeCtrl::SetItemFont (
+  const wxTreeItemId&               rItem
+, const wxFont&                     rFont
+)
+{
+    m_bHasAnyAttr = TRUE;
+
+    long                            lId = (long)rItem.m_pItem;
+    wxTreeItemAttr*                 pAttr = (wxTreeItemAttr *)m_vAttrs.Get(lId);
+
+    if (!pAttr)
+    {
+        pAttr = new wxTreeItemAttr;
+        m_vAttrs.Put(lId, (wxObject *)pAttr);
+    }
+    pAttr->SetFont(rFont);
+    RefreshItem(rItem);
+} // end of wxTreeCtrl::SetItemFont
+
+// ----------------------------------------------------------------------------
+// Item status
+// ----------------------------------------------------------------------------
+
+bool wxTreeCtrl::IsVisible (
+  const wxTreeItemId&               rItem
+) const
+{
+    // Bug in Gnu-Win32 headers, so don't use the macro TreeView_GetItemRect
+    RECTL                           vRectRecord;
+    RECTL                           vRectContainer;
+    wxRect                          vWxRectRecord;
+    wxRect                          vWxRectContainer;
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+    QUERYRECORDRECT                 vQuery;
+
+    vQuery.cb                = sizeof(QUERYRECORDRECT);
+    vQuery.pRecord           = (PRECORDCORE)pRecord;
+    vQuery.fRightSplitWindow = FALSE;
+    vQuery.fsExtent          = CMA_TREEICON;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYVIEWPORTRECT
+                 ,MPFROMP(&vRectContainer)
+                 ,MPFROM2SHORT(CMA_WINDOW, FALSE)
+                );
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYRECORDRECT
+                 ,MPFROMP(&vRectRecord)
+                 ,MPFROMP(&vQuery)
+                );
+    vWxRectRecord.SetLeft(vRectRecord.xLeft);
+    vWxRectRecord.SetTop(vRectRecord.yTop);
+    vWxRectRecord.SetRight(vRectRecord.xRight);
+    vWxRectRecord.SetBottom(vRectRecord.yBottom);
+
+    vWxRectContainer.SetLeft(vRectContainer.xLeft);
+    vWxRectContainer.SetTop(vRectContainer.yTop);
+    vWxRectContainer.SetRight(vRectContainer.xRight);
+    vWxRectContainer.SetBottom(vRectContainer.yBottom);
+    return (vWxRectContainer.Inside(wxPoint(vWxRectRecord.x, vWxRectRecord.y)));
+} // end of wxTreeCtrl::IsVisible
+
+bool wxTreeCtrl::ItemHasChildren (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxTreeViewItem                  vTvItem(rItem);
+    DoGetItem(&vTvItem);
+
+    //
+    // A tree record with children will have one of these attributes
+    //
+    return (vTvItem.m_vRecord.flRecordAttr & CRA_EXPANDED ||
+            vTvItem.m_vRecord.flRecordAttr & CRA_COLLAPSED) != 0;
+}
+
+bool wxTreeCtrl::IsExpanded (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxTreeViewItem                  vTvItem(rItem);
+    DoGetItem(&vTvItem);
+
+    return (vTvItem.m_vRecord.flRecordAttr & CRA_EXPANDED) != 0;
+} // end of wxTreeCtrl::IsExpanded
+
+bool wxTreeCtrl::IsSelected (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxTreeViewItem                  vTvItem(rItem);
+    DoGetItem(&vTvItem);
+
+    return (vTvItem.m_vRecord.flRecordAttr & CRA_SELECTED) != 0;
+} // end of wxTreeCtrl::IsSelected
+
+// Not supported
+bool wxTreeCtrl::IsBold (
+  const wxTreeItemId&               rItem
+) const
+{
+    return FALSE;
+} // end of wxTreeCtrl::IsBold
+
+// ----------------------------------------------------------------------------
+// navigation
+// ----------------------------------------------------------------------------
+
+wxTreeItemId wxTreeCtrl::GetRootItem () const
+{
+    PMYRECORD                       pRecord = NULL;
+
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)
+                                                 ));
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetRootItem
+
+wxTreeItemId wxTreeCtrl::GetSelection () const
+{
+    wxCHECK_MSG( !(m_windowStyle & wxTR_MULTIPLE), (long)(WXHTREEITEM)0,
+                 wxT("this only works with single selection controls") );
+
+    PMYRECORD                       pRecord = NULL;
+
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORDEMPHASIS
+                                                  ,MPARAM(CMA_FIRST)
+                                                  ,MPARAM(CRA_SELECTED)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetSelection
+
+wxTreeItemId wxTreeCtrl::GetItemParent (
+  const wxTreeItemId&               rItem
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_PARENT, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetItemParent
+
+wxTreeItemId wxTreeCtrl::GetFirstChild (
+  const wxTreeItemId&               rItem
+, long&                             rCookie
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_FIRSTCHILD, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    //
+    // Remember the last child returned in 'cookie'
+    //
+    rCookie = (long)pRecord->m_ulItemId;
+    return wxTreeItemId(rCookie);
+} // end of wxTreeCtrl::GetFirstChild
+
+wxTreeItemId wxTreeCtrl::GetNextChild (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, long&                             rCookie
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rCookie
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    rCookie = (long)pRecord->m_ulItemId;
+    return wxTreeItemId(rCookie);
+} // end of wxTreeCtrl::GetNextChild
+
+wxTreeItemId wxTreeCtrl::GetLastChild (
+  const wxTreeItemId&               rItem
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_LASTCHILD, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetLastChild
+
+wxTreeItemId wxTreeCtrl::GetNextSibling (
+  const wxTreeItemId&               rItem
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetNextSibling
+
+wxTreeItemId wxTreeCtrl::GetPrevSibling (
+  const wxTreeItemId&               rItem
+) const
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                  ,CM_QUERYRECORD
+                                                  ,MPFROMP(pRecord)
+                                                  ,MPFROM2SHORT(CMA_PREV, CMA_ITEMORDER)
+                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::GetPrevSibling
+
+wxTreeItemId wxTreeCtrl::GetFirstVisibleItem () const
+{
+    PMYRECORD                       pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                                                  ,CM_QUERYRECORD
+                                                                                  ,MPFROMP(pRecord)
+                                                                                  ,MPFROM2SHORT(CMA_FIRST, CMA_ITEMORDER)
+                                                                                 ));
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+
+    if (IsVisible(wxTreeItemId((long)pRecord->m_ulItemId)))
+        return wxTreeItemId((long)pRecord->m_ulItemId);
+    while(pRecord)
+    {
+        pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                      ,CM_QUERYRECORD
+                                                      ,MPFROMP(pRecord)
+                                                      ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                     ));
+        if (!pRecord)
+            return wxTreeItemId(-1L);
+        if (IsVisible(wxTreeItemId((long)pRecord->m_ulItemId)))
+            return wxTreeItemId((long)pRecord->m_ulItemId);
+    }
+    return wxTreeItemId(-1L);
+} // end of wxTreeCtrl::GetFirstVisibleItem
+
+wxTreeItemId wxTreeCtrl::GetNextVisible (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxASSERT_MSG(IsVisible(rItem), wxT("The item you call GetNextVisible() for must be visible itself!"));
+
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    while(pRecord)
+    {
+        pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                      ,CM_QUERYRECORD
+                                                      ,MPFROMP(pRecord)
+                                                      ,MPFROM2SHORT(CMA_NEXT, CMA_ITEMORDER)
+                                                     ));
+        if (!pRecord)
+            return wxTreeItemId(-1L);
+        if (IsVisible(wxTreeItemId((long)pRecord->m_ulItemId)))
+            return wxTreeItemId((long)pRecord->m_ulItemId);
+    }
+    return wxTreeItemId(-1L);
+} // end of wxTreeCtrl::GetNextVisible
+
+wxTreeItemId wxTreeCtrl::GetPrevVisible (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxASSERT_MSG( IsVisible(rItem), wxT("The item you call GetPrevVisible() for must be visible itself!"));
+
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+
+    if (!pRecord)
+        return wxTreeItemId(-1L);
+    while(pRecord)
+    {
+        pRecord = (PMYRECORD)PVOIDFROMMR(::WinSendMsg( GetHWND()
+                                                      ,CM_QUERYRECORD
+                                                      ,MPFROMP(pRecord)
+                                                      ,MPFROM2SHORT(CMA_PREV, CMA_ITEMORDER)
+                                                     ));
+        if (!pRecord)
+            return wxTreeItemId(-1L);
+        if (IsVisible(wxTreeItemId((long)pRecord->m_ulItemId)))
+            return wxTreeItemId((long)pRecord->m_ulItemId);
+    }
+    return wxTreeItemId(-1L);
+} // end of wxTreeCtrl::GetPrevVisible
+
+// ----------------------------------------------------------------------------
+// multiple selections emulation -- under OS/2 checked tree items is not
+// supported, but multisel is.  So we'll just check for selections here.
+// ----------------------------------------------------------------------------
+
+bool wxTreeCtrl::IsItemChecked (
+  const wxTreeItemId&               rItem
+) const
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    DoGetItem(&vTvItem);
+    return (vTvItem.m_vRecord.flRecordAttr & CRA_SELECTED);
+} // end of wxTreeCtrl::IsItemChecked
+
+void wxTreeCtrl::SetItemCheck (
+  const wxTreeItemId&               rItem
+, bool                              bCheck
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    DoGetItem(&vTvItem);
+    ::WinSendMsg( GetHWND()
+                 ,CM_SETRECORDEMPHASIS
+                 ,MPFROMP(&vTvItem)
+                 ,MPFROM2SHORT(TRUE, CRA_SELECTED)
+                );
+    DoSetItem(&vTvItem);
+} // end of wxTreeCtrl::SetItemCheck
+
+size_t wxTreeCtrl::GetSelections (
+  wxArrayTreeItemIds&               raSelections
+) const
+{
+    TraverseSelections              vSelector( this
+                                              ,raSelections
+                                             );
+    return vSelector.GetCount();
+} // end of wxTreeCtrl::GetSelections
+
+// ----------------------------------------------------------------------------
+// Usual operations
+// ----------------------------------------------------------------------------
+
+wxTreeItemId wxTreeCtrl::DoInsertItem (
+  const wxTreeItemId&               rParent
+, wxTreeItemId                      vInsertAfter
+, const wxString&                   rsText
+, int                               nImage
+, int                               selectedImage
+, wxTreeItemData*                   pData
+)
+{
+    PMYRECORD                       pRecordAfter = FindOS2TreeRecordByID( GetHWND()
+                                                                         ,vInsertAfter.m_pItem
+                                                                        );
+
+    PMYRECORD                       pRecordParent = FindOS2TreeRecordByID( GetHWND()
+                                                                          ,rParent.m_pItem
+                                                                         );
+
+    PMYRECORD                       pRecord = (PMYRECORD)::WinSendMsg( GetHWND()
+                                                                      ,CM_ALLOCRECORD
+                                                                      ,MPFROMLONG(sizeof(MYRECORD) - sizeof(RECORDCORE))
+                                                                      ,MPFROMLONG(1)
+                                                                     );
+    RECORDINSERT                    vInsert;
+
+    vInsert.cb                = sizeof(RECORDINSERT);
+    if (rParent.m_pItem == 0L)
+    {
+        if (vInsertAfter.m_pItem == -1)
+            vInsert.pRecordOrder      = (PRECORDCORE)CMA_END;
+        else
+            vInsert.pRecordOrder      = (PRECORDCORE)CMA_FIRST;
+        vInsert.pRecordParent     = NULL;
+    }
+    else
+    {
+        if (vInsertAfter.m_pItem == 0)
+            vInsert.pRecordOrder      = (PRECORDCORE)CMA_FIRST;
+        else if (vInsertAfter.m_pItem == -1)
+            vInsert.pRecordOrder      = (PRECORDCORE)CMA_END;
+        else
+            vInsert.pRecordOrder  = (PRECORDCORE)pRecordAfter;
+        vInsert.pRecordParent     = (PRECORDCORE)pRecordParent;
+    }
+    vInsert.fInvalidateRecord = TRUE;
+    vInsert.zOrder            = CMA_TOP;
+    vInsert.cRecordsInsert    = 1;
+
+    pRecord->m_vRecord.pszTree   = (wxChar*)rsText.c_str();
+    pRecord->m_vRecord.hbmBitmap = nImage;
+    pRecord->m_ulItemId = pRecordAfter->m_ulItemId + 1;
+    if (pData != NULL)
+    {
+        pRecord->m_ulUserData = (ULONG)pData;
+    }
+    ::WinSendMsg( GetHWND()
+                 ,CM_INSERTRECORD
+                 ,MPFROMP(pRecord)
+                 ,MPFROMP(&vInsert)
+                );
+
+    //
+    // OS/2 must mannually bump the index's of following records
+    //
+    BumpTreeRecordIds( GetHWND()
+                  ,pRecord
+                 );
+    if (pData != NULL)
+    {
+        //
+        // Associate the application tree item with PM tree item handle
+        //
+        pData->SetId((long)pRecord->m_ulItemId);
+    }
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+}
+
+// for compatibility only
+wxTreeItemId wxTreeCtrl::InsertItem (
+  const wxTreeItemId&               rParent
+, const wxString&                   rsText
+, int                               nImage
+, int                               nSelImage
+, long                              lInsertAfter
+)
+{
+    return DoInsertItem( rParent
+                        ,wxTreeItemId(lInsertAfter)
+                        ,rsText
+                        ,nImage
+                        ,nSelImage
+                        ,NULL
+                       );
+} // end of wxTreeCtrl::InsertItem
+
+wxTreeItemId wxTreeCtrl::AddRoot (
+  const wxString&                   rsText
+, int                               nImage
+, int                               nSelectedImage
+, wxTreeItemData*                   pData)
+{
+
+    return DoInsertItem( wxTreeItemId((long)0)
+                        ,wxTreeItemId((long)-1)
+                        ,rsText
+                        ,nImage
+                        ,nSelectedImage
+                        ,pData
+                       );
+} // end of wxTreeCtrl::AddRoot
+
+wxTreeItemId wxTreeCtrl::PrependItem (
+  const wxTreeItemId&               rParent
+, const wxString&                   rsText
+, int                               nImage
+, int                               nSelectedImage
+, wxTreeItemData*                   pData
+)
+{
+    return DoInsertItem( rParent
+                        ,wxTreeItemId((long)0)
+                        ,rsText
+                        ,nImage
+                        ,nSelectedImage
+                        ,pData
+                       );
+} // end of wxTreeCtrl::PrependItem
+
+wxTreeItemId wxTreeCtrl::InsertItem (
+  const wxTreeItemId&               rParent
+, const wxTreeItemId&               rIdPrevious
+, const wxString&                   rsText
+, int                               nImage
+, int                               nSelectedImage
+, wxTreeItemData*                   pData
+)
+{
+    return DoInsertItem( rParent
+                        ,rIdPrevious
+                        ,rsText
+                        ,nImage
+                        ,nSelectedImage
+                        ,pData
+                       );
+} // end of wxTreeCtrl::InsertItem
+
+wxTreeItemId wxTreeCtrl::InsertItem (
+  const wxTreeItemId&               rParent
+, size_t                            nIndex
+, const wxString&                   rsText
+, int                               nImage
+, int                               nSelectedImage
+, wxTreeItemData*                   pData
+)
+{
+    return DoInsertItem( rParent
+                        ,wxTreeItemId((long)nIndex)
+                        ,rsText
+                        ,nImage
+                        ,nSelectedImage
+                        ,pData
+                       );
+} // end of wxTreeCtrl::InsertItem
+
+wxTreeItemId wxTreeCtrl::AppendItem (
+  const wxTreeItemId&               rParent
+, const wxString&                   rsText
+, int                               nImage
+, int                               nSelectedImage
+, wxTreeItemData*                   pData
+)
+{
+    return DoInsertItem( rParent
+                        ,wxTreeItemId((long)-1)
+                        ,rsText
+                        ,nImage
+                        ,nSelectedImage
+                        ,pData
+                       );
+} // end of wxTreeCtrl::AppendItem
+
+void wxTreeCtrl::Delete (
+  const wxTreeItemId&               rItem
+)
+{
+    //
+    // OS/2 does not generate DELETEITEM events so do it here
+    //
+    wxEventType                     vEventType = wxEVT_NULL;
+    wxTreeEvent                     vEvent( wxEVT_NULL
+                                           ,m_windowId
+                                          );
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID( GetHWND()
+                                                                    ,rItem.m_pItem
+                                                                   );
+    vEvent.SetEventObject(this);
+    ::WinSendMsg( GetHWND()
+                 ,CM_REMOVERECORD
+                 ,MPFROMP(pRecord)
+                 ,(MPARAM)(CMA_FREE | CMA_INVALIDATE)
+                );
+    vEvent.m_item = rItem.m_pItem;
+    if (m_bHasAnyAttr)
+    {
+        delete (wxTreeItemAttr *)m_vAttrs.Delete((long)rItem.m_pItem);
+    }
+    vEvent.SetEventType(vEventType);
+    GetEventHandler()->ProcessEvent(vEvent);
+} // end of wxTreeCtrl::Delete
+
+// delete all children (but don't delete the item itself)
+void wxTreeCtrl::DeleteChildren (
+  const wxTreeItemId&               rItem
+)
+{
+    long                            lCookie;
+    wxArrayLong                     aChildren;
+    wxTreeItemId                    vChild = GetFirstChild( rItem
+                                                           ,lCookie
+                                                          );
+
+    while (vChild.IsOk())
+    {
+        aChildren.Add((long)(WXHTREEITEM)vChild);
+        vChild = GetNextChild( rItem
+                              ,lCookie
+                             );
+    }
+
+    size_t                          nCount = aChildren.Count();
+
+    for (size_t n = 0; n < nCount; n++)
+    {
+        Delete(aChildren[n]);
+    }
+} // end of wxTreeCtrl::DeleteChildren
+
+void wxTreeCtrl::DeleteAllItems ()
+{
+    ::WinSendMsg( GetHWND()
+                 ,CM_REMOVERECORD
+                 ,NULL                // Remove all
+                 ,(MPARAM)(CMA_FREE | CMA_INVALIDATE)
+                );
+} // end of wxTreeCtrl::DeleteAllItems
+
+void wxTreeCtrl::DoExpand (
+  const wxTreeItemId&               rItem
+, int                               nFlag
+)
+{
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID( GetHWND()
+                                                                    ,rItem.m_pItem
+                                                                   );
+    switch(nFlag)
+    {
+        case wxTREE_EXPAND_EXPAND:
+            ::WinSendMsg( GetHWND()
+                         ,CM_EXPANDTREE
+                         ,MPFROMP(pRecord)
+                         ,NULL
+                        );
+            break;
+
+        case wxTREE_EXPAND_COLLAPSE:
+            ::WinSendMsg( GetHWND()
+                         ,CM_COLLAPSETREE
+                         ,MPFROMP(pRecord)
+                         ,NULL
+                        );
+            break;
+
+        case wxTREE_EXPAND_COLLAPSE_RESET:
+            ::WinSendMsg( GetHWND()
+                         ,CM_COLLAPSETREE
+                         ,MPFROMP(pRecord)
+                         ,NULL
+                        );
+            DeleteChildren(rItem);
+            break;
+
+        case wxTREE_EXPAND_TOGGLE:
+            if (pRecord->m_vRecord.flRecordAttr & CRA_COLLAPSED)
+                ::WinSendMsg( GetHWND()
+                             ,CM_EXPANDTREE
+                             ,MPFROMP(pRecord)
+                             ,NULL
+                            );
+            else if (pRecord->m_vRecord.flRecordAttr & CRA_EXPANDED)
+                ::WinSendMsg( GetHWND()
+                             ,CM_COLLAPSETREE
+                             ,MPFROMP(pRecord)
+                             ,NULL
+                            );
+            break;
+
+    }
+} // end of wxTreeCtrl::DoExpand
+
+void wxTreeCtrl::Expand (
+  const wxTreeItemId&               rItem
+)
+{
+    DoExpand( rItem
+             ,wxTREE_EXPAND_EXPAND
+            );
+} // end of wxTreeCtrl::Expand
+
+void wxTreeCtrl::Collapse (
+  const wxTreeItemId&               rItem
+)
+{
+    DoExpand( rItem
+             ,wxTREE_EXPAND_COLLAPSE
+            );
+} // end of wxTreeCtrl::Collapse
+
+void wxTreeCtrl::CollapseAndReset (
+  const wxTreeItemId&               rItem
+)
+{
+    DoExpand( rItem
+             ,wxTREE_EXPAND_COLLAPSE_RESET
+            );
+} // end of wxTreeCtrl::CollapseAndReset
+
+void wxTreeCtrl::Toggle (
+  const wxTreeItemId&               rItem
+)
+{
+    DoExpand( rItem
+             ,wxTREE_EXPAND_TOGGLE
+            );
+} // end of wxTreeCtrl::Toggle
+
+void wxTreeCtrl::ExpandItem (
+  const wxTreeItemId&               rItem
+, int                               nAction
+)
+{
+    DoExpand( rItem
+             ,nAction
+            );
+} // end of wxTreeCtrl::ExpandItem
+
+void wxTreeCtrl::Unselect ()
+{
+    wxASSERT_MSG( !(m_windowStyle & wxTR_MULTIPLE),
+                  wxT("doesn't make sense, may be you want UnselectAll()?") );
+
+    //
+    // Just remove the selection
+    //
+    SelectItem(wxTreeItemId((long)0));
+} // end of wxTreeCtrl::Unselect
+
+void wxTreeCtrl::UnselectAll ()
+{
+    if (m_windowStyle & wxTR_MULTIPLE)
+    {
+        wxArrayTreeItemIds          aSelections;
+        size_t                      nCount = GetSelections(aSelections);
+
+        for (size_t n = 0; n < nCount; n++)
+        {
+            SetItemCheck( aSelections[n]
+                         ,FALSE
+                        );
+        }
+    }
+    else
+    {
+        //
+        // Just remove the selection
+        //
+        Unselect();
+    }
+} // end of wxTreeCtrl::UnselectAll
+
+void wxTreeCtrl::SelectItem (
+  const wxTreeItemId&               rItem
+)
+{
+    SetItemCheck(rItem);
+} // end of wxTreeCtrl::SelectItem
+
+void wxTreeCtrl::EnsureVisible (
+  const wxTreeItemId&               rItem
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    DoGetItem(&vTvItem);
+    if (!::WinSendMsg( GetHWND()
+                      ,CM_INVALIDATERECORD
+                      ,MPFROMP(&vTvItem)
+                      ,MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION | CMA_TEXTCHANGED)
+                     ));
+} // end of wxTreeCtrl::EnsureVisible
+
+void wxTreeCtrl::ScrollTo (
+  const wxTreeItemId&               rItem
+)
+{
+    wxTreeViewItem                  vTvItem(rItem);
+
+    DoGetItem(&vTvItem);
+    if (!::WinSendMsg( GetHWND()
+                      ,CM_INVALIDATERECORD
+                      ,MPFROMP(&vTvItem)
+                      ,MPFROM2SHORT(1, CMA_ERASE | CMA_REPOSITION | CMA_TEXTCHANGED)
+                     ));
+}
+
+wxTextCtrl* wxTreeCtrl::EditLabel (
+  const wxTreeItemId&               rItem
+, wxClassInfo*                      WXUNUSED(pTextControlClass)
+)
+{
+    CNREDITDATA                     vEdit;
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID( GetHWND()
+                                                                    ,rItem.m_pItem
+                                                                   );
+
+    vEdit.cb         = sizeof(CNREDITDATA);
+    vEdit.hwndCnr    = GetHWND();
+    vEdit.pRecord    = &pRecord->m_vRecord;
+    vEdit.pFieldInfo = NULL;
+    vEdit.ppszText   = NULL;
+    vEdit.cbText     = 0;
+    vEdit.id         = 0;
+
+    ::WinSendMsg( GetHWND()
+                 ,CM_OPENEDIT
+                 ,MPFROMP(&vEdit)
+                 ,(MPARAM)0
+                );
+    return NULL;
+} // end of wxTreeCtrl::EditLabel
+
+// End label editing, optionally cancelling the edit
+void wxTreeCtrl::EndEditLabel (
+  const wxTreeItemId&               WXUNUSED(rItem)
+, bool                              WXUNUSED(bDiscardChanges)
+)
+{
+    ::WinSendMsg( GetHWND()
+                 ,CM_CLOSEEDIT
+                 ,(MPARAM)0
+                 ,(MPARAM)0
+                );
+} // end of wxTreeCtrl::EndEditLabel
+
+wxTreeItemId wxTreeCtrl::HitTest (
+  const wxPoint&                    rPoint
+, int&                              WXUNUSED(rFlags)
+)
+{
+    PMYRECORD                       pRecord = NULL;
+    QUERYRECFROMRECT                vQueryRect;
+    RECTL                           vRect;
+    long                            lHeight;
+
+    //
+    // Get height for OS/2 point conversion
+    //
+    ::WinSendMsg( GetHWND()
+                 ,CM_QUERYVIEWPORTRECT
+                 ,MPFROMP(&vRect)
+                 ,MPFROM2SHORT(CMA_WINDOW, TRUE)
+                );
+    lHeight = vRect.yTop - vRect.yBottom;
+
+    //
+    // For now just try and get a record in the general vicinity and forget
+    // the flag
+    //
+    vRect.xLeft   = rPoint.x - 2;
+    vRect.xRight  = rPoint.x + 2;
+    vRect.yTop    = (lHeight - rPoint.y) + 2;
+    vRect.yBottom = (lHeight - rPoint.y) - 2;
+
+    vQueryRect.cb = sizeof(QUERYRECFROMRECT);
+    vQueryRect.rect = vRect;
+    vQueryRect.fsSearch = CMA_PARTIAL;
+
+    pRecord = (PMYRECORD)::WinSendMsg( GetHWND()
+                                      ,CM_QUERYRECORDFROMRECT
+                                      ,(MPARAM)CMA_FIRST
+                                      ,MPFROMP(&vQueryRect)
+                                    );
+
+    if (!pRecord)
+        return -1L;
+    return wxTreeItemId((long)pRecord->m_ulItemId);
+} // end of wxTreeCtrl::HitTest
+
+bool wxTreeCtrl::GetBoundingRect (
+  const wxTreeItemId&               rItem
+, wxRect&                           rRect
+, bool                              bTextOnly
+) const
+{
+    RECTL                           vRectRecord;
+    PMYRECORD                       pRecord = FindOS2TreeRecordByID ( GetHWND()
+                                                                     ,rItem.m_pItem
+                                                                    );
+    QUERYRECORDRECT                 vQuery;
+
+    vQuery.cb                = sizeof(QUERYRECORDRECT);
+    vQuery.pRecord           = (PRECORDCORE)pRecord;
+    vQuery.fRightSplitWindow = FALSE;
+    if (bTextOnly)
+        vQuery.fsExtent          = CMA_TEXT;
+    else
+        vQuery.fsExtent          = CMA_TREEICON | CMA_TEXT;
+
+    if (!::WinSendMsg( GetHWND()
+                      ,CM_QUERYRECORDRECT
+                      ,MPFROMP(&vRectRecord)
+                      ,MPFROMP(&vQuery)
+                     ))
+        return FALSE;
+    rRect.SetLeft(vRectRecord.xLeft);
+    rRect.SetTop(vRectRecord.yTop);
+    rRect.SetRight(vRectRecord.xRight);
+    rRect.SetBottom(vRectRecord.yBottom);
+    return TRUE;
+} // end of wxTreeCtrl::GetBoundingRect
+
+// ----------------------------------------------------------------------------
+// sorting stuff
+// ----------------------------------------------------------------------------
+
+SHORT EXPENTRY InternalDataCompareTreeFunc (
+  PMYRECORD                         p1
+, PMYRECORD                         p2
+, PVOID                             pStorage
+)
+{
+    wxCHECK_MSG( p1 && p2, 0,
+                 wxT("sorting tree without data doesn't make sense") );
+
+    wxTreeCtrl*                     pTree = (wxTreeCtrl*)pStorage;
+
+    return pTree->OnCompareItems( p1->m_ulItemId
+                                 ,p2->m_ulItemId
+                                );
+} // end of wxTreeSortHelper::Compare
+
+int wxTreeCtrl::OnCompareItems (
+  const wxTreeItemId&               rItem1
+, const wxTreeItemId&               rItem2
+)
+{
+    return wxStrcmp( GetItemText(rItem1)
+                    ,GetItemText(rItem2)
+                   );
+} // end of wxTreeCtrl::OnCompareItems
+
+void wxTreeCtrl::SortChildren (
+  const wxTreeItemId&               rItem
+)
+{
+    ::WinSendMsg( GetHWND()
+                 ,CM_SORTRECORD
+                 ,(PFN)InternalDataCompareTreeFunc
+                 ,NULL
+                );
+} // end of wxTreeCtrl::SortChildren
+
+// ----------------------------------------------------------------------------
+// implementation
+// ----------------------------------------------------------------------------
+
+bool wxTreeCtrl::OS2Command (
+  WXUINT                            uCmd
+, WXWORD                            wId
+)
+{
+    if (uCmd == CN_ENDEDIT)
+    {
+        wxCommandEvent              vEvent( wxEVT_COMMAND_TEXT_UPDATED
+                                           ,wId
+                                          );
+
+        vEvent.SetEventObject( this );
+        ProcessCommand(vEvent);
+        return TRUE;
+    }
+    else if (uCmd == CN_KILLFOCUS)
+    {
+        wxCommandEvent              vEvent( wxEVT_KILL_FOCUS
+                                           ,wId
+                                          );
+        vEvent.SetEventObject( this );
+        ProcessCommand(vEvent);
+        return TRUE;
+    }
+    else
+        return FALSE;
+} // end of wxTreeCtrl::OS2Command
+
+//
+// TODO:  Fully implement direct manipulation when I figure it out
+//
+MRESULT wxTreeCtrl::OS2WindowProc (
+  WXUINT                            uMsg
+, WXWPARAM                          wParam
+, WXLPARAM                          lParam
+)
+{
+    bool                            bProcessed = FALSE;
+    MRESULT                         mRc = 0;
+    wxTreeEvent                     vEvent( wxEVT_NULL
+                                           ,m_windowId
+                                          );
+    wxEventType                     vEventType = wxEVT_NULL;
+    PCNRDRAGINIT                    pDragInit = NULL;
+    PCNREDITDATA                    pEditData = NULL;
+    PNOTIFYRECORDENTER              pNotifyEnter = NULL;
+
+    vEvent.SetEventObject(this);
+    switch (uMsg)
+    {
+        case WM_CONTROL:
+            switch(SHORT2FROMMP(wParam))
+            {
+                case CN_INITDRAG:
+                    pDragInit = (PCNRDRAGINIT)lParam;
+                    if (pDragInit)
+                    {
+                        PMYRECORD       pRecord = (PMYRECORD)pDragInit->pRecord;
+
+                        vEventType = wxEVT_COMMAND_TREE_BEGIN_DRAG;
+                        vEvent.m_item        = pRecord->m_ulItemId;
+                        vEvent.m_pointDrag.x = pDragInit->x;
+                        vEvent.m_pointDrag.y = pDragInit->y;
+                    }
+                    break;
+
+                case CN_BEGINEDIT:
+                    pEditData = (PCNREDITDATA)lParam;
+                    if (pEditData)
+                    {
+                        PMYRECORD       pRecord = (PMYRECORD)pEditData->pRecord;
+
+                        vEventType = wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT;
+                        vEvent.m_item = pRecord->m_ulItemId;
+                        vEvent.m_label = pRecord->m_vRecord.pszTree;
+                        vEvent.m_editCancelled = FALSE;
+                    }
+                    break;
+
+                case CN_ENDEDIT:
+                    pEditData = (PCNREDITDATA)lParam;
+                    if (pEditData)
+                    {
+                        PMYRECORD       pRecord = (PMYRECORD)pEditData->pRecord;
+
+                        vEventType = wxEVT_COMMAND_TREE_END_LABEL_EDIT;
+                        vEvent.m_item = pRecord->m_ulItemId;
+                        vEvent.m_label = pRecord->m_vRecord.pszTree;
+                        if (pRecord->m_vRecord.pszTree == NULL)
+                        {
+                            vEvent.m_editCancelled = TRUE;
+                        }
+                        else
+                        {
+                            vEvent.m_editCancelled = FALSE;
+                        }
+                    }
+                    break;
+
+                case CN_EXPANDTREE:
+                    {
+                        PMYRECORD       pRecord = (PMYRECORD)lParam;
+
+                        vEventType = gs_expandEvents[IDX_EXPAND][IDX_DONE];
+                        vEvent.m_item = pRecord->m_ulItemId;
+                    }
+                    break;
+            }
+            vEvent.SetEventType(vEventType);
+            bProcessed = GetEventHandler()->ProcessEvent(vEvent);
+            break;
+    }
+    if (!bProcessed)
+        mRc = wxControl::OS2WindowProc( uMsg
+                                       ,wParam
+                                       ,lParam
+                                      );
+    return mRc;
+} // end of wxTreeCtrl::OS2WindowProc
+
+#endif // wxUSE_TREECTRL
index 8553ee68e20c835d41726db852bcd1ed2cfa013b..99bd6f5a511ccb60901f7f142f3facdd7f9d559d 100644 (file)
@@ -1454,14 +1454,7 @@ void wxWindowOS2::SetDropTarget(
   wxDropTarget*                     pDropTarget
 )
 {
-    if (m_dropTarget != 0)
-    {
-        m_dropTarget->Revoke(m_hWnd);
-        delete m_dropTarget;
-    }
     m_dropTarget = pDropTarget;
-    if (m_dropTarget != 0)
-        m_dropTarget->Register(m_hWnd);
 } // end of wxWindowOS2::SetDropTarget
 #endif
 
@@ -3530,7 +3523,6 @@ bool wxWindowOS2::HandleDestroy()
 #if wxUSE_DRAG_AND_DROP
     if (m_dropTarget != NULL)
     {
-        m_dropTarget->Revoke(m_hWnd);
         delete m_dropTarget;
         m_dropTarget = NULL;
     }
index 2feef34bdabfa37e151c8bdb6c46e9ccc04027a9..1128b755bd28713e7d34cc5062985df2062601d6 100644 (file)
@@ -1056,16 +1056,16 @@ EXPORTS
       __vft16wxDataObjectBase
       __vft18wxCustomDataObject16wxDataObjectBase
       __vft16wxTextDropTarget16wxDropTargetBase
-      ;wxwxSimpleDataObjectListNode::DeleteData()
-      DeleteData__28wxwxSimpleDataObjectListNodeFv
+      ;wxDataObjectBase::IsSupported(const wxDataFormat&,wxDataObjectBase::Direction) const
+      IsSupported__16wxDataObjectBaseCFRC12wxDataFormatQ2_16wxDataObjectBase9Direction
       ;wxDataObjectComposite::wxDataObjectComposite()
       __ct__21wxDataObjectCompositeFv
       ;wxCustomDataObject::TakeData(unsigned int,void*)
       TakeData__18wxCustomDataObjectFUiPv
-      ;wxDataObjectBase::IsSupported(const wxDataFormat&,wxDataObjectBase::Direction) const
-      IsSupported__16wxDataObjectBaseCFRC12wxDataFormatQ2_16wxDataObjectBase9Direction
       ;wxDataObjectComposite::GetPreferredFormat(wxDataObjectBase::Direction) const
       GetPreferredFormat__21wxDataObjectCompositeCFQ2_16wxDataObjectBase9Direction
+      ;wxwxSimpleDataObjectListNode::DeleteData()
+      DeleteData__28wxwxSimpleDataObjectListNodeFv
   ;From object file:  ..\common\docmdi.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxDocMDIParentFrame::wxDocMDIParentFrame(wxDocManager*,wxFrame*,int,const wxString&,const wxPoint&,const wxSize&,long,const wxString&)
@@ -10128,278 +10128,6 @@ EXPORTS
       Adjust__15wxTipWindowViewFRC8wxStringi
       ;wxTipWindowView::sm_eventTableEntries
       sm_eventTableEntries__15wxTipWindowView
-  ;From object file:  ..\generic\treectlg.cpp
-    ;PUBDEFs (Symbols available from object file):
-      ;wxTreeRenameTimer::wxTreeRenameTimer(wxGenericTreeCtrl*)
-      __ct__17wxTreeRenameTimerFP17wxGenericTreeCtrl
-      ;wxTreeTextCtrl::sm_eventTable
-      sm_eventTable__14wxTreeTextCtrl
-      ;wxGenericTreeCtrl::sm_classwxGenericTreeCtrl
-      sm_classwxGenericTreeCtrl__17wxGenericTreeCtrl
-      ;wxGenericTreeCtrl::TagNextChildren(wxGenericTreeItem*,wxGenericTreeItem*,unsigned long)
-      TagNextChildren__17wxGenericTreeCtrlFP17wxGenericTreeItemT1Ul
-      ;wxGenericTreeCtrl::SetItemHasChildren(const wxTreeItemId&,unsigned long)
-      SetItemHasChildren__17wxGenericTreeCtrlFRC12wxTreeItemIdUl
-      ;wxGenericTreeCtrl::ScrollTo(const wxTreeItemId&)
-      ScrollTo__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::OnSetFocus(wxFocusEvent&)
-      OnSetFocus__17wxGenericTreeCtrlFR12wxFocusEvent
-      ;wxGenericTreeCtrl::IsVisible(const wxTreeItemId&) const
-      IsVisible__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetBoundingRect(const wxTreeItemId&,wxRect&,unsigned long) const
-      GetBoundingRect__17wxGenericTreeCtrlCFRC12wxTreeItemIdR6wxRectUl
-      ;wxGenericTreeCtrl::DrawLine(const wxTreeItemId&,unsigned long)
-      DrawLine__17wxGenericTreeCtrlFRC12wxTreeItemIdUl
-      ;wxGenericTreeCtrl::AssignImageList(wxImageList*)
-      AssignImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::GetLineHeight(wxGenericTreeItem*) const
-      GetLineHeight__17wxGenericTreeCtrlCFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::RefreshSubtree(wxGenericTreeItem*)
-      RefreshSubtree__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem*,wxDC&,int,int&)
-      PaintLevel__17wxGenericTreeCtrlFP17wxGenericTreeItemR4wxDCiRi
-      ;wxGenericTreeItem::HitTest(const wxPoint&,const wxGenericTreeCtrl*,int&,int)
-      HitTest__17wxGenericTreeItemFRC7wxPointPC17wxGenericTreeCtrlRii
-      ;wxGenericTreeCtrl::OnRenameTimer()
-      OnRenameTimer__17wxGenericTreeCtrlFv
-      ;wxConstructorForwxGenericTreeCtrl()
-      wxConstructorForwxGenericTreeCtrl__Fv
-      ;wxGenericTreeCtrl::RefreshSelected()
-      RefreshSelected__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::GetFirstVisibleItem() const
-      GetFirstVisibleItem__17wxGenericTreeCtrlCFv
-      ;wxGenericTreeCtrl::CalculateLineHeight()
-      CalculateLineHeight__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::AdjustMyScrollbars()
-      AdjustMyScrollbars__17wxGenericTreeCtrlFv
-      ;wxGenericTreeItem::SetText(const wxString&)
-      SetText__17wxGenericTreeItemFRC8wxString
-      ;wxGenericTreeCtrl::GetSelections(wxArrayTreeItemIds&) const
-      GetSelections__17wxGenericTreeCtrlCFR18wxArrayTreeItemIds
-      ;wxGenericTreeCtrl::FindItem(const wxTreeItemId&,const wxString&) const
-      FindItem__17wxGenericTreeCtrlCFRC12wxTreeItemIdRC8wxString
-      ;wxGenericTreeCtrl::Edit(const wxTreeItemId&)
-      Edit__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxTreeTextCtrl::sm_eventTableEntries
-      sm_eventTableEntries__14wxTreeTextCtrl
-      __vft17wxGenericTreeCtrl8wxObject
-      ;wxGenericTreeCtrl::SetItemBold(const wxTreeItemId&,unsigned long)
-      SetItemBold__17wxGenericTreeCtrlFRC12wxTreeItemIdUl
-      ;wxGenericTreeCtrl::OnKillFocus(wxFocusEvent&)
-      OnKillFocus__17wxGenericTreeCtrlFR12wxFocusEvent
-      ;wxGenericTreeCtrl::IsExpanded(const wxTreeItemId&) const
-      IsExpanded__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeItem::GetSize(int&,int&,const wxGenericTreeCtrl*)
-      GetSize__17wxGenericTreeItemFRiT1PC17wxGenericTreeCtrl
-      ;wxGenericTreeCtrl::GetNext(const wxTreeItemId&) const
-      GetNext__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetNextSibling(const wxTreeItemId&) const
-      GetNextSibling__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::DeleteChildren(const wxTreeItemId&)
-      DeleteChildren__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::Collapse(const wxTreeItemId&)
-      Collapse__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::OnRenameCancelled(wxGenericTreeItem*)
-      OnRenameCancelled__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::SetSpacing(unsigned int)
-      SetSpacing__17wxGenericTreeCtrlFUi
-      ;wxGenericTreeCtrl::PrependItem(const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
-      PrependItem__17wxGenericTreeCtrlFRC12wxTreeItemIdRC8wxStringiT3P14wxTreeItemData
-      ;wxGenericTreeCtrl::DoInsertItem(const wxTreeItemId&,unsigned int,const wxString&,int,int,wxTreeItemData*)
-      DoInsertItem__17wxGenericTreeCtrlFRC12wxTreeItemIdUiRC8wxStringiT4P14wxTreeItemData
-      ;wxGenericTreeCtrl::AppendItem(const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
-      AppendItem__17wxGenericTreeCtrlFRC12wxTreeItemIdRC8wxStringiT3P14wxTreeItemData
-      ;wxGenericTreeCtrl::~wxGenericTreeCtrl()
-      __dt__17wxGenericTreeCtrlFv
-      ;wxConstructorForwxTreeCtrl()
-      wxConstructorForwxTreeCtrl__Fv
-      ;wxGenericTreeCtrl::SetForegroundColour(const wxColour&)
-      SetForegroundColour__17wxGenericTreeCtrlFRC8wxColour
-      ;wxGenericTreeCtrl::GetStateImageList() const
-      GetStateImageList__17wxGenericTreeCtrlCFv
-      ;wxGenericTreeCtrl::GetImageList() const
-      GetImageList__17wxGenericTreeCtrlCFv
-      ;wxGenericTreeCtrl::GetCount() const
-      GetCount__17wxGenericTreeCtrlCFv
-      ;wxGenericTreeCtrl::CalculateSize(wxGenericTreeItem*,wxDC&)
-      CalculateSize__17wxGenericTreeCtrlFP17wxGenericTreeItemR4wxDC
-      ;wxTreeTextCtrl::OnChar(wxKeyEvent&)
-      OnChar__14wxTreeTextCtrlFR10wxKeyEvent
-      ;wxGenericTreeCtrl::sm_eventTableEntries
-      sm_eventTableEntries__17wxGenericTreeCtrl
-      ;wxGenericTreeCtrl::SetItemFont(const wxTreeItemId&,const wxFont&)
-      SetItemFont__17wxGenericTreeCtrlFRC12wxTreeItemIdRC6wxFont
-      ;wxGenericTreeCtrl::SetFont(const wxFont&)
-      SetFont__17wxGenericTreeCtrlFRC6wxFont
-      ;wxGenericTreeCtrl::SetButtonsImageList(wxImageList*)
-      SetButtonsImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::OnPaint(wxPaintEvent&)
-      OnPaint__17wxGenericTreeCtrlFR12wxPaintEvent
-      ;wxTreeTextCtrl::OnKeyUp(wxKeyEvent&)
-      OnKeyUp__14wxTreeTextCtrlFR10wxKeyEvent
-      ;wxGenericTreeCtrl::OnIdle(wxIdleEvent&)
-      OnIdle__17wxGenericTreeCtrlFR11wxIdleEvent
-      ;wxGenericTreeCtrl::IsSelected(const wxTreeItemId&) const
-      IsSelected__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::IsBold(const wxTreeItemId&) const
-      IsBold__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetNextChild(const wxTreeItemId&,long&) const
-      GetNextChild__17wxGenericTreeCtrlCFRC12wxTreeItemIdRl
-      ;wxGenericTreeCtrl::GetItemText(const wxTreeItemId&) const
-      GetItemText__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetItemBackgroundColour(const wxTreeItemId&) const
-      GetItemBackgroundColour__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId&,long&) const
-      GetFirstChild__17wxGenericTreeCtrlCFRC12wxTreeItemIdRl
-      ;wxGenericTreeCtrl::GetChildrenCount(const wxTreeItemId&,unsigned long)
-      GetChildrenCount__17wxGenericTreeCtrlFRC12wxTreeItemIdUl
-      ;wxGenericTreeCtrl::ExpandAll(const wxTreeItemId&)
-      ExpandAll__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::DrawBorder(const wxTreeItemId&)
-      DrawBorder__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::Delete(const wxTreeItemId&)
-      Delete__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::AssignButtonsImageList(wxImageList*)
-      AssignButtonsImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::HitTest(const wxPoint&,int&)
-      HitTest__17wxGenericTreeCtrlFRC7wxPointRi
-      ;wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl*,wxGenericTreeItem*)
-      __ct__14wxTreeTextCtrlFP17wxGenericTreeCtrlP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::GetItemImage(const wxTreeItemId&,wxTreeItemIcon) const
-      GetItemImage__17wxGenericTreeCtrlCFRC12wxTreeItemId14wxTreeItemIcon
-      ;wxGenericTreeItem::~wxGenericTreeItem()
-      __dt__17wxGenericTreeItemFv
-      ;wxGenericTreeCtrl::Unselect()
-      Unselect__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::SetBackgroundColour(const wxColour&)
-      SetBackgroundColour__17wxGenericTreeCtrlFRC8wxColour
-      ;wxGenericTreeCtrl::GetEventTable() const
-      GetEventTable__17wxGenericTreeCtrlCFv
-      ;wxGenericTreeItem::GetCurrentImage() const
-      GetCurrentImage__17wxGenericTreeItemCFv
-      ;wxGenericTreeCtrl::DeleteAllItems()
-      DeleteAllItems__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::CalculatePositions()
-      CalculatePositions__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem*,const wxString&)
-      OnRenameAccept__17wxGenericTreeCtrlFP17wxGenericTreeItemRC8wxString
-      ;wxGenericTreeCtrl::SetItemText(const wxTreeItemId&,const wxString&)
-      SetItemText__17wxGenericTreeCtrlFRC12wxTreeItemIdRC8wxString
-      ;wxGenericTreeCtrl::ItemHasChildren(const wxTreeItemId&) const
-      ItemHasChildren__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::sm_eventTable
-      sm_eventTable__17wxGenericTreeCtrl
-      __vft14wxTreeTextCtrl8wxObject
-      ;wxGenericTreeCtrl::Toggle(const wxTreeItemId&)
-      Toggle__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::SortChildren(const wxTreeItemId&)
-      SortChildren__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::SetStateImageList(wxImageList*)
-      SetStateImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::SetImageList(wxImageList*)
-      SetImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::OnMouse(wxMouseEvent&)
-      OnMouse__17wxGenericTreeCtrlFR12wxMouseEvent
-      ;wxTreeTextCtrl::OnKillFocus(wxFocusEvent&)
-      OnKillFocus__14wxTreeTextCtrlFR12wxFocusEvent
-      ;wxGenericTreeCtrl::OnChar(wxKeyEvent&)
-      OnChar__17wxGenericTreeCtrlFR10wxKeyEvent
-      ;wxGenericTreeCtrl::GetPrevVisible(const wxTreeItemId&) const
-      GetPrevVisible__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetPrevSibling(const wxTreeItemId&) const
-      GetPrevSibling__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetLastChild(const wxTreeItemId&) const
-      GetLastChild__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetItemTextColour(const wxTreeItemId&) const
-      GetItemTextColour__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::Expand(const wxTreeItemId&)
-      Expand__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl*)
-      DeleteChildren__17wxGenericTreeItemFP17wxGenericTreeCtrl
-      ;wxGenericTreeCtrl::AssignStateImageList(wxImageList*)
-      AssignStateImageList__17wxGenericTreeCtrlFP11wxImageList
-      ;wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem*)
-      SendDeleteEvent__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem*)
-      UnselectAllChildren__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::SetItemData(const wxTreeItemId&,wxTreeItemData*)
-      SetItemData__17wxGenericTreeCtrlFRC12wxTreeItemIdP14wxTreeItemData
-      ;wxGenericTreeCtrl::SetIndent(unsigned int)
-      SetIndent__17wxGenericTreeCtrlFUi
-      ;wxGenericTreeCtrl::OnCompareItems(const wxTreeItemId&,const wxTreeItemId&)
-      OnCompareItems__17wxGenericTreeCtrlFRC12wxTreeItemIdT1
-      ;wxGenericTreeCtrl::InsertItem(const wxTreeItemId&,unsigned int,const wxString&,int,int,wxTreeItemData*)
-      InsertItem__17wxGenericTreeCtrlFRC12wxTreeItemIdUiRC8wxStringiT4P14wxTreeItemData
-      ;wxGenericTreeCtrl::InsertItem(const wxTreeItemId&,const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
-      InsertItem__17wxGenericTreeCtrlFRC12wxTreeItemIdT1RC8wxStringiT4P14wxTreeItemData
-      ;wxGenericTreeCtrl::CalculateLevel(wxGenericTreeItem*,wxDC&,int,int&)
-      CalculateLevel__17wxGenericTreeCtrlFP17wxGenericTreeItemR4wxDCiRi
-      ;wxGenericTreeCtrl::AddRoot(const wxString&,int,int,wxTreeItemData*)
-      AddRoot__17wxGenericTreeCtrlFRC8wxStringiT2P14wxTreeItemData
-      ;wxGenericTreeCtrl::Init()
-      Init__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::SetItemImage(const wxTreeItemId&,int,wxTreeItemIcon)
-      SetItemImage__17wxGenericTreeCtrlFRC12wxTreeItemIdi14wxTreeItemIcon
-      ;wxGenericTreeCtrl::SelectItem(const wxTreeItemId&,unsigned long,unsigned long)
-      SelectItem__17wxGenericTreeCtrlFRC12wxTreeItemIdUlT2
-      ;wxGenericTreeCtrl::ResetTextControl()
-      ResetTextControl__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::GetButtonsImageList() const
-      GetButtonsImageList__17wxGenericTreeCtrlCFv
-      ;wxTreeTextCtrl::AcceptChanges()
-      AcceptChanges__14wxTreeTextCtrlFv
-      ;wxGenericTreeCtrl::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxValidator&,const wxString&)
-      Create__17wxGenericTreeCtrlFP8wxWindowiRC7wxPointRC6wxSizelRC11wxValidatorRC8wxString
-      ;wxGenericTreeCtrl::PaintItem(wxGenericTreeItem*,wxDC&)
-      PaintItem__17wxGenericTreeCtrlFP17wxGenericTreeItemR4wxDC
-      ;wxGenericTreeItem::GetChildrenCount(unsigned long) const
-      GetChildrenCount__17wxGenericTreeItemCFUl
-      ;wxTreeCtrl::sm_classwxTreeCtrl
-      sm_classwxTreeCtrl__10wxTreeCtrl
-      __vft17wxTreeRenameTimer8wxObject
-      ;wxGenericTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem*,wxGenericTreeItem*,unsigned long)
-      TagAllChildrenUntilLast__17wxGenericTreeCtrlFP17wxGenericTreeItemT1Ul
-      ;wxGenericTreeCtrl::SetWindowStyle(const long)
-      SetWindowStyle__17wxGenericTreeCtrlFCl
-      ;wxGenericTreeCtrl::GetNextVisible(const wxTreeItemId&) const
-      GetNextVisible__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetItemParent(const wxTreeItemId&) const
-      GetItemParent__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetItemFont(const wxTreeItemId&) const
-      GetItemFont__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::GetItemData(const wxTreeItemId&) const
-      GetItemData__17wxGenericTreeCtrlCFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId&)
-      EnsureVisible__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId&)
-      CollapseAndReset__17wxGenericTreeCtrlFRC12wxTreeItemId
-      ;wxGenericTreeItem::wxGenericTreeItem(wxGenericTreeItem*,const wxString&,int,int,wxTreeItemData*)
-      __ct__17wxGenericTreeItemFP17wxGenericTreeItemRC8wxStringiT3P14wxTreeItemData
-      ;wxGenericTreeCtrl::SelectItemRange(wxGenericTreeItem*,wxGenericTreeItem*)
-      SelectItemRange__17wxGenericTreeCtrlFP17wxGenericTreeItemT1
-      ;wxGenericTreeCtrl::RefreshSelectedUnder(wxGenericTreeItem*)
-      RefreshSelectedUnder__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::RefreshLine(wxGenericTreeItem*)
-      RefreshLine__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxGenericTreeCtrl::DrawDropEffect(wxGenericTreeItem*)
-      DrawDropEffect__17wxGenericTreeCtrlFP17wxGenericTreeItem
-      ;wxTreeRenameTimer::Notify()
-      Notify__17wxTreeRenameTimerFv
-      __vft17wxGenericTreeCtrl14wxScrollHelper
-      ;wxGenericTreeCtrl::UnselectAll()
-      UnselectAll__17wxGenericTreeCtrlFv
-      ;wxGenericTreeCtrl::SetItemTextColour(const wxTreeItemId&,const wxColour&)
-      SetItemTextColour__17wxGenericTreeCtrlFRC12wxTreeItemIdRC8wxColour
-      ;wxGenericTreeCtrl::SetItemBackgroundColour(const wxTreeItemId&,const wxColour&)
-      SetItemBackgroundColour__17wxGenericTreeCtrlFRC12wxTreeItemIdRC8wxColour
-      ;wxTreeTextCtrl::GetEventTable() const
-      GetEventTable__14wxTreeTextCtrlCFv
-      ;wxGenericTreeCtrl::GetEditControl() const
-      GetEditControl__17wxGenericTreeCtrlCFv
-      ;wxTreeTextCtrl::Finish()
-      Finish__14wxTreeTextCtrlFv
-      ;wxGenericTreeCtrl::FillArray(wxGenericTreeItem*,wxArrayTreeItemIds&) const
-      FillArray__17wxGenericTreeCtrlCFP17wxGenericTreeItemR18wxArrayTreeItemIds
   ;From object file:  ..\generic\treelay.cpp
   ;From object file:  ..\generic\wizard.cpp
   ;From object file:  ..\html\helpctrl.cpp
@@ -11962,57 +11690,47 @@ EXPORTS
       wxMDIFrameClassNameNoRedraw
   ;From object file:  ..\os2\dataobj.cpp
     ;PUBDEFs (Symbols available from object file):
-      ;wxDataFormat::wxDataFormat()
-      __ct__12wxDataFormatFv
       ;wxBitmapDataObject::SetData(unsigned int,const void*)
       SetData__18wxBitmapDataObjectFUiPCv
-      ;wxDataFormat::SetId(unsigned short)
-      SetId__12wxDataFormatFUs
-      ;wxDataFormat::wxDataFormat(wxDataFormatId)
-      __ct__12wxDataFormatF14wxDataFormatId
-      ;wxDataObject::IsSupportedFormat(const wxDataFormat&,wxDataObjectBase::Direction) const
-      IsSupportedFormat__12wxDataObjectCFRC12wxDataFormatQ2_16wxDataObjectBase9Direction
+      ;CIDataObject::SetData(const wxDataFormat&,char*)
+      SetData__12CIDataObjectFRC12wxDataFormatPc
       ;wxFileDataObject::GetDataHere(void*) const
       GetDataHere__16wxFileDataObjectCFPv
       ;wxDataFormat::SetId(const char*)
       SetId__12wxDataFormatFPCc
+      ;CIDataObject::QueryGetData(const wxDataFormat&)
+      QueryGetData__12CIDataObjectFRC12wxDataFormat
       ;wxBitmapDataObject::wxBitmapDataObject(const wxBitmap&)
       __ct__18wxBitmapDataObjectFRC8wxBitmap
       __vft16wxFileDataObject16wxDataObjectBase
       ;wxBitmapDataObject::~wxBitmapDataObject()
       __dt__18wxBitmapDataObjectFv
-      ;wxDataFormat::wxDataFormat(const wxString&)
-      __ct__12wxDataFormatFRC8wxString
       ;wxFileDataObject::AddFile(const wxString&)
       AddFile__16wxFileDataObjectFRC8wxString
+      ;CIDataObject::GetData(const wxDataFormat&,char*,unsigned long)
+      GetData__12CIDataObjectFRC12wxDataFormatPcUl
       ;wxBitmapDataObject::SetBitmap(const wxBitmap&)
       SetBitmap__18wxBitmapDataObjectFRC8wxBitmap
       __vft18wxBitmapDataObject16wxDataObjectBase
-      ;wxDataFormat::PrepareFormats()
-      PrepareFormats__12wxDataFormatFv
+      ;wxDataObject::~wxDataObject()
+      __dt__12wxDataObjectFv
       ;wxBitmapDataObject::wxBitmapDataObject()
       __ct__18wxBitmapDataObjectFv
       ;wxFileDataObject::SetData(unsigned int,const void*)
       SetData__16wxFileDataObjectFUiPCv
       ;wxBitmapDataObject::GetDataHere(void*) const
       GetDataHere__18wxBitmapDataObjectCFPv
-      ;wxDataFormat::SetType(wxDataFormatId)
-      SetType__12wxDataFormatF14wxDataFormatId
+      ;CIDataObject::GetDataHere(const wxDataFormat&,char*,unsigned long)
+      GetDataHere__12CIDataObjectFRC12wxDataFormatPcUl
       __vft12wxDataObject16wxDataObjectBase
       ;wxDataObject::wxDataObject()
       __ct__12wxDataObjectFv
-      ;wxDataFormat::GetType() const
-      GetType__12wxDataFormatCFv
       ;wxDataFormat::GetId() const
       GetId__12wxDataFormatCFv
       ;wxFileDataObject::GetDataSize() const
       GetDataSize__16wxFileDataObjectCFv
       ;wxBitmapDataObject::DoConvertToPng()
       DoConvertToPng__18wxBitmapDataObjectFv
-      ;wxDataFormat::wxDataFormat(const char*)
-      __ct__12wxDataFormatFPCc
-      ;wxDataFormat::wxDataFormat(unsigned short)
-      __ct__12wxDataFormatFUs
   ;From object file:  ..\os2\dc.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxDC::SetFont(const wxFont&)
@@ -12359,32 +12077,38 @@ EXPORTS
       OnData__12wxDropTargetFiT112wxDragResult
       __vft12wxDropTarget16wxDropTargetBase
       __vft12wxDropSource16wxDropSourceBase
+      ;CIDropTarget::DragOver()
+      DragOver__12CIDropTargetFv
       ;wxDropSource::~wxDropSource()
       __dt__12wxDropSourceFv
       ;wxDropTarget::wxDropTarget(wxDataObject*)
       __ct__12wxDropTargetFP12wxDataObject
-      ;wxDropTarget::Revoke(unsigned long)
-      Revoke__12wxDropTargetFUl
-      ;wxDropTarget::Register(unsigned long)
-      Register__12wxDropTargetFUl
       ;wxDropTarget::OnDrop(int,int)
       OnDrop__12wxDropTargetFiT1
       ;wxDropTarget::GetData()
       GetData__12wxDropTargetFv
-      ;wxDropSource::wxDropSource(wxWindow*)
-      __ct__12wxDropSourceFP8wxWindow
+      ;wxDropTarget::IsAcceptedData(_DRAGINFO*) const
+      IsAcceptedData__12wxDropTargetCFP9_DRAGINFO
       ;wxDropSource::wxDropSource(wxDataObject&,wxWindow*)
       __ct__12wxDropSourceFR12wxDataObjectP8wxWindow
-      ;wxDropTarget::OnDragOver(int,int,wxDragResult)
-      OnDragOver__12wxDropTargetFiT112wxDragResult
+      ;wxDropSource::wxDropSource(wxWindow*)
+      __ct__12wxDropSourceFP8wxWindow
       ;wxDropTarget::~wxDropTarget()
       __dt__12wxDropTargetFv
+      ;CIDropTarget::Drop()
+      Drop__12CIDropTargetFv
+      ;wxDropTarget::GetSupportedFormat(_DRAGINFO*) const
+      GetSupportedFormat__12wxDropTargetCFP9_DRAGINFO
+      ;CIDropTarget::DragLeave()
+      DragLeave__12CIDropTargetFv
+      ;wxDropTarget::Release()
+      Release__12wxDropTargetFv
+      ;wxDropSource::GiveFeedback(wxDragResult)
+      GiveFeedback__12wxDropSourceF12wxDragResult
       ;wxDropSource::DoDragDrop(int)
       DoDragDrop__12wxDropSourceFi
       ;wxDropSource::Init()
       Init__12wxDropSourceFv
-      ;wxDropTarget::IsAcceptable(_DRAGINFO*)
-      IsAcceptable__12wxDropTargetFP9_DRAGINFO
   ;From object file:  ..\os2\filedlg.cpp
     ;PUBDEFs (Symbols available from object file):
       ;wxSaveFileSelector(const char*,const char*,const char*,wxWindow*)
@@ -14720,6 +14444,190 @@ EXPORTS
       SendSizeEvent__19wxTopLevelWindowOS2Fv
       wxDlgProc
       wxModelessWindows
+  ;From object file:  ..\os2\treectrl.cpp
+    ;PUBDEFs (Symbols available from object file):
+      ;wxTreeTraversal::DoTraverse(const wxTreeItemId&,unsigned long)
+      DoTraverse__15wxTreeTraversalFRC12wxTreeItemIdUl
+      ;wxTreeTraversal::Traverse(const wxTreeItemId&,unsigned long)
+      Traverse__15wxTreeTraversalFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::RefreshItem(const wxTreeItemId&)
+      RefreshItem__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::HasIndirectData(const wxTreeItemId&) const
+      HasIndirectData__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetBoundingRect(const wxTreeItemId&,wxRect&,unsigned long) const
+      GetBoundingRect__10wxTreeCtrlCFRC12wxTreeItemIdR6wxRectUl
+      ;wxTreeCtrl::EndEditLabel(const wxTreeItemId&,unsigned long)
+      EndEditLabel__10wxTreeCtrlFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::Collapse(const wxTreeItemId&)
+      Collapse__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::CollapseAndReset(const wxTreeItemId&)
+      CollapseAndReset__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::SetAnyImageList(wxImageList*,int)
+      SetAnyImageList__10wxTreeCtrlFP11wxImageListi
+      ;wxTreeCtrl::InsertItem(const wxTreeItemId&,unsigned int,const wxString&,int,int,wxTreeItemData*)
+      InsertItem__10wxTreeCtrlFRC12wxTreeItemIdUiRC8wxStringiT4P14wxTreeItemData
+      ;wxTreeCtrl::Init()
+      Init__10wxTreeCtrlFv
+      ;wxTreeCtrl::GetRootItem() const
+      GetRootItem__10wxTreeCtrlCFv
+      ;wxTreeCtrl::GetIndent() const
+      GetIndent__10wxTreeCtrlCFv
+      ;FindOS2TreeRecordByID(unsigned long,long)
+      FindOS2TreeRecordByID__FUll
+      __vft10wxTreeCtrl8wxObject
+      ;wxTreeCtrl::SortChildren(const wxTreeItemId&)
+      SortChildren__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::SetItemHasChildren(const wxTreeItemId&,unsigned long)
+      SetItemHasChildren__10wxTreeCtrlFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::IsBold(const wxTreeItemId&) const
+      IsBold__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetPrevVisible(const wxTreeItemId&) const
+      GetPrevVisible__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetPrevSibling(const wxTreeItemId&) const
+      GetPrevSibling__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetNextSibling(const wxTreeItemId&) const
+      GetNextSibling__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::DoInsertItem(const wxTreeItemId&,wxTreeItemId,const wxString&,int,int,wxTreeItemData*)
+      DoInsertItem__10wxTreeCtrlFRC12wxTreeItemId12wxTreeItemIdRC8wxStringiT4P14wxTreeItemData
+      ;wxTreeCtrl::OnCompareItems(const wxTreeItemId&,const wxTreeItemId&)
+      OnCompareItems__10wxTreeCtrlFRC12wxTreeItemIdT1
+      ;wxConstructorForwxTreeCtrl()
+      wxConstructorForwxTreeCtrl__Fv
+      ;wxTreeCtrl::UnselectAll()
+      UnselectAll__10wxTreeCtrlFv
+      ;wxTreeCtrl::SetItemTextColour(const wxTreeItemId&,const wxColour&)
+      SetItemTextColour__10wxTreeCtrlFRC12wxTreeItemIdRC8wxColour
+      ;wxTreeCtrl::SetItemBackgroundColour(const wxTreeItemId&,const wxColour&)
+      SetItemBackgroundColour__10wxTreeCtrlFRC12wxTreeItemIdRC8wxColour
+      ;wxTreeCtrl::GetStateImageList() const
+      GetStateImageList__10wxTreeCtrlCFv
+      ;wxTreeCtrl::GetCount() const
+      GetCount__10wxTreeCtrlCFv
+      ;wxTreeCtrl::Create(wxWindow*,int,const wxPoint&,const wxSize&,long,const wxValidator&,const wxString&)
+      Create__10wxTreeCtrlFP8wxWindowiRC7wxPointRC6wxSizelRC11wxValidatorRC8wxString
+      ;wxTreeCtrl::SetImageList(wxImageList*)
+      SetImageList__10wxTreeCtrlFP11wxImageList
+      ;wxTreeCtrl::SetStateImageList(wxImageList*)
+      SetStateImageList__10wxTreeCtrlFP11wxImageList
+      ;wxTreeCtrl::SetItemCheck(const wxTreeItemId&,unsigned long)
+      SetItemCheck__10wxTreeCtrlFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::ScrollTo(const wxTreeItemId&)
+      ScrollTo__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::IsVisible(const wxTreeItemId&) const
+      IsVisible__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::InsertItem(const wxTreeItemId&,const wxString&,int,int,long)
+      InsertItem__10wxTreeCtrlFRC12wxTreeItemIdRC8wxStringiT3l
+      ;wxTreeCtrl::GetNextChild(const wxTreeItemId&,long&) const
+      GetNextChild__10wxTreeCtrlCFRC12wxTreeItemIdRl
+      ;wxTreeCtrl::GetLastChild(const wxTreeItemId&) const
+      GetLastChild__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemText(const wxTreeItemId&) const
+      GetItemText__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemParent(const wxTreeItemId&) const
+      GetItemParent__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemFont(const wxTreeItemId&) const
+      GetItemFont__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::AssignStateImageList(wxImageList*)
+      AssignStateImageList__10wxTreeCtrlFP11wxImageList
+      ;wxTreeCtrl::HitTest(const wxPoint&,int&)
+      HitTest__10wxTreeCtrlFRC7wxPointRi
+      ;wxTreeCtrl::SetIndirectItemData(const wxTreeItemId&,wxTreeItemIndirectData*)
+      SetIndirectItemData__10wxTreeCtrlFRC12wxTreeItemIdP22wxTreeItemIndirectData
+      ;wxTreeCtrl::PrependItem(const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
+      PrependItem__10wxTreeCtrlFRC12wxTreeItemIdRC8wxStringiT3P14wxTreeItemData
+      ;wxTreeCtrl::InsertItem(const wxTreeItemId&,const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
+      InsertItem__10wxTreeCtrlFRC12wxTreeItemIdT1RC8wxStringiT4P14wxTreeItemData
+      ;wxTreeCtrl::ExpandItem(const wxTreeItemId&,int)
+      ExpandItem__10wxTreeCtrlFRC12wxTreeItemIdi
+      ;wxTreeCtrl::AppendItem(const wxTreeItemId&,const wxString&,int,int,wxTreeItemData*)
+      AppendItem__10wxTreeCtrlFRC12wxTreeItemIdRC8wxStringiT3P14wxTreeItemData
+      ;wxTreeCtrl::GetItemImage(const wxTreeItemId&,wxTreeItemIcon) const
+      GetItemImage__10wxTreeCtrlCFRC12wxTreeItemId14wxTreeItemIcon
+      ;wxTreeCtrl::~wxTreeCtrl()
+      __dt__10wxTreeCtrlFv
+      ;wxTreeCtrl::SetForegroundColour(const wxColour&)
+      SetForegroundColour__10wxTreeCtrlFRC8wxColour
+      ;wxTreeCtrl::SetBackgroundColour(const wxColour&)
+      SetBackgroundColour__10wxTreeCtrlFRC8wxColour
+      ;wxTreeCtrl::DoSetItemImages(const wxTreeItemId&,int,int)
+      DoSetItemImages__10wxTreeCtrlFRC12wxTreeItemIdiT2
+      ;wxTreeCtrl::GetSelections(wxArrayTreeItemIds&) const
+      GetSelections__10wxTreeCtrlCFR18wxArrayTreeItemIds
+      ;wxTreeCtrl::EditLabel(const wxTreeItemId&,wxClassInfo*)
+      EditLabel__10wxTreeCtrlFRC12wxTreeItemIdP11wxClassInfo
+      ;wxTreeCtrl::GetFirstChild(const wxTreeItemId&,long&) const
+      GetFirstChild__10wxTreeCtrlCFRC12wxTreeItemIdRl
+      ;wxTreeCtrl::SetItemFont(const wxTreeItemId&,const wxFont&)
+      SetItemFont__10wxTreeCtrlFRC12wxTreeItemIdRC6wxFont
+      ;wxTreeCtrl::SetItemDropHighlight(const wxTreeItemId&,unsigned long)
+      SetItemDropHighlight__10wxTreeCtrlFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::IsSelected(const wxTreeItemId&) const
+      IsSelected__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::IsExpanded(const wxTreeItemId&) const
+      IsExpanded__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetNextVisible(const wxTreeItemId&) const
+      GetNextVisible__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemTextColour(const wxTreeItemId&) const
+      GetItemTextColour__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemData(const wxTreeItemId&) const
+      GetItemData__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::Delete(const wxTreeItemId&)
+      Delete__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::AssignImageList(wxImageList*)
+      AssignImageList__10wxTreeCtrlFP11wxImageList
+      ;wxTreeCtrl::SetItemData(const wxTreeItemId&,wxTreeItemData*)
+      SetItemData__10wxTreeCtrlFRC12wxTreeItemIdP14wxTreeItemData
+      ;wxTreeCtrl::GetFirstVisibleItem() const
+      GetFirstVisibleItem__10wxTreeCtrlCFv
+      ;wxTreeCtrl::Unselect()
+      Unselect__10wxTreeCtrlFv
+      ;wxTreeCtrl::SetItemText(const wxTreeItemId&,const wxString&)
+      SetItemText__10wxTreeCtrlFRC12wxTreeItemIdRC8wxString
+      InternalDataCompareTreeFunc
+      ;BumpTreeRecordIds(unsigned long,_MYRECORD*)
+      BumpTreeRecordIds__FUlP9_MYRECORD
+      ;wxTreeCtrl::sm_classwxTreeCtrl
+      sm_classwxTreeCtrl__10wxTreeCtrl
+      ;wxTreeCtrl::Toggle(const wxTreeItemId&)
+      Toggle__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::SetItemBold(const wxTreeItemId&,unsigned long)
+      SetItemBold__10wxTreeCtrlFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::SelectItem(const wxTreeItemId&)
+      SelectItem__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::ItemHasChildren(const wxTreeItemId&) const
+      ItemHasChildren__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::IsItemChecked(const wxTreeItemId&) const
+      IsItemChecked__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetItemBackgroundColour(const wxTreeItemId&) const
+      GetItemBackgroundColour__10wxTreeCtrlCFRC12wxTreeItemId
+      ;wxTreeCtrl::GetChildrenCount(const wxTreeItemId&,unsigned long) const
+      GetChildrenCount__10wxTreeCtrlCFRC12wxTreeItemIdUl
+      ;wxTreeCtrl::Expand(const wxTreeItemId&)
+      Expand__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::EnsureVisible(const wxTreeItemId&)
+      EnsureVisible__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::DeleteChildren(const wxTreeItemId&)
+      DeleteChildren__10wxTreeCtrlFRC12wxTreeItemId
+      ;wxTreeCtrl::SetIndent(unsigned int)
+      SetIndent__10wxTreeCtrlFUi
+      ;wxTreeCtrl::AddRoot(const wxString&,int,int,wxTreeItemData*)
+      AddRoot__10wxTreeCtrlFRC8wxStringiT2P14wxTreeItemData
+      ;wxTreeCtrl::GetImageList() const
+      GetImageList__10wxTreeCtrlCFv
+      ;wxTreeCtrl::SetItemImage(const wxTreeItemId&,int,wxTreeItemIcon)
+      SetItemImage__10wxTreeCtrlFRC12wxTreeItemIdi14wxTreeItemIcon
+      ;wxTreeCtrl::OS2WindowProc(unsigned int,void*,void*)
+      OS2WindowProc__10wxTreeCtrlFUiPvT2
+      ;wxTreeCtrl::GetSelection() const
+      GetSelection__10wxTreeCtrlCFv
+      ;wxTreeCtrl::DoSetItemImageFromData(const wxTreeItemId&,int,wxTreeItemIcon) const
+      DoSetItemImageFromData__10wxTreeCtrlCFRC12wxTreeItemIdi14wxTreeItemIcon
+      ;wxTreeCtrl::DoGetItemImageFromData(const wxTreeItemId&,wxTreeItemIcon) const
+      DoGetItemImageFromData__10wxTreeCtrlCFRC12wxTreeItemId14wxTreeItemIcon
+      ;wxTreeCtrl::DeleteAllItems()
+      DeleteAllItems__10wxTreeCtrlFv
+      ;wxTreeCtrl::OS2Command(unsigned int,unsigned short)
+      OS2Command__10wxTreeCtrlFUiUs
   ;From object file:  ..\os2\utils.cpp
     ;PUBDEFs (Symbols available from object file):
       gs_wxBusyCursorOld