Modified generic wxTreeCtrl to work under non-Unix platforms simultaneously
authorJulian Smart <julian@anthemion.co.uk>
Fri, 4 Aug 2000 13:59:45 +0000 (13:59 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 4 Aug 2000 13:59:45 +0000 (13:59 +0000)
with the native control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

24 files changed:
distrib/msw/tmake/filelist.txt
distrib/msw/tmake/makeall.bat
include/wx/generic/treectlg.h [new file with mode: 0644]
include/wx/generic/treectrl.h [deleted file]
include/wx/msw/treectrl.h
include/wx/treebase.h [new file with mode: 0644]
include/wx/treectrl.h
samples/treectrl/treectrl.cpp
samples/treectrl/treectrl.h
src/common/treebase.cpp [new file with mode: 0644]
src/gtk/files.lst
src/gtk1/files.lst
src/motif/files.lst
src/msw/makefile.b32
src/msw/makefile.bcc
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.sc
src/msw/makefile.vc
src/msw/makefile.wat
src/msw/treectrl.cpp
src/os2/files.lst
src/wxvc.dsp
src/wxvc_dll.dsp

index 3b9311b7de9e1805d493bc380735ce883d0cd096..009ee6e7d9d80662e54f5ebe2506f0f01def6664 100644 (file)
@@ -101,7 +101,7 @@ numdlgg.cpp G
 tbarsmpl.cpp   G
 textdlgg.cpp   G
 tipdlg.cpp     G
-treectrl.cpp   G       16
+treectlg.cpp   G       16
 treelay.cpp    G
 wizard.cpp     G
 
@@ -193,6 +193,7 @@ textcmn.cpp C
 textfile.cpp   C       B
 timercmn.cpp   C       B
 tokenzr.cpp    C       B
+treebase.cpp   C       B
 txtstrm.cpp    C       B
 unzip.c        C       B
 url.cpp        C       S,B
@@ -722,6 +723,7 @@ tipdlg.h    W
 tokenzr.h      W       B
 toolbar.h      W
 tooltip.h      W
+treebase.h     W
 treectrl.h     W
 types.h        W
 url.h  W       B
@@ -1115,7 +1117,7 @@ splitter.h        N
 statusbr.h     N
 tabg.h N       16
 textdlgg.h     N
-treectrl.h     N       16
+treectlg.h     N       16
 wizard.h       N
 
 # vi: set noet ts=16 nolist:
index 498080c7689553a509aa729b2da20628ab7d16a6..74c3b4168ea5ca490742b989f16df4d107d03c6b 100755 (executable)
@@ -11,6 +11,9 @@ rem tmake. The environment variable WX or WXWIN should be defined and contain
 rem the root directory of wxWindows installation. TMAKE program should be in
 rem path or, alternatively, TMAKE environment variable should be set.
 
+rem set tmakecmd=E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake
+set tmakecmd=c:\progra~1\tmake\bin\tmake
+
 if "x%WX%" == "x" goto skip
 set WXDIR=%WX%
 goto ok
@@ -36,21 +39,21 @@ rem 4nt.exe, so I preferred to unroll it.
 rem for %%c in (b32 bcc dos g95 sc vc wat) %TM% -t %c% wxwin.pro -o %WXDIR%\src\msw\makefile.%c%
 
 echo Generating for Visual C++ 4.0...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t vc wxwin.pro -o %WXDIR%\src\msw\makefile.vc
+%tmakecmd% -t vc wxwin.pro -o %WXDIR%\src\msw\makefile.vc
 echo Generating for Borland C++ (32 bits)...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t b32 wxwin.pro -o %WXDIR%\src\msw\makefile.b32
+%tmakecmd% -t b32 wxwin.pro -o %WXDIR%\src\msw\makefile.b32
 echo Generating for Visual C++ 1.52...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t dos wxwin.pro -o %WXDIR%\src\msw\makefile.dos
+%tmakecmd% -t dos wxwin.pro -o %WXDIR%\src\msw\makefile.dos
 echo Generating for Borland C++ (16 bits)...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t bcc wxwin.pro -o %WXDIR%\src\msw\makefile.bcc
+%tmakecmd% -t bcc wxwin.pro -o %WXDIR%\src\msw\makefile.bcc
 echo Generating for Cygwin/Mingw32
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t g95 wxwin.pro -o %WXDIR%\src\msw\makefile.g95
+%tmakecmd% -t g95 wxwin.pro -o %WXDIR%\src\msw\makefile.g95
 echo Generating for Symantec C++...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t sc wxwin.pro -o %WXDIR%\src\msw\makefile.sc
+%tmakecmd% -t sc wxwin.pro -o %WXDIR%\src\msw\makefile.sc
 echo Generating for Watcom C++...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t wat wxwin.pro -o %WXDIR%\src\msw\makefile.wat
+%tmakecmd% -t wat wxwin.pro -o %WXDIR%\src\msw\makefile.wat
 echo Generating for Unix and Configure...
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t gtk wxwin.pro -o %WXDIR%\src\gtk\files.lst
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t motif wxwin.pro -o %WXDIR%\src\motif\files.lst
-E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake -t os2 wxwin.pro -o %WXDIR%\src\os2\files.lst
+%tmakecmd% -t gtk wxwin.pro -o %WXDIR%\src\gtk\files.lst
+%tmakecmd% -t motif wxwin.pro -o %WXDIR%\src\motif\files.lst
+%tmakecmd% -t os2 wxwin.pro -o %WXDIR%\src\os2\files.lst
 :end
diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h
new file mode 100644 (file)
index 0000000..4d48f81
--- /dev/null
@@ -0,0 +1,398 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        treectrl.h
+// Purpose:     wxTreeCtrl class
+// Author:      Robert Roebling
+// Modified by:
+// Created:     01/02/97
+// RCS-ID:      $Id$
+// Copyright:   (c) 1997,1998 Robert Roebling
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _GENERIC_TREECTRL_H_
+#define _GENERIC_TREECTRL_H_
+
+#ifdef __GNUG__
+    #pragma interface "treectrg.h"
+#endif
+
+#include "wx/defs.h"
+#include "wx/string.h"
+#include "wx/object.h"
+#include "wx/event.h"
+#include "wx/scrolwin.h"
+#include "wx/textctrl.h"
+#include "wx/pen.h"
+#include "wx/dynarray.h"
+#include "wx/timer.h"
+#include "wx/treebase.h"
+
+// -----------------------------------------------------------------------------
+// forward declaration
+// -----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxImageList;
+class WXDLLEXPORT wxGenericTreeItem;
+
+class WXDLLEXPORT wxTreeItemData;
+
+class WXDLLEXPORT wxTreeRenameTimer;
+class WXDLLEXPORT wxTreeTextCtrl;
+
+// -----------------------------------------------------------------------------
+// wxGenericTreeCtrl - the tree control
+// -----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxGenericTreeCtrl : public wxScrolledWindow
+{
+public:
+    // creation
+    // --------
+    wxGenericTreeCtrl() { Init(); }
+
+    wxGenericTreeCtrl(wxWindow *parent, wxWindowID id = -1,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
+               long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
+               const wxValidator &validator = wxDefaultValidator,
+               const wxString& name = wxTreeCtrlNameStr)
+    {
+        Create(parent, id, pos, size, style, validator, name);
+    }
+
+    virtual ~wxGenericTreeCtrl();
+
+    bool Create(wxWindow *parent, wxWindowID id = -1,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
+                const wxValidator &validator = wxDefaultValidator,
+                const wxString& name = wxTreeCtrlNameStr);
+
+    // accessors
+    // ---------
+
+        // get the total number of items in the control
+    size_t GetCount() 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() const { return m_indent; }
+    void SetIndent(unsigned int indent);
+
+        // spacing is the number of pixels between the start and the Text
+    unsigned int GetSpacing() const { return m_spacing; }
+    void SetSpacing(unsigned int spacing);
+
+        // 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.
+        //
+        // The normal image list is for the icons which correspond to the
+        // normal tree item state (whether it is selected or not).
+        // Additionally, the application might choose to show a state icon
+        // which corresponds to an app-defined item state (for example,
+        // checked/unchecked) which are taken from the state image list.
+    wxImageList *GetImageList() const;
+    wxImageList *GetStateImageList() const;
+
+    void SetImageList(wxImageList *imageList);
+    void SetStateImageList(wxImageList *imageList);
+
+    // Functions to work with tree ctrl items.
+
+    // accessors
+    // ---------
+
+        // retrieve items label
+    wxString GetItemText(const wxTreeItemId& item) const;
+        // get one of the images associated with the item (normal by default)
+    int GetItemImage(const wxTreeItemId& item,
+                     wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
+        // get the data associated with the item
+    wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
+
+    // modifiers
+    // ---------
+
+        // set items label
+    void SetItemText(const wxTreeItemId& item, const wxString& text);
+        // get one of the images associated with the item (normal by default)
+    void SetItemImage(const wxTreeItemId& item, int image,
+                      wxTreeItemIcon which = wxTreeItemIcon_Normal);
+        // associate some data with the item
+    void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
+
+        // 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& item, bool has = TRUE);
+
+        // the item will be shown in bold
+    void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
+
+        // set the items text colour
+    void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
+
+        // set the items background colour
+    void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
+
+        // set the items font (should be of the same height for all items)
+    void SetItemFont(const wxTreeItemId& item, const wxFont& font);
+
+    // item status inquiries
+    // ---------------------
+
+        // is the item visible (it might be outside the view or not expanded)?
+    bool IsVisible(const wxTreeItemId& item) const;
+        // does the item has any children?
+    bool HasChildren(const wxTreeItemId& item) const
+      { return ItemHasChildren(item); }
+    bool ItemHasChildren(const wxTreeItemId& item) const;
+        // is the item expanded (only makes sense if HasChildren())?
+    bool IsExpanded(const wxTreeItemId& item) const;
+        // is this item currently selected (the same as has focus)?
+    bool IsSelected(const wxTreeItemId& item) const;
+        // is item text in bold font?
+    bool IsBold(const wxTreeItemId& item) 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& item, bool recursively = TRUE);
+
+    // navigation
+    // ----------
+
+    // wxTreeItemId.IsOk() will return FALSE if there is no such item
+
+        // get the root tree item
+    wxTreeItemId GetRootItem() const { return m_anchor; }
+
+        // get the item currently selected (may return NULL if no selection)
+    wxTreeItemId GetSelection() const { return m_current; }
+
+        // get the items currently selected, return the number of such item
+    size_t GetSelections(wxArrayTreeItemIds&) const;
+
+        // get the parent of this item (may return NULL if root)
+    wxTreeItemId GetParent(const wxTreeItemId& item) const;
+
+        // 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& item, long& cookie) const;
+        // get the next child
+    wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
+        // get the last child of this item - this method doesn't use cookies
+    wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
+
+        // get the next sibling of this item
+    wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
+        // get the previous sibling
+    wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
+
+        // get first visible item
+    wxTreeItemId GetFirstVisibleItem() const;
+        // get the next visible item: item must be visible itself!
+        // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
+    wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
+        // get the previous visible item: item must be visible itself!
+    wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
+
+    // operations
+    // ----------
+
+        // add the root node to the tree
+    wxTreeItemId AddRoot(const wxString& text,
+                         int image = -1, int selectedImage = -1,
+                         wxTreeItemData *data = NULL);
+
+        // insert a new item in as the first child of the parent
+    wxTreeItemId PrependItem(const wxTreeItemId& parent,
+                             const wxString& text,
+                             int image = -1, int selectedImage = -1,
+                             wxTreeItemData *data = NULL);
+
+        // insert a new item after a given one
+    wxTreeItemId InsertItem(const wxTreeItemId& parent,
+                            const wxTreeItemId& idPrevious,
+                            const wxString& text,
+                            int image = -1, int selectedImage = -1,
+                            wxTreeItemData *data = NULL);
+
+        // insert a new item before the one with the given index
+    wxTreeItemId InsertItem(const wxTreeItemId& parent,
+                            size_t index,
+                            const wxString& text,
+                            int image = -1, int selectedImage = -1,
+                            wxTreeItemData *data = NULL);
+
+        // insert a new item in as the last child of the parent
+    wxTreeItemId AppendItem(const wxTreeItemId& parent,
+                            const wxString& text,
+                            int image = -1, int selectedImage = -1,
+                            wxTreeItemData *data = NULL);
+
+        // delete this item and associated data if any
+    void Delete(const wxTreeItemId& item);
+        // delete all children (but don't delete the item itself)
+        // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
+    void DeleteChildren(const wxTreeItemId& item);
+        // delete all items from the tree
+        // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
+    void DeleteAllItems();
+
+        // expand this item
+    void Expand(const wxTreeItemId& item);
+        // expand this item and all subitems recursively
+    void ExpandAll(const wxTreeItemId& item);
+        // collapse the item without removing its children
+    void Collapse(const wxTreeItemId& item);
+        // collapse the item and remove all children
+    void CollapseAndReset(const wxTreeItemId& item);
+        // toggles the current state
+    void Toggle(const wxTreeItemId& item);
+
+        // remove the selection from currently selected item (if any)
+    void Unselect();
+    void UnselectAll();
+        // select this item
+    void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE, bool extended_select=FALSE);
+        // make sure this item is visible (expanding the parent item and/or
+        // scrolling to this item if necessary)
+    void EnsureVisible(const wxTreeItemId& item);
+        // scroll to this item (but don't expand its parent)
+    void ScrollTo(const wxTreeItemId& item);
+
+        // 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& point)
+        { int dummy; return HitTest(point, dummy); }
+    wxTreeItemId HitTest(const wxPoint& point, int& flags);
+
+        // Start editing the item label: this (temporarily) replaces the item
+        // with a one line edit control. The item will be selected if it hadn't
+        // been before.
+    void EditLabel( const wxTreeItemId& item ) { Edit( item ); }
+    void Edit( const wxTreeItemId& item );
+
+    // 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& item1,
+                               const wxTreeItemId& item2);
+        // sort the children of this item using OnCompareItems
+        //
+        // NB: this function is not reentrant and not MT-safe (FIXME)!
+    void SortChildren(const wxTreeItemId& item);
+
+    // deprecated functions: use Set/GetItemImage directly
+        // get the selected item image
+    int GetItemSelectedImage(const wxTreeItemId& item) const
+        { return GetItemImage(item, wxTreeItemIcon_Selected); }
+        // set the selected item image
+    void SetItemSelectedImage(const wxTreeItemId& item, int image)
+        { SetItemImage(item, image, wxTreeItemIcon_Selected); }
+
+    // implementation only from now on
+
+    // callbacks
+    void OnPaint( wxPaintEvent &event );
+    void OnSetFocus( wxFocusEvent &event );
+    void OnKillFocus( wxFocusEvent &event );
+    void OnChar( wxKeyEvent &event );
+    void OnMouse( wxMouseEvent &event );
+    void OnIdle( wxIdleEvent &event );
+
+    // implementation helpers
+    void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted);
+
+    void DrawBorder(const wxTreeItemId& item);
+    void DrawLine(const wxTreeItemId& item, bool below);
+
+protected:
+    friend class wxGenericTreeItem;
+    friend class wxTreeRenameTimer;
+    friend class wxTreeTextCtrl;
+
+    wxFont               m_normalFont;
+    wxFont               m_boldFont;
+
+    wxGenericTreeItem   *m_anchor;
+    wxGenericTreeItem   *m_current, *m_key_current, *m_currentEdit;
+    bool                 m_hasFocus;
+    bool                 m_dirty;
+    int                  m_xScroll,m_yScroll;
+    unsigned int         m_indent;
+    unsigned int         m_spacing;
+    int                  m_lineHeight;
+    wxPen                m_dottedPen;
+    wxBrush             *m_hilightBrush;
+    wxImageList         *m_imageListNormal,
+                        *m_imageListState;
+
+    int                  m_dragCount;
+    wxPoint              m_dragStart;
+    bool                 m_isDragging; // true between BEGIN/END drag events
+    wxGenericTreeItem   *m_dropTarget;
+    wxCursor             m_oldCursor;  // cursor is changed while dragging
+    wxGenericTreeItem   *m_oldSelection;
+
+    wxTimer             *m_renameTimer;
+    bool                 m_renameAccept;
+    bool                 m_lastOnSame;  // last click on the same item as prev
+    wxString             m_renameRes;
+
+    // the common part of all ctors
+    void Init();
+
+    // misc helpers
+    wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
+                              size_t previous,
+                              const wxString& text,
+                              int image, int selectedImage,
+                              wxTreeItemData *data);
+
+    void AdjustMyScrollbars();
+    int  GetLineHeight(wxGenericTreeItem *item) const;
+    void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y );
+    void PaintItem( wxGenericTreeItem *item, wxDC& dc);
+
+    void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y );
+    void CalculatePositions();
+    void CalculateSize( wxGenericTreeItem *item, wxDC &dc );
+
+    void RefreshSubtree( wxGenericTreeItem *item );
+    void RefreshLine( wxGenericTreeItem *item );
+
+    void OnRenameTimer();
+    void OnRenameAccept();
+
+    void FillArray(wxGenericTreeItem*, wxArrayTreeItemIds&) const;
+    void SelectItemRange( wxGenericTreeItem *item1, wxGenericTreeItem *item2 );
+    bool TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
+    bool TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
+    void UnselectAllChildren( wxGenericTreeItem *item );
+
+    void DrawDropEffect(wxGenericTreeItem *item);
+
+private:
+    DECLARE_EVENT_TABLE()
+    DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl)
+};
+
+#endif // _GENERIC_TREECTRL_H_
+
diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h
deleted file mode 100644 (file)
index 50d949b..0000000
+++ /dev/null
@@ -1,455 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        treectrl.h
-// Purpose:     wxTreeCtrl class
-// Author:      Robert Roebling
-// Modified by:
-// Created:     01/02/97
-// RCS-ID:      $Id$
-// Copyright:   (c) 1997,1998 Robert Roebling
-// Licence:     wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _GENERIC_TREECTRL_H_
-#define _GENERIC_TREECTRL_H_
-
-#ifdef __GNUG__
-    #pragma interface "treectrl.h"
-#endif
-
-#include "wx/defs.h"
-#include "wx/string.h"
-#include "wx/object.h"
-#include "wx/event.h"
-#include "wx/scrolwin.h"
-#include "wx/textctrl.h"
-#include "wx/pen.h"
-#include "wx/dynarray.h"
-#include "wx/timer.h"
-
-// -----------------------------------------------------------------------------
-// forward declaration
-// -----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxImageList;
-class WXDLLEXPORT wxGenericTreeItem;
-
-class WXDLLEXPORT wxTreeItemData;
-
-class WXDLLEXPORT wxTreeRenameTimer;
-class WXDLLEXPORT wxTreeTextCtrl;
-
-// -----------------------------------------------------------------------------
-// wxTreeItemId - unique identifier of a tree element
-// -----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTreeItemId
-{
-friend class wxTreeCtrl;
-friend class wxTreeEvent;
-public:
-    // ctors
-        // 0 is invalid value for HTREEITEM
-    wxTreeItemId() { m_pItem = 0; }
-
-        // default copy ctor/assignment operator are ok for us
-
-    // accessors
-        // is this a valid tree item?
-    bool IsOk() const { return m_pItem != 0; }
-
-    // deprecated: only for compatibility
-    wxTreeItemId(long itemId) { m_pItem = (wxGenericTreeItem *)itemId; }
-    operator long() const { return (long)m_pItem; }
-
-//protected: // not for gcc
-    // for wxTreeCtrl usage only
-    wxTreeItemId(wxGenericTreeItem *pItem) { m_pItem = pItem; }
-
-    wxGenericTreeItem *m_pItem;
-};
-
-WX_DECLARE_OBJARRAY(wxTreeItemId, wxArrayTreeItemIds);
-
-// ----------------------------------------------------------------------------
-// wxTreeItemData is some (arbitrary) user class associated with some item.
-//
-// Because the objects of this class are deleted by the tree, they should
-// always be allocated on the heap!
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTreeItemData: public wxClientData
-{
-friend class wxTreeCtrl;
-public:
-    // creation/destruction
-    // --------------------
-        // default ctor
-    wxTreeItemData() { }
-
-        // default copy ctor/assignment operator are ok
-
-    // accessor: get the item associated with us
-    const wxTreeItemId& GetId() const { return m_pItem; }
-    void SetId(const wxTreeItemId& id) { m_pItem = id; }
-
-protected:
-    wxTreeItemId m_pItem;
-};
-
-// -----------------------------------------------------------------------------
-// wxTreeCtrl - the tree control
-// -----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTreeCtrl : public wxScrolledWindow
-{
-public:
-    // creation
-    // --------
-    wxTreeCtrl() { Init(); }
-
-    wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
-               const wxPoint& pos = wxDefaultPosition,
-               const wxSize& size = wxDefaultSize,
-               long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
-               const wxValidator &validator = wxDefaultValidator,
-               const wxString& name = wxTreeCtrlNameStr)
-    {
-        Create(parent, id, pos, size, style, validator, name);
-    }
-
-    virtual ~wxTreeCtrl();
-
-    bool Create(wxWindow *parent, wxWindowID id = -1,
-                const wxPoint& pos = wxDefaultPosition,
-                const wxSize& size = wxDefaultSize,
-                long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
-                const wxValidator &validator = wxDefaultValidator,
-                const wxString& name = wxTreeCtrlNameStr);
-
-    // accessors
-    // ---------
-
-        // get the total number of items in the control
-    size_t GetCount() 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() const { return m_indent; }
-    void SetIndent(unsigned int indent);
-
-        // spacing is the number of pixels between the start and the Text
-    unsigned int GetSpacing() const { return m_spacing; }
-    void SetSpacing(unsigned int spacing);
-
-        // 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.
-        //
-        // The normal image list is for the icons which correspond to the
-        // normal tree item state (whether it is selected or not).
-        // Additionally, the application might choose to show a state icon
-        // which corresponds to an app-defined item state (for example,
-        // checked/unchecked) which are taken from the state image list.
-    wxImageList *GetImageList() const;
-    wxImageList *GetStateImageList() const;
-
-    void SetImageList(wxImageList *imageList);
-    void SetStateImageList(wxImageList *imageList);
-
-    // Functions to work with tree ctrl items.
-
-    // accessors
-    // ---------
-
-        // retrieve items label
-    wxString GetItemText(const wxTreeItemId& item) const;
-        // get one of the images associated with the item (normal by default)
-    int GetItemImage(const wxTreeItemId& item,
-                     wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
-        // get the data associated with the item
-    wxTreeItemData *GetItemData(const wxTreeItemId& item) const;
-
-    // modifiers
-    // ---------
-
-        // set items label
-    void SetItemText(const wxTreeItemId& item, const wxString& text);
-        // get one of the images associated with the item (normal by default)
-    void SetItemImage(const wxTreeItemId& item, int image,
-                      wxTreeItemIcon which = wxTreeItemIcon_Normal);
-        // associate some data with the item
-    void SetItemData(const wxTreeItemId& item, wxTreeItemData *data);
-
-        // 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& item, bool has = TRUE);
-
-        // the item will be shown in bold
-    void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
-
-        // set the items text colour
-    void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
-
-        // set the items background colour
-    void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
-
-        // set the items font (should be of the same height for all items)
-    void SetItemFont(const wxTreeItemId& item, const wxFont& font);
-
-    // item status inquiries
-    // ---------------------
-
-        // is the item visible (it might be outside the view or not expanded)?
-    bool IsVisible(const wxTreeItemId& item) const;
-        // does the item has any children?
-    bool HasChildren(const wxTreeItemId& item) const
-      { return ItemHasChildren(item); }
-    bool ItemHasChildren(const wxTreeItemId& item) const;
-        // is the item expanded (only makes sense if HasChildren())?
-    bool IsExpanded(const wxTreeItemId& item) const;
-        // is this item currently selected (the same as has focus)?
-    bool IsSelected(const wxTreeItemId& item) const;
-        // is item text in bold font?
-    bool IsBold(const wxTreeItemId& item) 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& item, bool recursively = TRUE);
-
-    // navigation
-    // ----------
-
-    // wxTreeItemId.IsOk() will return FALSE if there is no such item
-
-        // get the root tree item
-    wxTreeItemId GetRootItem() const { return m_anchor; }
-
-        // get the item currently selected (may return NULL if no selection)
-    wxTreeItemId GetSelection() const { return m_current; }
-
-        // get the items currently selected, return the number of such item
-    size_t GetSelections(wxArrayTreeItemIds&) const;
-
-        // get the parent of this item (may return NULL if root)
-    wxTreeItemId GetParent(const wxTreeItemId& item) const;
-
-        // 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& item, long& cookie) const;
-        // get the next child
-    wxTreeItemId GetNextChild(const wxTreeItemId& item, long& cookie) const;
-        // get the last child of this item - this method doesn't use cookies
-    wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
-
-        // get the next sibling of this item
-    wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
-        // get the previous sibling
-    wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
-
-        // get first visible item
-    wxTreeItemId GetFirstVisibleItem() const;
-        // get the next visible item: item must be visible itself!
-        // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
-    wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
-        // get the previous visible item: item must be visible itself!
-    wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
-
-    // operations
-    // ----------
-
-        // add the root node to the tree
-    wxTreeItemId AddRoot(const wxString& text,
-                         int image = -1, int selectedImage = -1,
-                         wxTreeItemData *data = NULL);
-
-        // insert a new item in as the first child of the parent
-    wxTreeItemId PrependItem(const wxTreeItemId& parent,
-                             const wxString& text,
-                             int image = -1, int selectedImage = -1,
-                             wxTreeItemData *data = NULL);
-
-        // insert a new item after a given one
-    wxTreeItemId InsertItem(const wxTreeItemId& parent,
-                            const wxTreeItemId& idPrevious,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-        // insert a new item before the one with the given index
-    wxTreeItemId InsertItem(const wxTreeItemId& parent,
-                            size_t index,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-        // insert a new item in as the last child of the parent
-    wxTreeItemId AppendItem(const wxTreeItemId& parent,
-                            const wxString& text,
-                            int image = -1, int selectedImage = -1,
-                            wxTreeItemData *data = NULL);
-
-        // delete this item and associated data if any
-    void Delete(const wxTreeItemId& item);
-        // delete all children (but don't delete the item itself)
-        // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteChildren(const wxTreeItemId& item);
-        // delete all items from the tree
-        // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
-    void DeleteAllItems();
-
-        // expand this item
-    void Expand(const wxTreeItemId& item);
-        // expand this item and all subitems recursively
-    void ExpandAll(const wxTreeItemId& item);
-        // collapse the item without removing its children
-    void Collapse(const wxTreeItemId& item);
-        // collapse the item and remove all children
-    void CollapseAndReset(const wxTreeItemId& item);
-        // toggles the current state
-    void Toggle(const wxTreeItemId& item);
-
-        // remove the selection from currently selected item (if any)
-    void Unselect();
-    void UnselectAll();
-        // select this item
-    void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE, bool extended_select=FALSE);
-        // make sure this item is visible (expanding the parent item and/or
-        // scrolling to this item if necessary)
-    void EnsureVisible(const wxTreeItemId& item);
-        // scroll to this item (but don't expand its parent)
-    void ScrollTo(const wxTreeItemId& item);
-
-        // 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& point)
-        { int dummy; return HitTest(point, dummy); }
-    wxTreeItemId HitTest(const wxPoint& point, int& flags);
-
-        // Start editing the item label: this (temporarily) replaces the item
-        // with a one line edit control. The item will be selected if it hadn't
-        // been before.
-    void EditLabel( const wxTreeItemId& item ) { Edit( item ); }
-    void Edit( const wxTreeItemId& item );
-
-    // 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& item1,
-                               const wxTreeItemId& item2);
-        // sort the children of this item using OnCompareItems
-        //
-        // NB: this function is not reentrant and not MT-safe (FIXME)!
-    void SortChildren(const wxTreeItemId& item);
-
-    // deprecated functions: use Set/GetItemImage directly
-        // get the selected item image
-    int GetItemSelectedImage(const wxTreeItemId& item) const
-        { return GetItemImage(item, wxTreeItemIcon_Selected); }
-        // set the selected item image
-    void SetItemSelectedImage(const wxTreeItemId& item, int image)
-        { SetItemImage(item, image, wxTreeItemIcon_Selected); }
-
-    // implementation only from now on
-
-    // callbacks
-    void OnPaint( wxPaintEvent &event );
-    void OnSetFocus( wxFocusEvent &event );
-    void OnKillFocus( wxFocusEvent &event );
-    void OnChar( wxKeyEvent &event );
-    void OnMouse( wxMouseEvent &event );
-    void OnIdle( wxIdleEvent &event );
-
-    // implementation helpers
-    void SendDeleteEvent(wxGenericTreeItem *itemBeingDeleted);
-
-    void DrawBorder(const wxTreeItemId& item);
-    void DrawLine(const wxTreeItemId& item, bool below);
-
-protected:
-    friend class wxGenericTreeItem;
-    friend class wxTreeRenameTimer;
-    friend class wxTreeTextCtrl;
-
-    wxFont               m_normalFont;
-    wxFont               m_boldFont;
-
-    wxGenericTreeItem   *m_anchor;
-    wxGenericTreeItem   *m_current, *m_key_current, *m_currentEdit;
-    bool                 m_hasFocus;
-    bool                 m_dirty;
-    int                  m_xScroll,m_yScroll;
-    unsigned int         m_indent;
-    unsigned int         m_spacing;
-    int                  m_lineHeight;
-    wxPen                m_dottedPen;
-    wxBrush             *m_hilightBrush;
-    wxImageList         *m_imageListNormal,
-                        *m_imageListState;
-
-    int                  m_dragCount;
-    wxPoint              m_dragStart;
-    bool                 m_isDragging; // true between BEGIN/END drag events
-    wxGenericTreeItem   *m_dropTarget;
-    wxCursor             m_oldCursor;  // cursor is changed while dragging
-    wxGenericTreeItem   *m_oldSelection;
-
-    wxTimer             *m_renameTimer;
-    bool                 m_renameAccept;
-    bool                 m_lastOnSame;  // last click on the same item as prev
-    wxString             m_renameRes;
-
-    // the common part of all ctors
-    void Init();
-
-    // misc helpers
-    wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
-                              size_t previous,
-                              const wxString& text,
-                              int image, int selectedImage,
-                              wxTreeItemData *data);
-
-    void AdjustMyScrollbars();
-    int  GetLineHeight(wxGenericTreeItem *item) const;
-    void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y );
-    void PaintItem( wxGenericTreeItem *item, wxDC& dc);
-
-    void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y );
-    void CalculatePositions();
-    void CalculateSize( wxGenericTreeItem *item, wxDC &dc );
-
-    void RefreshSubtree( wxGenericTreeItem *item );
-    void RefreshLine( wxGenericTreeItem *item );
-
-    void OnRenameTimer();
-    void OnRenameAccept();
-
-    void FillArray(wxGenericTreeItem*, wxArrayTreeItemIds&) const;
-    void SelectItemRange( wxGenericTreeItem *item1, wxGenericTreeItem *item2 );
-    bool TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
-    bool TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem *last_item, bool select);
-    void UnselectAllChildren( wxGenericTreeItem *item );
-
-    void DrawDropEffect(wxGenericTreeItem *item);
-
-private:
-    DECLARE_EVENT_TABLE()
-    DECLARE_DYNAMIC_CLASS(wxTreeCtrl)
-};
-
-#endif // _GENERIC_TREECTRL_H_
-
index 91d4eea2ab0f75afe7c8f6b87d45a358f3b5be47..78c77e07146650eb05d2999d04b83482115ba2ae 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "wx/textctrl.h"
 #include "wx/dynarray.h"
