wxTreeCtrl interface fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-03-29 17:14:52 +00:00
parent 20ebd9ffbf
commit 2c033d4a12
2 changed files with 92 additions and 12 deletions

View File

@@ -31,20 +31,15 @@ public:
*/
bool IsOk() const;
//@{
/**
Operators for comparison between wxTreeItemId objects.
*/
bool operator ==(const wxTreeItemId& item) const;
bool operator !=(const wxTreeItemId& item) const;
//@}
/**
Antonym of IsOk(), i.e. returns @true only if the item is not valid.
*/
bool operator !() const;
void* GetID() const;
void Unset();
};
bool operator==(const wxTreeItemId& left, const wxTreeItemId& right);
bool operator!=(const wxTreeItemId& left, const wxTreeItemId& right);
/**
@class wxTreeItemData
@@ -138,3 +133,64 @@ enum wxTreeItemIcon
wxTreeItemIcon_SelectedExpanded,
wxTreeItemIcon_Max
};
/// special values for the 'state' parameter of wxTreeCtrl::SetItemState()
static const int wxTREE_ITEMSTATE_NONE = -1; // not state (no display state image)
static const int wxTREE_ITEMSTATE_NEXT = -2; // cycle to the next state
static const int wxTREE_ITEMSTATE_PREV = -3; // cycle to the previous state
#define wxTR_NO_BUTTONS 0x0000 // for convenience
#define wxTR_HAS_BUTTONS 0x0001 // draw collapsed/expanded btns
#define wxTR_NO_LINES 0x0004 // don't draw lines at all
#define wxTR_LINES_AT_ROOT 0x0008 // connect top-level nodes
#define wxTR_TWIST_BUTTONS 0x0010 // still used by wxTreeListCtrl
#define wxTR_SINGLE 0x0000 // for convenience
#define wxTR_MULTIPLE 0x0020 // can select multiple items
#define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080 // what it says
#define wxTR_EDIT_LABELS 0x0200 // can edit item labels
#define wxTR_ROW_LINES 0x0400 // put border around items
#define wxTR_HIDE_ROOT 0x0800 // don't display root node
#define wxTR_FULL_ROW_HIGHLIGHT 0x2000 // highlight full horz space
// make the default control appearance look more native-like depending on the
// platform
#define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT)
// 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;

View File

@@ -1146,3 +1146,27 @@ public:
*/
void SetToolTip(const wxString& tooltip);
};
wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG;
wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG;
wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT;
wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT;
wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM;
wxEventType wxEVT_COMMAND_TREE_GET_INFO;
wxEventType wxEVT_COMMAND_TREE_SET_INFO;
wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED;
wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING;
wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED;
wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING;
wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED;
wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING;
wxEventType wxEVT_COMMAND_TREE_KEY_DOWN;
wxEventType wxEVT_COMMAND_TREE_ITEM_ACTIVATED;
wxEventType wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
wxEventType wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK;
wxEventType wxEVT_COMMAND_TREE_END_DRAG;
wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK;
wxEventType wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP;
wxEventType wxEVT_COMMAND_TREE_ITEM_MENU;