aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-01-25 15:56:43 +0100
committerDan Gudmundsson <[email protected]>2013-01-25 15:56:43 +0100
commit697e9178b8c9dc825e221f2750afac516478976a (patch)
tree30ed18f6a14c825b7ee78fac8ab82c4ad63e4f5a /lib/wx/test
parented2be3f6913559b8d9ffd65609b7a2ca32367c05 (diff)
parent489b963bae3dd522bca228978f0b164ec422fc6f (diff)
downloadotp-697e9178b8c9dc825e221f2750afac516478976a.tar.gz
otp-697e9178b8c9dc825e221f2750afac516478976a.tar.bz2
otp-697e9178b8c9dc825e221f2750afac516478976a.zip
Merge branch 'dgud/wx/treectrl/OTP-10743'
* dgud/wx/treectrl/OTP-10743: wx: Add wxTreeCtrl:isTreeItemIdOk/1 wx: Fix wxTreeCtrl return values
Diffstat (limited to 'lib/wx/test')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 22bfa53e0a..4186d73c88 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -130,11 +130,19 @@ treeCtrl(Config) ->
wxWindow:setSizerAndFit(Panel, Sizer),
wxFrame:show(Frame),
+ ok = wxTreeCtrl:expand(Tree, Root),
?m([], wxTreeCtrl:getItemData(Tree, Root)),
?m({data,item1}, wxTreeCtrl:getItemData(Tree, Item1)),
?m({data,item2}, wxTreeCtrl:getItemData(Tree, Item2)),
?m({data,item3}, wxTreeCtrl:getItemData(Tree, Item3)),
+ {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),
wxFrame:connect(Frame, close_window),