+#include "wx/treebase.h"
 
 #ifdef __GNUWIN32__
     // Cygwin windows.h defines these identifiers
@@ -58,68 +59,6 @@ enum
 #define wxTREE_INSERT_FIRST 0xFFFF0001
 #define wxTREE_INSERT_LAST  0xFFFF0002
 
-// ----------------------------------------------------------------------------
-// wxTreeItemId identifies an element of the tree. In this implementation, it's
-// just a trivial wrapper around Win32 HTREEITEM. It's opaque for the
-// application.
-// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxTreeItemId
-{
-public:
-    // ctors
-        // 0 is invalid value for HTREEITEM
-    wxTreeItemId() { m_itemId = 0; }
-
-        // default copy ctor/assignment operator are ok for us
-
-    // accessors
-        // is this a valid tree item?
-    bool IsOk() const { return m_itemId != 0; }
-
-    // conversion to/from either real (system-dependent) tree item id or
-    // to "long" which used to be the type for tree item ids in previous
-    // versions of wxWindows
-
-    // for wxTreeCtrl usage only
-    wxTreeItemId(WXHTREEITEM itemId) { m_itemId = (long)itemId; }
-    operator WXHTREEITEM() const { return (WXHTREEITEM)m_itemId; }
-
-    void operator=(WXHTREEITEM item) { m_itemId = (long) item; }
-
-protected:
-    long m_itemId;
-};
-
-WX_DEFINE_EXPORTED_ARRAY(WXHTREEITEM, wxArrayTreeItemIds);
-
-// ----------------------------------------------------------------------------
-// wxTreeItemData is some (arbitrary) user class associated with some item. The
-// main advantage of having this class (compared to old untyped interface) is
-// that wxTreeItemData's are destroyed automatically by the tree and, as this
-// class has virtual dtor, it means that the memory will be automatically
-// freed. OTOH, we don't just use wxObject instead of wxTreeItemData because
-// the size of this class is critical: in any real application, each tree leaf
-// will have wxTreeItemData associated with it and number of leaves may be
-// quite big.
-//
-// Because the objects of this class are deleted by the tree, they should
-// always be allocated on the heap!
-// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxTreeItemData : private wxTreeItemId
-{
-public:
-    // default ctor/copy ctor/assignment operator are ok
-
-    // dtor is virtual and all the items are deleted by the tree control when
-    // it's deleted, so you normally don't have to care about freeing memory
-    // allocated in your wxTreeItemData-derived class
-    virtual ~wxTreeItemData() { }
-
-    // accessors: set/get the item associated with this node
-    void SetId(const wxTreeItemId& id) { m_itemId = id; }
-    const wxTreeItemId GetId() const { return *this; }
-};
-
 // ----------------------------------------------------------------------------
 // wxTreeCtrl
 // ----------------------------------------------------------------------------
