aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-08-27 10:56:07 +0200
committerDan Gudmundsson <[email protected]>2013-08-27 10:56:07 +0200
commitf910a7e636df45678c3f075172d4da5540e1b664 (patch)
tree27480cc2ed1d8bf56f6d1ef156ac7b487fdaa98d /lib/wx
parent475402a87c2e2e59c6ff24e68f740e5eb2ef9077 (diff)
downloadotp-f910a7e636df45678c3f075172d4da5540e1b664.tar.gz
otp-f910a7e636df45678c3f075172d4da5540e1b664.tar.bz2
otp-f910a7e636df45678c3f075172d4da5540e1b664.zip
wx: Add toolbar testcase
Diffstat (limited to 'lib/wx')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 7c3eda0be1..0e151ccc9b 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -50,7 +50,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[calendarCtrl, treeCtrl, notebook, staticBoxSizer,
clipboard, helpFrame, htmlWindow, listCtrlSort, listCtrlVirtual,
- radioBox, systemSettings, taskBarIcon].
+ radioBox, systemSettings, taskBarIcon, toolbar].
groups() ->
[].
@@ -493,3 +493,20 @@ taskBarIcon(Config) ->
wxTaskBarIcon:connect(TBI, taskbar_left_down, [{callback, fun(Ev,_) -> io:format("Left clicked: ~p~n",[Ev]) end}]),
wxTaskBarIcon:connect(TBI, taskbar_right_down, [{callback,fun(Ev,_) -> io:format("Right clicked: ~p~n",[Ev]) end}]),
wx_test_lib:wx_destroy(Frame,Config).
+
+toolbar(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+toolbar(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
+ TB = wxFrame:createToolBar(Frame),
+ wxToolBar:addTool(TB, 747, "PressMe", wxArtProvider:getBitmap("wxART_COPY", [{size, {16,16}}]),
+ [{shortHelp, "Press Me"}]),
+
+ Add = fun(#wx{}, _) ->
+ wxToolBar:addTool(TB, -1, "Added", wxArtProvider:getBitmap("wxART_TICK_MARK", [{size, {16,16}}]),
+ [{shortHelp, "Test 2 popup text"}])
+ end,
+
+ wxFrame:connect(Frame, command_menu_selected, [{callback, Add}, {id, 747}]),
+ wxFrame:show(Frame),
+ wx_test_lib:wx_destroy(Frame,Config).