aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test/wx_class_SUITE.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-01-23 15:21:47 +0100
committerDan Gudmundsson <[email protected]>2013-01-23 15:21:47 +0100
commit489b963bae3dd522bca228978f0b164ec422fc6f (patch)
tree4fcc707cbdc1ba091e651c6fd3ec77f222a1bbc6 /lib/wx/test/wx_class_SUITE.erl
parent694513b8297e09e22fdf47d63772b5044ef50164 (diff)
downloadotp-489b963bae3dd522bca228978f0b164ec422fc6f.tar.gz
otp-489b963bae3dd522bca228978f0b164ec422fc6f.tar.bz2
otp-489b963bae3dd522bca228978f0b164ec422fc6f.zip
wx: Add wxTreeCtrl:isTreeItemIdOk/1
Since I have replaced the wxTreeItemIdClass with integers, there is no way to verify that it is a valid wxTreeItemId that is returned from the wxTreeCtrl:getItem* functions. Still the check is that is non null so beware don't construct your own id's.
Diffstat (limited to 'lib/wx/test/wx_class_SUITE.erl')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 3e4d9cd528..4186d73c88 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -139,7 +139,9 @@ treeCtrl(Config) ->
{true, {X0,Y0,W0,H0}} = ?m({_,_},wxTreeCtrl:getBoundingRect(Tree, Item1, [{textOnly, true}])),
?m({true, {_,Y1,_,_}} when Y1 > Y0, wxTreeCtrl:getBoundingRect(Tree, Item2)),
?m({Item1, _}, wxTreeCtrl:hitTest(Tree, {X0+W0 div 2, Y0+H0 div 2})),
+ ?m(true, wxTreeCtrl:isTreeItemIdOk(Item1)),
?m({0, _}, wxTreeCtrl:hitTest(Tree, {X0+W0 div 2, Y0+H0+H0})),
+ ?m(false, wxTreeCtrl:isTreeItemIdOk(0)),
wxFrame:connect(Tree, command_tree_item_expanded),
wxFrame:connect(Tree, command_tree_item_collapsed),