diff --git a/include/wx/treebase.h b/include/wx/treebase.h
new file mode 100644 (file)
index 0000000..4d9320b
--- /dev/null
@@ -0,0 +1,286 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        treectrl.h
+// Purpose:     wxTreeCtrl base classes and types
+// Author:      Julian Smart et al
+// Modified by:
+// Created:     01/02/97
+// RCS-ID:      $Id$
+// Copyright:   (c) 1997,1998 Robert Roebling
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_TREEBASE_H_
+#define _WX_TREEBASE_H_
+
+#ifdef __GNUG__
+    #pragma interface "treebase.h"
+#endif
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/control.h"
+#include "wx/event.h"
+
+// ----------------------------------------------------------------------------
+// wxTreeItemId identifies an element of the tree. In this implementation, it's
+// just a trivial wrapper around Win32 HTREEITEM. It's opaque for the
+// application.
+// ----------------------------------------------------------------------------
+
+// Using this typedef removes an ambiguity when calling Remove()
+typedef unsigned long wxTreeItemIdValue;
+
+class WXDLLEXPORT wxTreeItemId
+{
+friend class WXDLLEXPORT wxTreeCtrl;
+friend class WXDLLEXPORT wxGenericTreeCtrl;
+friend class WXDLLEXPORT wxTreeEvent;
+public:
+    // ctors
+        // 0 is invalid value for HTREEITEM
+    wxTreeItemId() { m_pItem = 0; }
+
+        // default copy ctor/assignment operator are ok for us
+
+    // accessors
+        // is this a valid tree item?
+    bool IsOk() const { return m_pItem != 0; }
+
+    // deprecated: only for compatibility
+    wxTreeItemId(long itemId) { m_pItem = itemId; }
+    //operator long() const { return m_pItem; }
+    operator wxTreeItemIdValue() const { return m_pItem; }
+
+    void operator=(long item) { m_pItem = item; }
+
+    wxTreeItemId(void *pItem) { m_pItem = (long) pItem; }
+
+    wxTreeItemIdValue m_pItem;
+};
+
+// ----------------------------------------------------------------------------
+// wxTreeItemData is some (arbitrary) user class associated with some item. The
+// main advantage of having this class (compared to old untyped interface) is
+// that wxTreeItemData's are destroyed automatically by the tree and, as this
+// class has virtual dtor, it means that the memory will be automatically
+// freed. OTOH, we don't just use wxObject instead of wxTreeItemData because
+// the size of this class is critical: in any real application, each tree leaf
+// will have wxTreeItemData associated with it and number of leaves may be
+// quite big.
+//
+// Because the objects of this class are deleted by the tree, they should
+// always be allocated on the heap!
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTreeItemData: public wxClientData
+{
+friend class WXDLLEXPORT wxTreeCtrl;
+friend class WXDLLEXPORT wxGenericTreeCtrl;
+public:
+    // creation/destruction
+    // --------------------
+        // default ctor
+    wxTreeItemData() { }
+
+        // default copy ctor/assignment operator are ok
+
+    // accessor: get the item associated with us
+    const wxTreeItemId& GetId() const { return m_pItem; }
+    void SetId(const wxTreeItemId& id) { m_pItem = id; }
+
+protected:
+    wxTreeItemId m_pItem;
+};
+
+WX_DEFINE_EXPORTED_ARRAY(wxTreeItemId, wxArrayTreeItemIds);
+
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// enum for different images associated with a treectrl item
+enum wxTreeItemIcon
+{
+    wxTreeItemIcon_Normal,              // not selected, not expanded
+    wxTreeItemIcon_Selected,            //     selected, not expanded
+    wxTreeItemIcon_Expanded,            // not selected,     expanded
+    wxTreeItemIcon_SelectedExpanded,    //     selected,     expanded
+    wxTreeItemIcon_Max
+};
+
+
+// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
+// where exactly the specified point is situated:
+
+static const int wxTREE_HITTEST_ABOVE            = 0x0001;
+static const int wxTREE_HITTEST_BELOW            = 0x0002;
+static const int wxTREE_HITTEST_NOWHERE          = 0x0004;
+    // on the button associated with an item.
+static const int wxTREE_HITTEST_ONITEMBUTTON     = 0x0008;
+    // on the bitmap associated with an item.
+static const int wxTREE_HITTEST_ONITEMICON       = 0x0010;
+    // on the indent associated with an item.
+static const int wxTREE_HITTEST_ONITEMINDENT     = 0x0020;
+    // on the label (string) associated with an item.
+static const int wxTREE_HITTEST_ONITEMLABEL      = 0x0040;
+    // on the right of the label associated with an item.
+static const int wxTREE_HITTEST_ONITEMRIGHT      = 0x0080;
+    // on the label (string) associated with an item.
+static const int wxTREE_HITTEST_ONITEMSTATEICON  = 0x0100;
+    // on the left of the wxTreeCtrl.
+static const int wxTREE_HITTEST_TOLEFT           = 0x0200;
+    // on the right of the wxTreeCtrl.
+static const int wxTREE_HITTEST_TORIGHT          = 0x0400;
+    // on the upper part (first half) of the item.
+static const int wxTREE_HITTEST_ONITEMUPPERPART  = 0x0800;
+    // on the lower part (second half) of the item.
+static const int wxTREE_HITTEST_ONITEMLOWERPART  = 0x1000;
+
+    // anywhere on the item
+static const int wxTREE_HITTEST_ONITEM  = wxTREE_HITTEST_ONITEMICON |
+                                          wxTREE_HITTEST_ONITEMLABEL;
+
+// tree ctrl default name
+WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
+
+// ----------------------------------------------------------------------------
+// wxTreeItemAttr: a structure containing the visual attributes of an item
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTreeItemAttr
+{
+public:
+    // ctors
+    wxTreeItemAttr() { }
+    wxTreeItemAttr(const wxColour& colText,
+                   const wxColour& colBack,
+                   const wxFont& font)
+        : m_colText(colText), m_colBack(colBack), m_font(font) { }
+
+    // setters
+    void SetTextColour(const wxColour& colText) { m_colText = colText; }
+    void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
+    void SetFont(const wxFont& font) { m_font = font; }
+
+    // accessors
+    bool HasTextColour() const { return m_colText.Ok(); }
+    bool HasBackgroundColour() const { return m_colBack.Ok(); }
+    bool HasFont() const { return m_font.Ok(); }
+
+    const wxColour& GetTextColour() const { return m_colText; }
+    const wxColour& GetBackgroundColour() const { return m_colBack; }
+    const wxFont& GetFont() const { return m_font; }
+
+private:
+    wxColour m_colText,
+             m_colBack;
+    wxFont   m_font;
+};
+
+// ----------------------------------------------------------------------------
+// wxTreeEvent is a special class for all events associated with tree controls
+//
+// NB: note that not all accessors make sense for all events, see the event
+//     descriptions below
+// ----------------------------------------------------------------------------
+
+class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
+{
+    friend class WXDLLEXPORT wxTreeCtrl;
+    friend class WXDLLEXPORT wxGenericTreeCtrl;
+
+public:
+    wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
+
+    // accessors
+        // get the item on which the operation was performed or the newly
+        // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events
+    wxTreeItemId GetItem() const { return m_item; }
+
+        // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously
+        // selected item
+    wxTreeItemId GetOldItem() const { return m_itemOld; }
+
+        // the point where the mouse was when the drag operation started (for
+        // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only)
+    wxPoint GetPoint() const { return m_pointDrag; }
+
+        // keyboard code (for wxEVT_COMMAND_TREE_KEY_DOWN only)
+    int GetCode() const { return m_code; }
+
+        // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
+    const wxString& GetLabel() const { return m_label; }
+
+private:
+    // we could probably save some space by using union here
+    int           m_code;
+    wxTreeItemId  m_item,
+                  m_itemOld;
+    wxPoint       m_pointDrag;
+    wxString      m_label;
+
+    DECLARE_DYNAMIC_CLASS(wxTreeEvent)
+};
+
+typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
+
+// ----------------------------------------------------------------------------
+// macros for handling tree control events
+// ----------------------------------------------------------------------------
+
+// GetItem() returns the item being dragged, GetPoint() the mouse coords
+//
+// if you call event.Allow(), the drag operation will start and a
+// EVT_TREE_END_DRAG event will be sent when the drag is over.
+#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+
+// GetItem() is the item on which the drop occured (if any) and GetPoint() the
+// current mouse coords
+#define EVT_TREE_END_DRAG(id, fn) { wxEVT_COMMAND_TREE_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+
+// GetItem() returns the itme whose label is being edited, GetLabel() returns
+// the current item label for BEGIN and the would be new one for END.
+//
+// Vetoing BEGIN event means that label editing won't happen at all,
+// vetoing END means that the new value is discarded and the old one kept
+#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+
+// provide/update information about GetItem() item
+#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+
+// GetItem() is the item being expanded/collapsed, the "ING" versions can use
+#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
+// GetOldItem() is the item which had the selection previously, GetItem() is
+// the item which acquires selection
+#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
+// GetCode() returns the key code
+// NB: this is the only message for which GetItem() is invalid (you may get the
+//     item from GetSelection())
+#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
+// GetItem() returns the item being deleted, the associated data (if any) will
+// be deleted just after the return of this event handler (if any)
+#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
+
+// GetItem() returns the item that was activated (double click, enter, space)
+#define EVT_TREE_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
+// GetItem() returns the item that was clicked on
+#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+
+#endif
+    // _WX_TREEBASE_H_
+
+
index 278ea204f87a032e15d31f41c7554386ee431f68..b30804c1e8f17e3101f294da0265c80d219b85cd 100644 (file)
@@ -1,95 +1,7 @@
 #ifndef _WX_TREECTRL_H_BASE_
 #define _WX_TREECTRL_H_BASE_
 
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/control.h"
-#include "wx/event.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// enum for different images associated with a treectrl item
-enum wxTreeItemIcon
-{
-    wxTreeItemIcon_Normal,              // not selected, not expanded
-    wxTreeItemIcon_Selected,            //     selected, not expanded
-    wxTreeItemIcon_Expanded,            // not selected,     expanded
-    wxTreeItemIcon_SelectedExpanded,    //     selected,     expanded
-    wxTreeItemIcon_Max
-};
-
-
-// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
-// where exactly the specified point is situated:
-
-static const int wxTREE_HITTEST_ABOVE            = 0x0001;
-static const int wxTREE_HITTEST_BELOW            = 0x0002;
-static const int wxTREE_HITTEST_NOWHERE          = 0x0004;
-    // on the button associated with an item.
-static const int wxTREE_HITTEST_ONITEMBUTTON     = 0x0008;
-    // on the bitmap associated with an item.
-static const int wxTREE_HITTEST_ONITEMICON       = 0x0010;
-    // on the indent associated with an item.
-static const int wxTREE_HITTEST_ONITEMINDENT     = 0x0020;
-    // on the label (string) associated with an item.
-static const int wxTREE_HITTEST_ONITEMLABEL      = 0x0040;
-    // on the right of the label associated with an item.
-static const int wxTREE_HITTEST_ONITEMRIGHT      = 0x0080;
-    // on the label (string) associated with an item.
-static const int wxTREE_HITTEST_ONITEMSTATEICON  = 0x0100;
-    // on the left of the wxTreeCtrl.
-static const int wxTREE_HITTEST_TOLEFT           = 0x0200;
-    // on the right of the wxTreeCtrl.
-static const int wxTREE_HITTEST_TORIGHT          = 0x0400;
-    // on the upper part (first half) of the item.
-static const int wxTREE_HITTEST_ONITEMUPPERPART  = 0x0800;
-    // on the lower part (second half) of the item.
-static const int wxTREE_HITTEST_ONITEMLOWERPART  = 0x1000;
-
-    // anywhere on the item
-static const int wxTREE_HITTEST_ONITEM  = wxTREE_HITTEST_ONITEMICON |
-                                          wxTREE_HITTEST_ONITEMLABEL;
-
-// tree ctrl default name
-WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
-
-// ----------------------------------------------------------------------------
-// wxTreeItemAttr: a structure containing the visual attributes of an item
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTreeItemAttr
-{
-public:
-    // ctors
-    wxTreeItemAttr() { }
-    wxTreeItemAttr(const wxColour& colText,
-                   const wxColour& colBack,
-                   const wxFont& font)
-        : m_colText(colText), m_colBack(colBack), m_font(font) { }
-
-    // setters
-    void SetTextColour(const wxColour& colText) { m_colText = colText; }
-    void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
-    void SetFont(const wxFont& font) { m_font = font; }
-
-    // accessors
-    bool HasTextColour() const { return m_colText.Ok(); }
-    bool HasBackgroundColour() const { return m_colBack.Ok(); }
-    bool HasFont() const { return m_font.Ok(); }
-
-    const wxColour& GetTextColour() const { return m_colText; }
-    const wxColour& GetBackgroundColour() const { return m_colBack; }
-    const wxFont& GetFont() const { return m_font; }
-
-private:
-    wxColour m_colText,
-             m_colBack;
-    wxFont   m_font;
-};
+#include "wx/treebase.h"
 
 // ----------------------------------------------------------------------------
 // include the platform-dependent wxTreeCtrl class
