// Created: 01/23/03
// RCS-ID: $Id$
// Copyright: (c) David Webster
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TREECTRL_H_
// headers
// ----------------------------------------------------------------------------
-#ifdef __GNUG__
- #pragma interface "treectrl.h"
-#endif
-
#if wxUSE_TREECTRL
#include "wx/textctrl.h"
// they're equivalent
class wxTreeItemData;
-// flags for deprecated `Expand(int action)'
-enum
-{
- wxTREE_EXPAND_EXPAND,
- wxTREE_EXPAND_COLLAPSE,
- wxTREE_EXPAND_COLLAPSE_RESET,
- wxTREE_EXPAND_TOGGLE
-};
-
// flags for deprecated InsertItem() variant
#define wxTREE_INSERT_FIRST 0xFFFF0001
#define wxTREE_INSERT_LAST 0xFFFF0002
wxTreeCtrl() { Init(); }
wxTreeCtrl( wxWindow* pParent
- ,wxWindowID vId = -1
+ ,wxWindowID vId = wxID_ANY
,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize
,long lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT
virtual ~wxTreeCtrl();
bool Create( wxWindow* pParent
- ,wxWindowID vId = -1
+ ,wxWindowID vId = wxID_ANY
,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize
,long lStyle = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT
// usage and loading time.
//
void SetItemHasChildren( const wxTreeItemId& rItem
- ,bool bHas = TRUE
+ ,bool bHas = true
);
//
// The item will be shown in bold
//
void SetItemBold( const wxTreeItemId& rItem
- ,bool bBold = TRUE
+ ,bool bBold = true
);
//
// The item will be shown with a drop highlight
//
void SetItemDropHighlight( const wxTreeItemId& rItem
- ,bool bHighlight = TRUE
+ ,bool bHighlight = true
);
//
//
//
- // If 'recursively' is FALSE, only immediate children count, otherwise
+ // If 'bRecursively' is false, only immediate children count, otherwise
// the returned number is the number of all items in this branch
//
size_t GetChildrenCount( const wxTreeItemId& rItem
- ,bool bRecursively = TRUE
+ ,bool bRecursively = true
) const;
//
//
wxTreeItemId GetItemParent(const wxTreeItemId& rItem) const;
-#if WXWIN_COMPATIBILITY_2_2
- // deprecated: Use GetItemParent instead.
- wxTreeItemId GetParent(const wxTreeItemId& rItem) const
- { return GetItemParent(rItem); }
-
- // Expose the base class method hidden by the one above.
- wxWindow* GetParent(void) const { return wxControl::GetParent(); }
-#endif // WXWIN_COMPATIBILITY_2_2
-
// for this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
// to make these functions reentrant (i.e. allow more than one
// End editing and accept or discard the changes to item label
//
void EndEditLabel( const wxTreeItemId& rItem
- ,bool bDiscardChanges = FALSE
+ ,bool bDiscardChanges = false
);
//
//
bool GetBoundingRect( const wxTreeItemId& rItem
,wxRect& rRect
- ,bool bTextOnly = FALSE
+ ,bool bTextOnly = false
) const;
//
//
// Use Set/GetImageList and Set/GetStateImageList
//
- wxImageList* GetImageList(int nVal) const
- { return GetImageList(); }
- void SetImageList(wxImageList* pImageList, int nVal)
- { SetImageList(pImageList); }
+ wxDEPRECATED( wxImageList* GetImageList(int nVal) const );
+ wxDEPRECATED( void SetImageList(wxImageList* pImageList, int nVal) );
//
// Use Set/GetItemImage directly
//
- int GetItemSelectedImage(const wxTreeItemId& rItem) const
- { return GetItemImage(rItem, wxTreeItemIcon_Selected); }
- void SetItemSelectedImage(const wxTreeItemId& rItem, int nImage)
- { SetItemImage(rItem, nImage, wxTreeItemIcon_Selected); }
+ wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& rItem) const );
+ wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& rItem, int nImage) );
+
//
// For this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
//
bool IsItemChecked(const wxTreeItemId& rItem) const;
void SetItemCheck( const wxTreeItemId& rItem
- ,bool bCheck = TRUE
+ ,bool bCheck = true
);
protected:
wxMapTreeAttr m_vAttrs;
//
- // TRUE if the hash above is not empty
+ // true if the hash above is not empty
//
bool m_bHasAnyAttr;