diff options
Diffstat (limited to 'lib/wx/src/gen/wxMenu.erl')
-rw-r--r-- | lib/wx/src/gen/wxMenu.erl | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/lib/wx/src/gen/wxMenu.erl b/lib/wx/src/gen/wxMenu.erl index a9911e7ded..26fe23701d 100644 --- a/lib/wx/src/gen/wxMenu.erl +++ b/lib/wx/src/gen/wxMenu.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2013. All Rights Reserved. +%% Copyright Ericsson AB 2008-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ new() -> %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>. -spec new([Option]) -> wxMenu() when - Option :: {style, integer()}. + Option :: {'style', integer()}. new(Options) when is_list(Options) -> MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc]; @@ -67,9 +67,9 @@ new(Options) %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuwxmenu">external documentation</a>. -spec new(Title, [Option]) -> wxMenu() when Title::unicode:chardata(), - Option :: {style, integer()}. + Option :: {'style', integer()}. new(Title, Options) - when is_list(Title),is_list(Options) -> + when ?is_chardata(Title),is_list(Options) -> Title_UC = unicode:characters_to_binary([Title,0]), MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, @@ -91,29 +91,29 @@ append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). append(This,Itemid,Text) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text) -> append(This,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuappend">external documentation</a>. %% <br /> Also:<br /> %% append(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when<br /> %% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),<br /> -%% Option :: {help, unicode:chardata()}<br /> -%% | {kind, wx:wx_enum()}.<br /> +%% Option :: {'help', unicode:chardata()}<br /> +%% | {'kind', wx:wx_enum()}.<br /> %% %%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX -spec append(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(); (This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()} - | {kind, wx:wx_enum()}. + Option :: {'help', unicode:chardata()} + | {'kind', wx:wx_enum()}. append(This,Itemid,Text,Submenu) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text),is_record(Submenu, wx_ref) -> append(This,Itemid,Text,Submenu, []); append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -127,22 +127,22 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) %% <br /> Also:<br /> %% append(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br /> %% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br /> -%% Option :: {help, unicode:chardata()}.<br /> +%% Option :: {'help', unicode:chardata()}.<br /> %% --spec append(This, Itemid, Text, Help, IsCheckable) -> ok when +-spec append(This, Itemid, Text, Help, IsCheckable) -> 'ok' when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean(); (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable) - when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) -> + when is_integer(Itemid),?is_chardata(Text),?is_chardata(Help),is_boolean(IsCheckable) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), Help_UC = unicode:characters_to_binary([Help,0]), wxe_util:cast(?wxMenu_Append_4_0, <<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((4+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8,(wxe_util:from_bool(IsCheckable)):32/?UI>>); append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=SubmenuRef}, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), @@ -157,15 +157,15 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Sub This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). appendCheckItem(This,Itemid,Text) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text) -> appendCheckItem(This,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuappendcheckitem">external documentation</a>. -spec appendCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -179,15 +179,15 @@ appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). appendRadioItem(This,Itemid,Text) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text) -> appendRadioItem(This,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuappendradioitem">external documentation</a>. -spec appendRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -205,7 +205,7 @@ appendSeparator(#wx_ref{type=ThisT,ref=ThisRef}) -> <<ThisRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenubreak">external documentation</a>. --spec break(This) -> ok when +-spec break(This) -> 'ok' when This::wxMenu(). break(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), @@ -213,7 +213,7 @@ break(#wx_ref{type=ThisT,ref=ThisRef}) -> <<ThisRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenucheck">external documentation</a>. --spec check(This, Itemid, Check) -> ok when +-spec check(This, Itemid, Check) -> 'ok' when This::wxMenu(), Itemid::integer(), Check::boolean(). check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check) when is_integer(Itemid),is_boolean(Check) -> @@ -262,7 +262,7 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> <<ThisRef:32/?UI,ItemRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuenable">external documentation</a>. --spec enable(This, Itemid, Enable) -> ok when +-spec enable(This, Itemid, Enable) -> 'ok' when This::wxMenu(), Itemid::integer(), Enable::boolean(). enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable) when is_integer(Itemid),is_boolean(Enable) -> @@ -285,7 +285,7 @@ findItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid) wxe_util:call(?wxMenu_FindItem_2, <<ThisRef:32/?UI,Itemid:32/?UI>>); findItem(#wx_ref{type=ThisT,ref=ThisRef},Item) - when is_list(Item) -> + when ?is_chardata(Item) -> ?CLASS(ThisT,wxMenu), Item_UC = unicode:characters_to_binary([Item,0]), wxe_util:call(?wxMenu_FindItem_1, @@ -367,9 +367,9 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ItemT,ref=ItemRef}) %%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX -spec insert(This, Pos, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), - Option :: {text, unicode:chardata()} - | {help, unicode:chardata()} - | {kind, wx:wx_enum()}. + Option :: {'text', unicode:chardata()} + | {'help', unicode:chardata()} + | {'kind', wx:wx_enum()}. insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options) when is_integer(Pos),is_integer(Itemid),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -386,29 +386,29 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options) This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(). insert(This,Pos,Itemid,Text,Submenu) - when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) -> + when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),?is_chardata(Text),is_record(Submenu, wx_ref) -> insert(This,Pos,Itemid,Text,Submenu, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuinsert">external documentation</a>. %% <br /> Also:<br /> %% insert(This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br /> %% This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br /> -%% Option :: {help, unicode:chardata()}.<br /> +%% Option :: {'help', unicode:chardata()}.<br /> %% --spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> ok when +-spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> 'ok' when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean(); (This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,Help,IsCheckable) - when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) -> + when is_integer(Pos),is_integer(Itemid),?is_chardata(Text),?is_chardata(Help),is_boolean(IsCheckable) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), Help_UC = unicode:characters_to_binary([Help,0]), wxe_util:cast(?wxMenu_Insert_5_0, <<ThisRef:32/?UI,Pos:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((4+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8,(wxe_util:from_bool(IsCheckable)):32/?UI>>); insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,#wx_ref{type=SubmenuT,ref=SubmenuRef}, Options) - when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Pos),is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), @@ -423,15 +423,15 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,#wx_ref{type=SubmenuT,ref This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(). insertCheckItem(This,Pos,Itemid,Text) - when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),?is_chardata(Text) -> insertCheckItem(This,Pos,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuinsertcheckitem">external documentation</a>. -spec insertCheckItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options) - when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Pos),is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -445,15 +445,15 @@ insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options) This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(). insertRadioItem(This,Pos,Itemid,Text) - when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid),?is_chardata(Text) -> insertRadioItem(This,Pos,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuinsertradioitem">external documentation</a>. -spec insertRadioItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. insertRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options) - when is_integer(Pos),is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Pos),is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -513,9 +513,9 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> %%<br /> Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX -spec prepend(This, Itemid, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), - Option :: {text, unicode:chardata()} - | {help, unicode:chardata()} - | {kind, wx:wx_enum()}. + Option :: {'text', unicode:chardata()} + | {'help', unicode:chardata()} + | {'kind', wx:wx_enum()}. prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options) when is_integer(Itemid),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -532,29 +532,29 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options) This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(). prepend(This,Itemid,Text,Submenu) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text),is_record(Submenu, wx_ref) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text),is_record(Submenu, wx_ref) -> prepend(This,Itemid,Text,Submenu, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuprepend">external documentation</a>. %% <br /> Also:<br /> %% prepend(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when<br /> %% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),<br /> -%% Option :: {help, unicode:chardata()}.<br /> +%% Option :: {'help', unicode:chardata()}.<br /> %% --spec prepend(This, Itemid, Text, Help, IsCheckable) -> ok when +-spec prepend(This, Itemid, Text, Help, IsCheckable) -> 'ok' when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Help::unicode:chardata(), IsCheckable::boolean(); (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable) - when is_integer(Itemid),is_list(Text),is_list(Help),is_boolean(IsCheckable) -> + when is_integer(Itemid),?is_chardata(Text),?is_chardata(Help),is_boolean(IsCheckable) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), Help_UC = unicode:characters_to_binary([Help,0]), wxe_util:cast(?wxMenu_Prepend_4_0, <<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((4+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((4+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8,(wxe_util:from_bool(IsCheckable)):32/?UI>>); prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=SubmenuRef}, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), @@ -569,15 +569,15 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Su This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). prependCheckItem(This,Itemid,Text) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text) -> prependCheckItem(This,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuprependcheckitem">external documentation</a>. -spec prependCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -591,15 +591,15 @@ prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). prependRadioItem(This,Itemid,Text) - when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> + when is_record(This, wx_ref),is_integer(Itemid),?is_chardata(Text) -> prependRadioItem(This,Itemid,Text, []). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenuprependradioitem">external documentation</a>. -spec prependRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), - Option :: {help, unicode:chardata()}. + Option :: {'help', unicode:chardata()}. prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) - when is_integer(Itemid),is_list(Text),is_list(Options) -> + when is_integer(Itemid),?is_chardata(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), MOpts = fun({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<1:32/?UI,(byte_size(Help_UC)):32/?UI,(Help_UC)/binary, 0:(((8- ((0+byte_size(Help_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; @@ -637,37 +637,37 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> <<ThisRef:32/?UI,ItemRef:32/?UI>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusethelpstring">external documentation</a>. --spec setHelpString(This, Itemid, HelpString) -> ok when +-spec setHelpString(This, Itemid, HelpString) -> 'ok' when This::wxMenu(), Itemid::integer(), HelpString::unicode:chardata(). setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString) - when is_integer(Itemid),is_list(HelpString) -> + when is_integer(Itemid),?is_chardata(HelpString) -> ?CLASS(ThisT,wxMenu), HelpString_UC = unicode:characters_to_binary([HelpString,0]), wxe_util:cast(?wxMenu_SetHelpString, <<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(HelpString_UC)):32/?UI,(HelpString_UC)/binary, 0:(((8- ((4+byte_size(HelpString_UC)) band 16#7)) band 16#7))/unit:8>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusetlabel">external documentation</a>. --spec setLabel(This, Itemid, Label) -> ok when +-spec setLabel(This, Itemid, Label) -> 'ok' when This::wxMenu(), Itemid::integer(), Label::unicode:chardata(). setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label) - when is_integer(Itemid),is_list(Label) -> + when is_integer(Itemid),?is_chardata(Label) -> ?CLASS(ThisT,wxMenu), Label_UC = unicode:characters_to_binary([Label,0]), wxe_util:cast(?wxMenu_SetLabel, <<ThisRef:32/?UI,Itemid:32/?UI,(byte_size(Label_UC)):32/?UI,(Label_UC)/binary, 0:(((8- ((4+byte_size(Label_UC)) band 16#7)) band 16#7))/unit:8>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxmenu.html#wxmenusettitle">external documentation</a>. --spec setTitle(This, Title) -> ok when +-spec setTitle(This, Title) -> 'ok' when This::wxMenu(), Title::unicode:chardata(). setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) - when is_list(Title) -> + when ?is_chardata(Title) -> ?CLASS(ThisT,wxMenu), Title_UC = unicode:characters_to_binary([Title,0]), wxe_util:cast(?wxMenu_SetTitle, <<ThisRef:32/?UI,(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((0+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8>>). %% @doc Destroys this object, do not use object again --spec destroy(This::wxMenu()) -> ok. +-spec destroy(This::wxMenu()) -> 'ok'. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxMenu), wxe_util:destroy(?DESTROY_OBJECT,Obj), |