@@ -97,123 +9,28 @@ private:
 
 #if defined(__WXMSW__)
     #ifdef __WIN16__
-        #include "wx/generic/treectrl.h"
+        #include "wx/generic/treectlg.h"
     #else
         #include "wx/msw/treectrl.h"
     #endif
 #elif defined(__WXMOTIF__)
-    #include "wx/generic/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #elif defined(__WXGTK__)
-    #include "wx/generic/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #elif defined(__WXQT__)
     #include "wx/qt/treectrl.h"
 #elif defined(__WXMAC__)
-    #include "wx/generic/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #elif defined(__WXPM__)
-    #include "wx/generic/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #elif defined(__WXSTUBS__)
-    #include "wx/generic/treectrl.h"
+    #include "wx/generic/treectlg.h"
 #endif
 
-// ----------------------------------------------------------------------------
-// wxTreeEvent is a special class for all events associated with tree controls
-//
-// NB: note that not all accessors make sense for all events, see the event
-//     descriptions below
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
-{
-    friend class WXDLLEXPORT wxTreeCtrl;
-
-public:
-    wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
-
-    // accessors
-        // get the item on which the operation was performed or the newly
-        // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events
-    wxTreeItemId GetItem() const { return m_item; }
-
-        // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously
-        // selected item
-    wxTreeItemId GetOldItem() const { return m_itemOld; }
-
-        // the point where the mouse was when the drag operation started (for
-        // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only)
-    wxPoint GetPoint() const { return m_pointDrag; }
-
-        // keyboard code (for wxEVT_COMMAND_TREE_KEY_DOWN only)
-    int GetCode() const { return m_code; }
-
-        // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
-    const wxString& GetLabel() const { return m_label; }
-
-private:
-    // we could probably save some space by using union here
-    int           m_code;
-    wxTreeItemId  m_item,
-                  m_itemOld;
-    wxPoint       m_pointDrag;
-    wxString      m_label;
-
-    DECLARE_DYNAMIC_CLASS(wxTreeEvent)
-};
-
-typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
-
-// ----------------------------------------------------------------------------
-// macros for handling tree control events
-// ----------------------------------------------------------------------------
-
-// GetItem() returns the item being dragged, GetPoint() the mouse coords
-//
-// if you call event.Allow(), the drag operation will start and a
-// EVT_TREE_END_DRAG event will be sent when the drag is over.
-#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-// GetItem() is the item on which the drop occured (if any) and GetPoint() the
-// current mouse coords
-#define EVT_TREE_END_DRAG(id, fn) { wxEVT_COMMAND_TREE_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-// GetItem() returns the itme whose label is being edited, GetLabel() returns
-// the current item label for BEGIN and the would be new one for END.
-//
-// Vetoing BEGIN event means that label editing won't happen at all,
-// vetoing END means that the new value is discarded and the old one kept
-#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-// provide/update information about GetItem() item
-#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-// GetItem() is the item being expanded/collapsed, the "ING" versions can use
-#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-
-// GetOldItem() is the item which had the selection previously, GetItem() is
-// the item which acquires selection
-#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-
-// GetCode() returns the key code
-// NB: this is the only message for which GetItem() is invalid (you may get the
-//     item from GetSelection())
-#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-
-// GetItem() returns the item being deleted, the associated data (if any) will
-// be deleted just after the return of this event handler (if any)
-#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
-
-// GetItem() returns the item that was activated (double click, enter, space)
-#define EVT_TREE_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-
-// GetItem() returns the item that was clicked on
-#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
-#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) { wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
+#if !defined(__WXMSW__)
+#define wxTreeCtrl wxGenericTreeCtrl
+#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
+#endif
 
 #endif
     // _WX_TREECTRL_H_BASE_
