#ifndef _WX_TREECTRL_H_
#define _WX_TREECTRL_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "treectrl.h"
-#endif
-
#include "wx/textctrl.h"
#include "wx/imaglist.h"
typedef long wxDataType;
// fwd decl
-class wxImageList;
+class WXDLLIMPEXP_CORE wxImageList;
struct wxTreeViewItem;
// a callback function used for sorting tree items, it should return -1 if the
// first item precedes the second, +1 if the second precedes the first or 0 if
// they're equivalent
-class wxTreeItemData;
+class WXDLLIMPEXP_CORE wxTreeItemData;
typedef int (*wxTreeItemCmpFunc)(wxTreeItemData *item1, wxTreeItemData *item2);
// ----------------------------------------------------------------------------
// NB: all the following flags are for compatbility only and will be removed in
// next versions
-// 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
// 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
+ // versions of wxWidgets
// for wxTreeCtrl usage only
wxTreeItemId(GtkTreeItem *itemId) { m_itemId = itemId; }
// --------
wxTreeCtrl() { Init(); }
- wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
+ wxTreeCtrl(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
virtual ~wxTreeCtrl();
- bool Create(wxWindow *parent, wxWindowID id = -1,
+ bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
// number of children
// ------------------
- // if 'recursively' is FALSE, only immediate children count, otherwise
+ // 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);
+ size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = true);
// navigation
// ----------
- // wxTreeItemId.IsOk() will return FALSE if there is no such item
+ // wxTreeItemId.IsOk() will return false if there is no such item
// get the root tree item
wxTreeItemId GetRootItem() const;
// edited simultaneously)
wxTextCtrl* GetEditControl() const;
// end editing and accept or discard the changes to item label
- void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
+ void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false);
// sort the children of this item using the specified callback function
// (it should return -1, 0 or +1 as usual), if it's not specified
// ----------
// these methods are deprecated and will be removed in future versions of
- // wxWindows, they're here for compatibility only, don't use them in new
+ // wxWidgets, they're here for compatibility only, don't use them in new
// code (the comments indicate why these methods are now useless and how to
// replace them)