index 0ae0d46847d7e69f7a2b159f34951010126aa310..cb30f162d0dad0058c0f5a8b826f22bacff0c831 100644 (file)
@@ -98,7 +98,11 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(TreeTest_ToggleIcon, MyFrame::OnToggleIcon)
 END_EVENT_TABLE()
 
+#if USE_GENERIC_TREECTRL
+BEGIN_EVENT_TABLE(MyTreeCtrl, wxGenericTreeCtrl)
+#else
 BEGIN_EVENT_TABLE(MyTreeCtrl, wxTreeCtrl)
+#endif
     EVT_TREE_BEGIN_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginDrag)
     EVT_TREE_BEGIN_RDRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginRDrag)
     EVT_TREE_END_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnEndDrag)
@@ -513,7 +517,11 @@ void MyFrame::OnToggleIcon(wxCommandEvent& WXUNUSED(event))
 }
 
 // MyTreeCtrl implementation
+#if USE_GENERIC_TREECTRL
+IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxGenericTreeCtrl)
+#else
 IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxTreeCtrl)
+#endif
 
 MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
                        const wxPoint& pos, const wxSize& size,
index 6a6dc6702f4c495c8fc045f7fbee44c664e59583..fc3d5931b3f84644e48d1da1dc75289d74e3f595 100644 (file)
@@ -9,6 +9,16 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
+#define USE_GENERIC_TREECTRL 0
+
+#if USE_GENERIC_TREECTRL
+#include "wx/generic/treectlg.h"
+#ifndef wxTreeCtrl
+#define wxTreeCtrl wxGenericTreeCtrl
+#define sm_classwxTreeCtrl sm_classwxGenericTreeCtrl
+#endif
+#endif
+
 // Define a new application type
 class MyApp : public wxApp
 {
diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp
new file mode 100644 (file)
index 0000000..3925dcf
--- /dev/null
@@ -0,0 +1,53 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        treebase.cpp
+// Purpose:     Base wxTreeCtrl classes
+// Author:      Julian Smart
+// Created:     01/02/97
+// Modified:
+// Id:          $Id$
+// Copyright:   (c) 1998 Robert Roebling, Julian Smart et al
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// =============================================================================
+// declarations
+// =============================================================================
+
+// -----------------------------------------------------------------------------
+// headers
+// -----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+  #pragma implementation "treebase.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#include "wx/treebase.h"
+#include "wx/settings.h"
+#include "wx/log.h"
+#include "wx/intl.h"
+#include "wx/dynarray.h"
+#include "wx/arrimpl.cpp"
+#include "wx/dcclient.h"
+#include "wx/msgdlg.h"
+
+// ----------------------------------------------------------------------------
+// Tree event
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
+
+wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
+           : wxNotifyEvent(commandType, id)
+{
+    m_code = 0;
+    m_itemOld = 0;
+}
+
+
index e0b5213fa24df9cc1c6896d56bbeae04d4a73735..f09570863b76ce8753b588a19084827b5a1aafc9 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 17:10, 2000/07/27
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -32,13 +32,14 @@ ALL_SOURCES = \
                generic/proplist.cpp \
                generic/sashwin.cpp \
                generic/scrolwin.cpp \
+               generic/splash.cpp \
                generic/splitter.cpp \
                generic/statusbr.cpp \
                generic/tabg.cpp \
                generic/tbarsmpl.cpp \
                generic/textdlgg.cpp \
                generic/tipdlg.cpp \
-               generic/treectrl.cpp \
+               generic/treectlg.cpp \
                generic/treelay.cpp \
                generic/wizard.cpp \
                common/appcmn.cpp \
@@ -61,6 +62,7 @@ ALL_SOURCES = \
                common/docview.cpp \
                common/dynarray.cpp \
                common/dynlib.cpp \
+               common/effects.cpp \
                common/encconv.cpp \
                common/event.cpp \
                common/extended.c \
@@ -109,6 +111,7 @@ ALL_SOURCES = \
                common/prntbase.cpp \
                common/process.cpp \
                common/protocol.cpp \
+               common/quantize.cpp \
                common/resource.cpp \
                common/sckaddr.cpp \
                common/sckfile.cpp \
@@ -125,6 +128,7 @@ ALL_SOURCES = \
                common/textfile.cpp \
                common/timercmn.cpp \
                common/tokenzr.cpp \
+               common/treebase.cpp \
                common/txtstrm.cpp \
                common/unzip.c \
                common/url.cpp \
@@ -410,6 +414,7 @@ ALL_HEADERS = \
                tokenzr.h \
                toolbar.h \
                tooltip.h \
+               treebase.h \
                treectrl.h \
                txtstrm.h \
                types.h \
@@ -527,7 +532,7 @@ ALL_HEADERS = \
                generic/statusbr.h \
                generic/tabg.h \
                generic/textdlgg.h \
-               generic/treectrl.h \
+               generic/treectlg.h \
                generic/wizard.h \
                unix/execute.h \
                unix/fontutil.h \
@@ -573,6 +578,7 @@ COMMONOBJS = \
                docview.o \
                dynarray.o \
                dynlib.o \
+               effects.o \
                encconv.o \
                event.o \
                extended.o \
@@ -621,6 +627,7 @@ COMMONOBJS = \
                prntbase.o \
                process.o \
                protocol.o \
+               quantize.o \
                resource.o \
                sckaddr.o \
                sckfile.o \
@@ -637,6 +644,7 @@ COMMONOBJS = \
                textfile.o \
                timercmn.o \
                tokenzr.o \
+               treebase.o \
                txtstrm.o \
                unzip.o \
                url.o \
@@ -674,6 +682,7 @@ COMMONDEPS = \
                docview.d \
                dynarray.d \
                dynlib.d \
+               effects.d \
                encconv.d \
                event.d \
                extended.d \
@@ -722,6 +731,7 @@ COMMONDEPS = \
                prntbase.d \
                process.d \
                protocol.d \
+               quantize.d \
                resource.d \
                sckaddr.d \
                sckfile.d \
@@ -738,6 +748,7 @@ COMMONDEPS = \
                textfile.d \
                timercmn.d \
                tokenzr.d \
+               treebase.d \
                txtstrm.d \
                unzip.d \
                url.d \
@@ -785,13 +796,14 @@ GENERICOBJS = \
                proplist.o \
                sashwin.o \
                scrolwin.o \
+               splash.o \
                splitter.o \
                statusbr.o \
                tabg.o \
                tbarsmpl.o \
                textdlgg.o \
                tipdlg.o \
-               treectrl.o \
+               treectlg.o \
                treelay.o \
                wizard.o
 
@@ -827,13 +839,14 @@ GENERICDEPS = \
                proplist.d \
                sashwin.d \
                scrolwin.d \
+               splash.d \
                splitter.d \
                statusbr.d \
                tabg.d \
                tbarsmpl.d \
                textdlgg.d \
                tipdlg.d \
-               treectrl.d \
+               treectlg.d \
                treelay.d \
                wizard.d
 
index e0b5213fa24df9cc1c6896d56bbeae04d4a73735..f09570863b76ce8753b588a19084827b5a1aafc9 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 17:10, 2000/07/27
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -32,13 +32,14 @@ ALL_SOURCES = \
                generic/proplist.cpp \
                generic/sashwin.cpp \
                generic/scrolwin.cpp \
+               generic/splash.cpp \
                generic/splitter.cpp \
                generic/statusbr.cpp \
                generic/tabg.cpp \
                generic/tbarsmpl.cpp \
                generic/textdlgg.cpp \
                generic/tipdlg.cpp \
-               generic/treectrl.cpp \
+               generic/treectlg.cpp \
                generic/treelay.cpp \
                generic/wizard.cpp \
                common/appcmn.cpp \
@@ -61,6 +62,7 @@ ALL_SOURCES = \
                common/docview.cpp \
                common/dynarray.cpp \
                common/dynlib.cpp \
+               common/effects.cpp \
                common/encconv.cpp \
                common/event.cpp \
                common/extended.c \
@@ -109,6 +111,7 @@ ALL_SOURCES = \
                common/prntbase.cpp \
                common/process.cpp \
                common/protocol.cpp \
+               common/quantize.cpp \
                common/resource.cpp \
                common/sckaddr.cpp \
                common/sckfile.cpp \
@@ -125,6 +128,7 @@ ALL_SOURCES = \
                common/textfile.cpp \
                common/timercmn.cpp \
                common/tokenzr.cpp \
+               common/treebase.cpp \
                common/txtstrm.cpp \
                common/unzip.c \
                common/url.cpp \
@@ -410,6 +414,7 @@ ALL_HEADERS = \
                tokenzr.h \
                toolbar.h \
                tooltip.h \
+               treebase.h \
                treectrl.h \
                txtstrm.h \
                types.h \
@@ -527,7 +532,7 @@ ALL_HEADERS = \
                generic/statusbr.h \
                generic/tabg.h \
                generic/textdlgg.h \
-               generic/treectrl.h \
+               generic/treectlg.h \
                generic/wizard.h \
                unix/execute.h \
                unix/fontutil.h \
@@ -573,6 +578,7 @@ COMMONOBJS = \
                docview.o \
                dynarray.o \
                dynlib.o \
+               effects.o \
                encconv.o \
                event.o \
                extended.o \
@@ -621,6 +627,7 @@ COMMONOBJS = \
                prntbase.o \
                process.o \
                protocol.o \
+               quantize.o \
                resource.o \
                sckaddr.o \
                sckfile.o \
@@ -637,6 +644,7 @@ COMMONOBJS = \
                textfile.o \
                timercmn.o \
                tokenzr.o \
+               treebase.o \
                txtstrm.o \
                unzip.o \
                url.o \
@@ -674,6 +682,7 @@ COMMONDEPS = \
                docview.d \
                dynarray.d \
                dynlib.d \
+               effects.d \
                encconv.d \
                event.d \
                extended.d \
@@ -722,6 +731,7 @@ COMMONDEPS = \
                prntbase.d \
                process.d \
                protocol.d \
+               quantize.d \
                resource.d \
                sckaddr.d \
                sckfile.d \
@@ -738,6 +748,7 @@ COMMONDEPS = \
                textfile.d \
                timercmn.d \
                tokenzr.d \
+               treebase.d \
                txtstrm.d \
                unzip.d \
                url.d \
@@ -785,13 +796,14 @@ GENERICOBJS = \
                proplist.o \
                sashwin.o \
                scrolwin.o \
+               splash.o \
                splitter.o \
                statusbr.o \
                tabg.o \
                tbarsmpl.o \
                textdlgg.o \
                tipdlg.o \
-               treectrl.o \
+               treectlg.o \
                treelay.o \
                wizard.o
 
@@ -827,13 +839,14 @@ GENERICDEPS = \
                proplist.d \
                sashwin.d \
                scrolwin.d \
+               splash.d \
                splitter.d \
                statusbr.d \
                tabg.d \
                tbarsmpl.d \
                textdlgg.d \
                tipdlg.d \
-               treectrl.d \
+               treectlg.d \
                treelay.d \
                wizard.d
 
index bb16896e924aa34c3b24a0fd2020a12f8d9a5aca..31fe9594dca3d9a30209fb787f5271a065114df2 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 17:13, 2000/07/27
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -34,6 +34,7 @@ ALL_SOURCES = \
                generic/proplist.cpp \
                generic/sashwin.cpp \
                generic/scrolwin.cpp \
+               generic/splash.cpp \
                generic/splitter.cpp \
                generic/statline.cpp \
                generic/statusbr.cpp \
@@ -41,7 +42,7 @@ ALL_SOURCES = \
                generic/tbarsmpl.cpp \
                generic/textdlgg.cpp \
                generic/tipdlg.cpp \
-               generic/treectrl.cpp \
+               generic/treectlg.cpp \
                generic/treelay.cpp \
                generic/wizard.cpp \
                common/appcmn.cpp \
@@ -64,6 +65,7 @@ ALL_SOURCES = \
                common/docview.cpp \
                common/dynarray.cpp \
                common/dynlib.cpp \
+               common/effects.cpp \
                common/encconv.cpp \
                common/event.cpp \
                common/extended.c \
@@ -112,6 +114,7 @@ ALL_SOURCES = \
                common/prntbase.cpp \
                common/process.cpp \
                common/protocol.cpp \
+               common/quantize.cpp \
                common/resource.cpp \
                common/sckaddr.cpp \
                common/sckfile.cpp \
@@ -128,6 +131,7 @@ ALL_SOURCES = \
                common/textfile.cpp \
                common/timercmn.cpp \
                common/tokenzr.cpp \
+               common/treebase.cpp \
                common/txtstrm.cpp \
                common/unzip.c \
                common/url.cpp \
@@ -407,6 +411,7 @@ ALL_HEADERS = \
                tokenzr.h \
                toolbar.h \
                tooltip.h \
+               treebase.h \
                treectrl.h \
                txtstrm.h \
                types.h \
@@ -524,7 +529,7 @@ ALL_HEADERS = \
                generic/statusbr.h \
                generic/tabg.h \
                generic/textdlgg.h \
-               generic/treectrl.h \
+               generic/treectlg.h \
                generic/wizard.h \
                unix/execute.h \
                unix/fontutil.h \
@@ -570,6 +575,7 @@ COMMONOBJS = \
                docview.o \
                dynarray.o \
                dynlib.o \
+               effects.o \
                encconv.o \
                event.o \
                extended.o \
@@ -618,6 +624,7 @@ COMMONOBJS = \
                prntbase.o \
                process.o \
                protocol.o \
+               quantize.o \
                resource.o \
                sckaddr.o \
                sckfile.o \
@@ -634,6 +641,7 @@ COMMONOBJS = \
                textfile.o \
                timercmn.o \
                tokenzr.o \
+               treebase.o \
                txtstrm.o \
                unzip.o \
                url.o \
@@ -671,6 +679,7 @@ COMMONDEPS = \
                docview.d \
                dynarray.d \
                dynlib.d \
+               effects.d \
                encconv.d \
                event.d \
                extended.d \
@@ -719,6 +728,7 @@ COMMONDEPS = \
                prntbase.d \
                process.d \
                protocol.d \
+               quantize.d \
                resource.d \
                sckaddr.d \
                sckfile.d \
@@ -735,6 +745,7 @@ COMMONDEPS = \
                textfile.d \
                timercmn.d \
                tokenzr.d \
+               treebase.d \
                txtstrm.d \
                unzip.d \
                url.d \
@@ -784,6 +795,7 @@ GENERICOBJS = \
                proplist.o \
                sashwin.o \
                scrolwin.o \
+               splash.o \
                splitter.o \
                statline.o \
                statusbr.o \
@@ -791,7 +803,7 @@ GENERICOBJS = \
                tbarsmpl.o \
                textdlgg.o \
                tipdlg.o \
-               treectrl.o \
+               treectlg.o \
                treelay.o \
                wizard.o
 
@@ -829,6 +841,7 @@ GENERICDEPS = \
                proplist.d \
                sashwin.d \
                scrolwin.d \
+               splash.d \
                splitter.d \
                statline.d \
                statusbr.d \
@@ -836,7 +849,7 @@ GENERICDEPS = \
                tbarsmpl.d \
                textdlgg.d \
                tipdlg.d \
-               treectrl.d \
+               treectlg.d \
                treelay.d \
                wizard.d
 
index eb6ddc589cfda8f8f167458f1db9711f1d87e512..0e2ee37e3aae8d7e68e75bdfd503ce88231fd95e 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 09:26, 2000/06/19
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
 
 #
@@ -81,6 +81,7 @@ DOCDIR = $(WXDIR)\docs
 GENERICOBJS= $(MSWDIR)\busyinfo.obj \
                $(MSWDIR)\calctrl.obj \
                $(MSWDIR)\choicdgg.obj \
+               $(MSWDIR)\dirctrlg.obj \
                $(MSWDIR)\dragimgg.obj \
                $(MSWDIR)\grid.obj \
                $(MSWDIR)\gridsel.obj \
@@ -95,6 +96,7 @@ GENERICOBJS= $(MSWDIR)\busyinfo.obj \
                $(MSWDIR)\proplist.obj \
                $(MSWDIR)\sashwin.obj \
                $(MSWDIR)\scrolwin.obj \
+               $(MSWDIR)\splash.obj \
                $(MSWDIR)\splitter.obj \
                $(MSWDIR)\statusbr.obj \
                $(MSWDIR)\tabg.obj \
@@ -137,6 +139,7 @@ COMMONOBJS = \
                $(MSWDIR)\docview.obj \
                $(MSWDIR)\dynarray.obj \
                $(MSWDIR)\dynlib.obj \
+               $(MSWDIR)\effects.obj \
                $(MSWDIR)\encconv.obj \
                $(MSWDIR)\event.obj \
                $(MSWDIR)\extended.obj \
@@ -186,6 +189,7 @@ COMMONOBJS = \
                $(MSWDIR)\prntbase.obj \
                $(MSWDIR)\process.obj \
                $(MSWDIR)\protocol.obj \
+               $(MSWDIR)\quantize.obj \
                $(MSWDIR)\resource.obj \
                $(MSWDIR)\sckaddr.obj \
                $(MSWDIR)\sckfile.obj \
@@ -202,6 +206,7 @@ COMMONOBJS = \
                $(MSWDIR)\textfile.obj \
                $(MSWDIR)\timercmn.obj \
                $(MSWDIR)\tokenzr.obj \
+               $(MSWDIR)\treebase.obj \
                $(MSWDIR)\txtstrm.obj \
                $(MSWDIR)\unzip.obj \
                $(MSWDIR)\url.obj \
@@ -636,6 +641,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
 
 $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
 
+$(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF)
+
 $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
 
 $(MSWDIR)\event.obj: $(COMMDIR)\event.$(SRCSUFF)
@@ -734,6 +741,8 @@ $(MSWDIR)\process.obj: $(COMMDIR)\process.$(SRCSUFF)
 
 $(MSWDIR)\protocol.obj: $(COMMDIR)\protocol.$(SRCSUFF)
 
+$(MSWDIR)\quantize.obj: $(COMMDIR)\quantize.$(SRCSUFF)
+
 $(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF)
 
 $(MSWDIR)\sckaddr.obj: $(COMMDIR)\sckaddr.$(SRCSUFF)
@@ -766,6 +775,8 @@ $(MSWDIR)\timercmn.obj: $(COMMDIR)\timercmn.$(SRCSUFF)
 
 $(MSWDIR)\tokenzr.obj: $(COMMDIR)\tokenzr.$(SRCSUFF)
 
+$(MSWDIR)\treebase.obj: $(COMMDIR)\treebase.$(SRCSUFF)
+
 $(MSWDIR)\txtstrm.obj: $(COMMDIR)\txtstrm.$(SRCSUFF)
 
 $(MSWDIR)\unzip.obj: $(COMMDIR)\unzip.c
@@ -806,6 +817,8 @@ $(MSWDIR)\calctrl.obj: $(GENDIR)\calctrl.$(SRCSUFF)
 
 $(MSWDIR)\choicdgg.obj: $(GENDIR)\choicdgg.$(SRCSUFF)
 
+$(MSWDIR)\dirctrlg.obj: $(GENDIR)\dirctrlg.$(SRCSUFF)
+
 $(MSWDIR)\dragimgg.obj: $(GENDIR)\dragimgg.$(SRCSUFF)
 
 $(MSWDIR)\grid.obj: $(GENDIR)\grid.$(SRCSUFF)
@@ -834,6 +847,8 @@ $(MSWDIR)\sashwin.obj: $(GENDIR)\sashwin.$(SRCSUFF)
 
 $(MSWDIR)\scrolwin.obj: $(GENDIR)\scrolwin.$(SRCSUFF)
 
+$(MSWDIR)\splash.obj: $(GENDIR)\splash.$(SRCSUFF)
+
 $(MSWDIR)\splitter.obj: $(GENDIR)\splitter.$(SRCSUFF)
 
 $(MSWDIR)\statusbr.obj: $(GENDIR)\statusbr.$(SRCSUFF)
index f45b412eaf29a579ac447017728f45a1376a4716..e3929fa7f9f0cd06fa4d513548f0f6847770ad85 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 20:13, 2000/03/31
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
 
 #
@@ -76,6 +76,7 @@ DOCDIR = $(WXDIR)\docs
 GENERICOBJS= $(MSWDIR)\busyinfo.obj \
                $(MSWDIR)\calctrl.obj \
                $(MSWDIR)\choicdgg.obj \
+               $(MSWDIR)\dirctrlg.obj \
                $(MSWDIR)\dirdlgg.obj \
                $(MSWDIR)\dragimgg.obj \
                $(MSWDIR)\grid.obj \
@@ -95,13 +96,14 @@ GENERICOBJS= $(MSWDIR)\busyinfo.obj \
                $(MSWDIR)\proplist.obj \
                $(MSWDIR)\sashwin.obj \
                $(MSWDIR)\scrolwin.obj \
+               $(MSWDIR)\splash.obj \
                $(MSWDIR)\splitter.obj \
                $(MSWDIR)\statusbr.obj \
                $(MSWDIR)\tabg.obj \
                $(MSWDIR)\tbarsmpl.obj \
                $(MSWDIR)\textdlgg.obj \
                $(MSWDIR)\tipdlg.obj \
-               $(MSWDIR)\treectrl.obj \
+               $(MSWDIR)\treectlg.obj \
                $(MSWDIR)\treelay.obj \
                $(MSWDIR)\wizard.obj
 
@@ -127,6 +129,7 @@ COMMONOBJS = \
                $(MSWDIR)\docview.obj \
                $(MSWDIR)\dynarray.obj \
                $(MSWDIR)\dynlib.obj \
+               $(MSWDIR)\effects.obj \
                $(MSWDIR)\encconv.obj \
                $(MSWDIR)\event.obj \
                $(MSWDIR)\extended.obj \
@@ -165,6 +168,7 @@ COMMONOBJS = \
                $(MSWDIR)\objstrm.obj \
                $(MSWDIR)\paper.obj \
                $(MSWDIR)\prntbase.obj \
+               $(MSWDIR)\quantize.obj \
                $(MSWDIR)\resource.obj \
                $(MSWDIR)\serbase.obj \
                $(MSWDIR)\sizer.obj \
@@ -176,6 +180,7 @@ COMMONOBJS = \
                $(MSWDIR)\textfile.obj \
                $(MSWDIR)\timercmn.obj \
                $(MSWDIR)\tokenzr.obj \
+               $(MSWDIR)\treebase.obj \
                $(MSWDIR)\txtstrm.obj \
                $(MSWDIR)\unzip.obj \
                $(MSWDIR)\utilscmn.obj \
@@ -515,6 +520,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
 
 $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
 
+$(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF)
+
 $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
 
 $(MSWDIR)\event.obj: $(COMMDIR)\event.$(SRCSUFF)
@@ -591,6 +598,8 @@ $(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF)
 
 $(MSWDIR)\prntbase.obj: $(COMMDIR)\prntbase.$(SRCSUFF)
 
+$(MSWDIR)\quantize.obj: $(COMMDIR)\quantize.$(SRCSUFF)
+
 $(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF)
 
 $(MSWDIR)\serbase.obj: $(COMMDIR)\serbase.$(SRCSUFF)
@@ -613,6 +622,8 @@ $(MSWDIR)\timercmn.obj: $(COMMDIR)\timercmn.$(SRCSUFF)
 
 $(MSWDIR)\tokenzr.obj: $(COMMDIR)\tokenzr.$(SRCSUFF)
 
+$(MSWDIR)\treebase.obj: $(COMMDIR)\treebase.$(SRCSUFF)
+
 $(MSWDIR)\txtstrm.obj: $(COMMDIR)\txtstrm.$(SRCSUFF)
 
 $(MSWDIR)\unzip.obj: $(COMMDIR)\unzip.c
@@ -653,6 +664,8 @@ $(MSWDIR)\calctrl.obj: $(GENDIR)\calctrl.$(SRCSUFF)
 
 $(MSWDIR)\choicdgg.obj: $(GENDIR)\choicdgg.$(SRCSUFF)
 
+$(MSWDIR)\dirctrlg.obj: $(GENDIR)\dirctrlg.$(SRCSUFF)
+
 $(MSWDIR)\dirdlgg.obj: $(GENDIR)\dirdlgg.$(SRCSUFF)
 
 $(MSWDIR)\dragimgg.obj: $(GENDIR)\dragimgg.$(SRCSUFF)
@@ -691,6 +704,8 @@ $(MSWDIR)\sashwin.obj: $(GENDIR)\sashwin.$(SRCSUFF)
 
 $(MSWDIR)\scrolwin.obj: $(GENDIR)\scrolwin.$(SRCSUFF)
 
+$(MSWDIR)\splash.obj: $(GENDIR)\splash.$(SRCSUFF)
+
 $(MSWDIR)\splitter.obj: $(GENDIR)\splitter.$(SRCSUFF)
 
 $(MSWDIR)\statusbr.obj: $(GENDIR)\statusbr.$(SRCSUFF)
@@ -703,7 +718,7 @@ $(MSWDIR)\textdlgg.obj: $(GENDIR)\textdlgg.$(SRCSUFF)
 
 $(MSWDIR)\tipdlg.obj: $(GENDIR)\tipdlg.$(SRCSUFF)
 
-$(MSWDIR)\treectrl.obj: $(GENDIR)\treectrl.$(SRCSUFF)
+$(MSWDIR)\treectlg.obj: $(GENDIR)\treectlg.$(SRCSUFF)
 
 $(MSWDIR)\treelay.obj: $(GENDIR)\treelay.$(SRCSUFF)
 
index 8d399e3d49a5a23e8715c19d6eb13fa8c822fdfe..8e5a133d132597d2e3f9cae8cecb22a989990695 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 20:13, 2000/03/31
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
 
 #
@@ -60,6 +60,7 @@ MSWDIR=.
 GENERICOBJS= $(GENDIR)\busyinfo.obj \
                $(GENDIR)\calctrl.obj \
                $(GENDIR)\choicdgg.obj \
+               $(GENDIR)\dirctrlg.obj \
                $(GENDIR)\dirdlgg.obj \
                $(GENDIR)\dragimgg.obj \
                $(GENDIR)\grid.obj \
@@ -79,13 +80,14 @@ GENERICOBJS= $(GENDIR)\busyinfo.obj \
                $(GENDIR)\proplist.obj \
                $(GENDIR)\sashwin.obj \
                $(GENDIR)\scrolwin.obj \
+               $(GENDIR)\splash.obj \
                $(GENDIR)\splitter.obj \
                $(GENDIR)\statusbr.obj \
                $(GENDIR)\tabg.obj \
                $(GENDIR)\tbarsmpl.obj \
                $(GENDIR)\textdlgg.obj \
                $(GENDIR)\tipdlg.obj \
-               $(GENDIR)\treectrl.obj \
+               $(GENDIR)\treectlg.obj \
                $(GENDIR)\treelay.obj \
                $(GENDIR)\wizard.obj
 
@@ -112,6 +114,7 @@ COMMONOBJS1 = \
                $(COMMDIR)\docview.obj \
                $(COMMDIR)\dynarray.obj \
                $(COMMDIR)\dynlib.obj \
+               $(COMMDIR)\effects.obj \
                $(COMMDIR)\encconv.obj \
                $(COMMDIR)\event.obj \
                $(COMMDIR)\extended.obj \
@@ -153,6 +156,7 @@ COMMONOBJS1 = \
 COMMONOBJS2 = \
                $(COMMDIR)\paper.obj \
                $(COMMDIR)\prntbase.obj \
+               $(COMMDIR)\quantize.obj \
                $(COMMDIR)\resource.obj \
                $(COMMDIR)\serbase.obj \
                $(COMMDIR)\sizer.obj \
@@ -164,6 +168,7 @@ COMMONOBJS2 = \
                $(COMMDIR)\textfile.obj \
                $(COMMDIR)\timercmn.obj \
                $(COMMDIR)\tokenzr.obj \
+               $(COMMDIR)\treebase.obj \
                $(COMMDIR)\txtstrm.obj \
                $(COMMDIR)\unzip.obj \
                $(COMMDIR)\utilscmn.obj \
@@ -848,6 +853,11 @@ $(COMMDIR)/dynlib.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/effects.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/encconv.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1043,6 +1053,11 @@ $(COMMDIR)/prntbase.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/quantize.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/resource.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1098,6 +1113,11 @@ $(COMMDIR)/tokenzr.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/treebase.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/txtstrm.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1178,6 +1198,11 @@ $(GENDIR)/choicdgg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(GENDIR)/dirctrlg.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(GENDIR)/dirdlgg.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1273,6 +1298,11 @@ $(GENDIR)/scrolwin.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(GENDIR)/splash.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(GENDIR)/splitter.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1303,7 +1333,7 @@ $(GENDIR)/tipdlg.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
-$(GENDIR)/treectrl.obj:     $*.$(SRCSUFF)
+$(GENDIR)/treectlg.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
index 0748398440671312d1c61b8fed0e84dfe7c6880f..449b21200be426923c0ffe2738a39f1e10a08a8e 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 20:13, 2000/03/31
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
 
 #
@@ -72,6 +72,7 @@ GENERICOBJS = \
                 $(GENDIR)/busyinfo.$(OBJSUFF) \
                $(GENDIR)/calctrl.$(OBJSUFF) \
                $(GENDIR)/choicdgg.$(OBJSUFF) \
+               $(GENDIR)/dirctrlg.$(OBJSUFF) \
                $(GENDIR)/dragimgg.$(OBJSUFF) \
                $(GENDIR)/grid.$(OBJSUFF) \
                $(GENDIR)/gridsel.$(OBJSUFF) \
@@ -86,8 +87,10 @@ GENERICOBJS = \
                $(GENDIR)/proplist.$(OBJSUFF) \
                $(GENDIR)/sashwin.$(OBJSUFF) \
                $(GENDIR)/scrolwin.$(OBJSUFF) \
+               $(GENDIR)/splash.$(OBJSUFF) \
                $(GENDIR)/splitter.$(OBJSUFF) \
                $(GENDIR)/statusbr.$(OBJSUFF) \
+               $(GENDIR)/tabg.$(OBJSUFF) \
                $(GENDIR)/tbarsmpl.$(OBJSUFF) \
                $(GENDIR)/textdlgg.$(OBJSUFF) \
                $(GENDIR)/tipdlg.$(OBJSUFF) \
@@ -116,6 +119,7 @@ COMMONOBJS  = \
                $(COMMDIR)/docview.$(OBJSUFF) \
                $(COMMDIR)/dynarray.$(OBJSUFF) \
                $(COMMDIR)/dynlib.$(OBJSUFF) \
+               $(COMMDIR)/effects.$(OBJSUFF) \
                $(COMMDIR)/encconv.$(OBJSUFF) \
                $(COMMDIR)/event.$(OBJSUFF) \
                $(COMMDIR)/extended.$(OBJSUFF) \
@@ -164,6 +168,7 @@ COMMONOBJS  = \
                $(COMMDIR)/prntbase.$(OBJSUFF) \
                $(COMMDIR)/process.$(OBJSUFF) \
                $(COMMDIR)/protocol.$(OBJSUFF) \
+               $(COMMDIR)/quantize.$(OBJSUFF) \
                $(COMMDIR)/resource.$(OBJSUFF) \
                $(COMMDIR)/sckaddr.$(OBJSUFF) \
                $(COMMDIR)/sckfile.$(OBJSUFF) \
@@ -180,6 +185,7 @@ COMMONOBJS  = \
                $(COMMDIR)/textfile.$(OBJSUFF) \
                $(COMMDIR)/timercmn.$(OBJSUFF) \
                $(COMMDIR)/tokenzr.$(OBJSUFF) \
+               $(COMMDIR)/treebase.$(OBJSUFF) \
                $(COMMDIR)/txtstrm.$(OBJSUFF) \
                $(COMMDIR)/unzip.$(OBJSUFF) \
                $(COMMDIR)/url.$(OBJSUFF) \
index 91fdd854c50fae47fff68bfd8b755b66f1ca5659..b98c93941b7cdbc22e9ff818c97381d4268dec54 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 20:13, 2000/03/31
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
 
 # Symantec C++ makefile for the msw objects
@@ -29,6 +29,7 @@ MSWDIR=$(WXDIR)\src\msw
 GENERICOBJS= $(GENDIR)\busyinfo.obj \
                $(GENDIR)\calctrl.obj \
                $(GENDIR)\choicdgg.obj \
+               $(GENDIR)\dirctrlg.obj \
                $(GENDIR)\dragimgg.obj \
                $(GENDIR)\grid.obj \
                $(GENDIR)\gridsel.obj \
@@ -43,8 +44,10 @@ GENERICOBJS= $(GENDIR)\busyinfo.obj \
                $(GENDIR)\proplist.obj \
                $(GENDIR)\sashwin.obj \
                $(GENDIR)\scrolwin.obj \
+               $(GENDIR)\splash.obj \
                $(GENDIR)\splitter.obj \
                $(GENDIR)\statusbr.obj \
+               $(GENDIR)\tabg.obj \
                $(GENDIR)\tbarsmpl.obj \
                $(GENDIR)\textdlgg.obj \
                $(GENDIR)\tipdlg.obj \
@@ -73,6 +76,7 @@ COMMONOBJS = \
                $(COMMDIR)\docview.obj \
                $(COMMDIR)\dynarray.obj \
                $(COMMDIR)\dynlib.obj \
+               $(COMMDIR)\effects.obj \
                $(COMMDIR)\encconv.obj \
                $(COMMDIR)\event.obj \
                $(COMMDIR)\extended.obj \
@@ -122,6 +126,7 @@ COMMONOBJS = \
                $(COMMDIR)\prntbase.obj \
                $(COMMDIR)\process.obj \
                $(COMMDIR)\protocol.obj \
+               $(COMMDIR)\quantize.obj \
                $(COMMDIR)\resource.obj \
                $(COMMDIR)\sckaddr.obj \
                $(COMMDIR)\sckfile.obj \
@@ -138,6 +143,7 @@ COMMONOBJS = \
                $(COMMDIR)\textfile.obj \
                $(COMMDIR)\timercmn.obj \
                $(COMMDIR)\tokenzr.obj \
+               $(COMMDIR)\treebase.obj \
                $(COMMDIR)\txtstrm.obj \
                $(COMMDIR)\unzip.obj \
                $(COMMDIR)\url.obj \
@@ -202,6 +208,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
                $(MSWDIR)\glcanvas.obj \
                $(MSWDIR)\gsocket.obj \
                $(MSWDIR)\gsockmsw.obj \
+               $(MSWDIR)\helpchm.obj \
                $(MSWDIR)\helpwin.obj \
                $(MSWDIR)\icon.obj \
                $(MSWDIR)\iniconf.obj \
@@ -246,6 +253,7 @@ MSWOBJS = $(MSWDIR)\accel.obj \
                $(MSWDIR)\thread.obj \
                $(MSWDIR)\timer.obj \
                $(MSWDIR)\tooltip.obj \
+               $(MSWDIR)\treectrl.obj \
                $(MSWDIR)\utils.obj \
                $(MSWDIR)\utilsexc.obj \
                $(MSWDIR)\ole\uuid.obj \
index 5ebec70f6818cd7fcc1b8f3eb23faeb1d1e62ee2..107fe650f18c9a06bf1375e2a292b4a589e91efe 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 10:46, 2000/04/27
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
 
 # File:     makefile.vc
@@ -27,6 +27,9 @@ LIBTARGET=$(WXLIB)
 DUMMYOBJ=$D\dummy.obj
 !endif
 
+# Please set these according to the settings in setup.h, so we can include
+# the appropriate libraries in wx.lib
+
 # This one overrides the others, to be consistent with the settings in setup.h
 MINIMAL_WXWINDOWS_SETUP=0
 
@@ -34,9 +37,6 @@ PERIPH_LIBS=
 PERIPH_TARGET=
 PERIPH_CLEAN_TARGET=
 
-# Set to 0 if not using GLCanvas (only affects DLL build)
-USE_GLCANVAS=1
-
 # These are absolute paths, so that the compiler
 # generates correct __FILE__ symbols for debugging.
 # Otherwise you don't be able to double-click on a memory
@@ -101,6 +101,7 @@ GENERICOBJS= ..\generic\$D\busyinfo.obj \
                ..\generic\$D\proplist.obj \
                ..\generic\$D\sashwin.obj \
                ..\generic\$D\scrolwin.obj \
+               ..\generic\$D\splash.obj \
                ..\generic\$D\splitter.obj \
                ..\generic\$D\statusbr.obj \
                ..\generic\$D\tabg.obj \
@@ -129,7 +130,7 @@ NONESSENTIALOBJS= ..\generic\$D\caret.obj \
                ..\generic\$D\printps.obj \
                ..\generic\$D\prntdlgg.obj \
                ..\generic\$D\statline.obj \
-               ..\generic\$D\treectrl.obj
+               ..\generic\$D\treectlg.obj
 
 COMMONOBJS = \
                ..\common\$D\y_tab.obj \
@@ -153,6 +154,7 @@ COMMONOBJS = \
                ..\common\$D\docview.obj \
                ..\common\$D\dynarray.obj \
                ..\common\$D\dynlib.obj \
+               ..\common\$D\effects.obj \
                ..\common\$D\encconv.obj \
                ..\common\$D\event.obj \
                ..\common\$D\extended.obj \
@@ -202,6 +204,7 @@ COMMONOBJS = \
                ..\common\$D\prntbase.obj \
                ..\common\$D\process.obj \
                ..\common\$D\protocol.obj \
+               ..\common\$D\quantize.obj \
                ..\common\$D\resource.obj \
                ..\common\$D\sckaddr.obj \
                ..\common\$D\sckfile.obj \
@@ -218,6 +221,7 @@ COMMONOBJS = \
                ..\common\$D\textfile.obj \
                ..\common\$D\timercmn.obj \
                ..\common\$D\tokenzr.obj \
+               ..\common\$D\treebase.obj \
                ..\common\$D\txtstrm.obj \
                ..\common\$D\unzip.obj \
                ..\common\$D\url.obj \
index 2a31747017d37c4d24fadc8514d701c7dbd55d38..10b8d512e71d5cd103c6374d70ae661a1fc49535 100644 (file)
@@ -1,6 +1,6 @@
 #!/binb/wmake.exe
 
-# This file was automatically generated by tmake at 11:50, 2000/06/26
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
 
 #
@@ -44,6 +44,7 @@ DOCDIR = $(WXDIR)\docs
 GENERICOBJS= busyinfo.obj &
        calctrl.obj &
        choicdgg.obj &
+       dirctrlg.obj &
        dragimgg.obj &
        grid.obj &
        gridsel.obj &
@@ -58,6 +59,7 @@ GENERICOBJS= busyinfo.obj &
        proplist.obj &
        sashwin.obj &
        scrolwin.obj &
+       splash.obj &
        splitter.obj &
        statusbr.obj &
        tabg.obj &
@@ -86,7 +88,7 @@ NONESSENTIALOBJS= caret.obj &
        printps.obj &
        prntdlgg.obj &
        statline.obj &
-       treectrl.obj
+       treectlg.obj
 
 COMMONOBJS = &
        y_tab.obj &
@@ -110,6 +112,7 @@ COMMONOBJS = &
        docview.obj &
        dynarray.obj &
        dynlib.obj &
+       effects.obj &
        encconv.obj &
        event.obj &
        extended.obj &
@@ -159,6 +162,7 @@ COMMONOBJS = &
        prntbase.obj &
        process.obj &
        protocol.obj &
+       quantize.obj &
        resource.obj &
        sckaddr.obj &
        sckfile.obj &
@@ -175,6 +179,7 @@ COMMONOBJS = &
        textfile.obj &
        timercmn.obj &
        tokenzr.obj &
+       treebase.obj &
        txtstrm.obj &
        unzip.obj &
        url.obj &
@@ -701,6 +706,9 @@ dynarray.obj:     $(COMMDIR)\dynarray.cpp
 dynlib.obj:     $(COMMDIR)\dynlib.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+effects.obj:     $(COMMDIR)\effects.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 encconv.obj:     $(COMMDIR)\encconv.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
@@ -848,6 +856,9 @@ process.obj:     $(COMMDIR)\process.cpp
 protocol.obj:     $(COMMDIR)\protocol.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+quantize.obj:     $(COMMDIR)\quantize.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 resource.obj:     $(COMMDIR)\resource.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
@@ -896,6 +907,9 @@ timercmn.obj:     $(COMMDIR)\timercmn.cpp
 tokenzr.obj:     $(COMMDIR)\tokenzr.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+treebase.obj:     $(COMMDIR)\treebase.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 txtstrm.obj:     $(COMMDIR)\txtstrm.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
@@ -964,6 +978,9 @@ calctrl.obj:     $(GENDIR)\calctrl.cpp
 choicdgg.obj:     $(GENDIR)\choicdgg.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+dirctrlg.obj:     $(GENDIR)\dirctrlg.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 dragimgg.obj:     $(GENDIR)\dragimgg.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
@@ -1006,6 +1023,9 @@ sashwin.obj:     $(GENDIR)\sashwin.cpp
 scrolwin.obj:     $(GENDIR)\scrolwin.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
+splash.obj:     $(GENDIR)\splash.cpp
+  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
 splitter.obj:     $(GENDIR)\splitter.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index 0d54480eb5cdd21ba301c9f997eb30ebf90ff026..24ead62f4f62a3c8175e62386d12bf5e47b6dadd 100644 (file)
@@ -46,9 +46,8 @@
 #include "wx/log.h"
 #include "wx/dynarray.h"
 #include "wx/imaglist.h"
-#include "wx/treectrl.h"
 #include "wx/settings.h"
-
+#include "wx/msw/treectrl.h"
 #include "wx/msw/dragimag.h"
 
 #ifdef __GNUWIN32_OLD__
@@ -2257,6 +2256,11 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
                     delete data; // can't be NULL here
 
                     m_itemsWithIndirectData.Remove(item);
+#if 0
+                    int iIndex = m_itemsWithIndirectData.Index(item);
+                    wxASSERT( iIndex != wxNOT_FOUND) ;
+                    m_itemsWithIndirectData.wxBaseArray::RemoveAt((size_t)iIndex);
+#endif
                 }
                 else
                 {
@@ -2326,18 +2330,5 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
     return processed;
 }
 
-// ----------------------------------------------------------------------------
-// Tree event
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
-
-wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
-           : wxNotifyEvent(commandType, id)
-{
-    m_code = 0;
-    m_itemOld = 0;
-}
-
 #endif // __WIN95__
 
index 348b16a69737b2178fdf34fb8b1d99321d8cad5b..a0017bd78bab0bdbb842c808a95cfc6cae1f649f 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 01:34, 2000/03/05
+# This file was automatically generated by tmake at 15:57, 2000/08/04
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE OS2.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -7,6 +7,7 @@ ALL_SOURCES = \
                generic/choicdgg.cpp \
                generic/colrdlgg.cpp \
                generic/dcpsg.cpp \
+               generic/dirctrlg.cpp \
                generic/grid.cpp \
                generic/gridsel.cpp \
                generic/helpext.cpp \
@@ -29,12 +30,13 @@ ALL_SOURCES = \
                generic/proplist.cpp \
                generic/sashwin.cpp \
                generic/scrolwin.cpp \
+               generic/splash.cpp \
                generic/splitter.cpp \
                generic/statusbr.cpp \
                generic/tbarsmpl.cpp \
                generic/textdlgg.cpp \
                generic/tipdlg.cpp \
-               generic/treectrl.cpp \
+               generic/treectlg.cpp \
                generic/treelay.cpp \
                generic/wizard.cpp \
                common/appcmn.cpp \
@@ -57,6 +59,7 @@ ALL_SOURCES = \
                common/docview.cpp \
                common/dynarray.cpp \
                common/dynlib.cpp \
+               common/effects.cpp \
                common/encconv.cpp \
                common/event.cpp \
                common/extended.c \
@@ -105,6 +108,7 @@ ALL_SOURCES = \
                common/prntbase.cpp \
                common/process.cpp \
                common/protocol.cpp \
+               common/quantize.cpp \
                common/resource.cpp \
                common/sckaddr.cpp \
                common/sckfile.cpp \
@@ -121,6 +125,7 @@ ALL_SOURCES = \
                common/textfile.cpp \
                common/timercmn.cpp \
                common/tokenzr.cpp \
+               common/treebase.cpp \
                common/txtstrm.cpp \
                common/unzip.c \
                common/url.cpp \
@@ -297,6 +302,7 @@ ALL_HEADERS = \
                filesys.h \
                font.h \
                fontdlg.h \
+               fontenc.h \
                fontenum.h \
                fontmap.h \
                fontutil.h \
@@ -315,6 +321,7 @@ ALL_HEADERS = \
                hash.h \
                help.h \
                helpbase.h \
+               helpchm.h \
                helphtml.h \
                helpwin.h \
                helpxlp.h \
@@ -414,6 +421,7 @@ ALL_HEADERS = \
                tokenzr.h \
                toolbar.h \
                tooltip.h \
+               treebase.h \
                treectrl.h \
                txtstrm.h \
                types.h \
@@ -516,6 +524,7 @@ ALL_HEADERS = \
                generic/choicdgg.h \
                generic/colrdlgg.h \
                generic/dcpsg.h \
+               generic/dirctrlg.h \
                generic/dirdlgg.h \
                generic/dragimgg.h \
                generic/filedlgg.h \
@@ -542,7 +551,7 @@ ALL_HEADERS = \
                generic/statusbr.h \
                generic/tabg.h \
                generic/textdlgg.h \
-               generic/treectrl.h \
+               generic/treectlg.h \
                generic/wizard.h \
                html/forcelnk.h \
                html/helpctrl.h \
@@ -584,6 +593,7 @@ COMMONOBJS = \
                docview.o \
                dynarray.o \
                dynlib.o \
+               effects.o \
                encconv.o \
                event.o \
                extended.o \
@@ -632,6 +642,7 @@ COMMONOBJS = \
                prntbase.o \
                process.o \
                protocol.o \
+               quantize.o \
                resource.o \
                sckaddr.o \
                sckfile.o \
@@ -648,6 +659,7 @@ COMMONOBJS = \
                textfile.o \
                timercmn.o \
                tokenzr.o \
+               treebase.o \
                txtstrm.o \
                unzip.o \
                url.o \
@@ -685,6 +697,7 @@ COMMONDEPS = \
                docview.d \
                dynarray.d \
                dynlib.d \
+               effects.d \
                encconv.d \
                event.d \
                extended.d \
@@ -733,6 +746,7 @@ COMMONDEPS = \
                prntbase.d \
                process.d \
                protocol.d \
+               quantize.d \
                resource.d \
                sckaddr.d \
                sckfile.d \
@@ -749,6 +763,7 @@ COMMONDEPS = \
                textfile.d \
                timercmn.d \
                tokenzr.d \
+               treebase.d \
                txtstrm.d \
                unzip.d \
                url.d \
@@ -771,6 +786,7 @@ GENERICOBJS = \
                choicdgg.o \
                colrdlgg.o \
                dcpsg.o \
+               dirctrlg.o \
                grid.o \
                gridsel.o \
                helpext.o \
@@ -793,12 +809,13 @@ GENERICOBJS = \
                proplist.o \
                sashwin.o \
                scrolwin.o \
+               splash.o \
                splitter.o \
                statusbr.o \
                tbarsmpl.o \
                textdlgg.o \
                tipdlg.o \
-               treectrl.o \
+               treectlg.o \
                treelay.o \
                wizard.o
 
@@ -809,6 +826,7 @@ GENERICDEPS = \
                choicdgg.d \
                colrdlgg.d \
                dcpsg.d \
+               dirctrlg.d \
                grid.d \
                gridsel.d \
                helpext.d \
@@ -831,12 +849,13 @@ GENERICDEPS = \
                proplist.d \
                sashwin.d \
                scrolwin.d \
+               splash.d \
                splitter.d \
                statusbr.d \
                tbarsmpl.d \
                textdlgg.d \
                tipdlg.d \
-               treectrl.d \
+               treectlg.d \
                treelay.d \
                wizard.d
 
index 899b1902c7eebc48ca481fe470844f3aea61a777..b35b9110cdd0a0caacb30a18a2ed6c34d4c78c0c 100644 (file)
@@ -440,6 +440,10 @@ SOURCE=.\common\tokenzr.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\treebase.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\common\txtstrm.cpp
 # End Source File
 # Begin Source File
@@ -624,6 +628,10 @@ SOURCE=.\generic\tipdlg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\generic\treectlg.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\generic\treelay.cpp
 # End Source File
 # Begin Source File
index 3038c83f718d24e01229f2f5cfec3371aa1831bd..eab6437c6e1e3db68877a8a9a9df460c59308c1c 100644 (file)
@@ -451,6 +451,10 @@ SOURCE=.\common\tokenzr.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\common\treebase.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\common\txtstrm.cpp
 # End Source File
 # Begin Source File
@@ -622,6 +626,10 @@ SOURCE=.\generic\tipdlg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\generic\treectlg.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\generic\treelay.cpp
 # End Source File
 # Begin Source File