%% %% %CopyrightBegin% %% %% 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. %% You may obtain a copy of the License at %% %% http://www.apache.org/licenses/LICENSE-2.0 %% %% Unless required by applicable law or agreed to in writing, software %% distributed under the License is distributed on an "AS IS" BASIS, %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %% See the License for the specific language governing permissions and %% limitations under the License. %% %% %CopyrightEnd% %% This file is generated DO NOT EDIT %% @doc See external documentation: wxMenu. %%

This class is derived (and can use functions) from: %%
{@link wxEvtHandler} %%

%% @type wxMenu(). An object reference, The representation is internal %% and can be changed without notice. It can't be used for comparsion %% stored on disc or distributed for use on other nodes. -module(wxMenu). -include("wxe.hrl"). -export(['Destroy'/2,append/2,append/3,append/4,append/5,appendCheckItem/3,appendCheckItem/4, appendRadioItem/3,appendRadioItem/4,appendSeparator/1,break/1,check/3, delete/2,destroy/1,enable/3,findItem/2,findItemByPosition/2,getHelpString/2, getLabel/2,getMenuItemCount/1,getMenuItems/1,getTitle/1,insert/3,insert/4, insert/5,insert/6,insertCheckItem/4,insertCheckItem/5,insertRadioItem/4, insertRadioItem/5,insertSeparator/2,isChecked/2,isEnabled/2,new/0, new/1,new/2,prepend/2,prepend/3,prepend/4,prepend/5,prependCheckItem/3, prependCheckItem/4,prependRadioItem/3,prependRadioItem/4,prependSeparator/1, remove/2,setHelpString/3,setLabel/3,setTitle/2]). %% inherited exports -export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]). -export_type([wxMenu/0]). %% @hidden parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -type wxMenu() :: wx:wx_object(). %% @equiv new([]) -spec new() -> wxMenu(). new() -> new([]). %% @doc See external documentation. -spec new([Option]) -> wxMenu() when Option :: {'style', integer()}. new(Options) when is_list(Options) -> MOpts = fun({style, Style}, Acc) -> [<<1:32/?UI,Style:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:construct(?wxMenu_new_1, <>). %% @doc See external documentation. -spec new(Title, [Option]) -> wxMenu() when Title::unicode:chardata(), Option :: {'style', integer()}. new(Title, Options) when is_list(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, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:construct(?wxMenu_new_2, <<(byte_size(Title_UC)):32/?UI,(Title_UC)/binary, 0:(((8- ((4+byte_size(Title_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). %% @doc See external documentation. -spec append(This, Item) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Item::wxMenuItem:wxMenuItem(). append(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Append_1, <>). %% @equiv append(This,Itemid,Text, []) -spec append(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). append(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> append(This,Itemid,Text, []). %% @doc See external documentation. %%
Also:
%% append(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(),
%% Option :: {'help', unicode:chardata()}
%% | {'kind', wx:wx_enum()}.
%% %%
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()}. append(This,Itemid,Text,Submenu) when is_record(This, wx_ref),is_integer(Itemid),is_list(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) -> ?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]; ({kind, Kind}, Acc) -> [<<2:32/?UI,Kind:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Append_3, <>). %% @doc See external documentation. %%
Also:
%% append(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
%% Option :: {'help', unicode:chardata()}.
%% -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()}. append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable) when is_integer(Itemid),is_list(Text),is_list(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, <>); 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) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), 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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Append_4_1, <>). %% @equiv appendCheckItem(This,Itemid,Text, []) -spec appendCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). appendCheckItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> appendCheckItem(This,Itemid,Text, []). %% @doc See external documentation. -spec appendCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_AppendCheckItem, <>). %% @equiv appendRadioItem(This,Itemid,Text, []) -spec appendRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). appendRadioItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> appendRadioItem(This,Itemid,Text, []). %% @doc See external documentation. -spec appendRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_AppendRadioItem, <>). %% @doc See external documentation. -spec appendSeparator(This) -> wxMenuItem:wxMenuItem() when This::wxMenu(). appendSeparator(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_AppendSeparator, <>). %% @doc See external documentation. -spec break(This) -> 'ok' when This::wxMenu(). break(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Break, <>). %% @doc See external documentation. -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) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Check, <>). %% @doc See external documentation. %%
Also:
%% delete(This, Item) -> boolean() when
%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().
%% -spec delete(This, Itemid) -> boolean() when This::wxMenu(), Itemid::integer(); (This, Item) -> boolean() when This::wxMenu(), Item::wxMenuItem:wxMenuItem(). delete(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_Delete_1_0, <>); delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Delete_1_1, <>). %% @doc See external documentation. %%
Also:
%% 'Destroy'(This, Item) -> boolean() when
%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().
%% -spec 'Destroy'(This, Itemid) -> boolean() when This::wxMenu(), Itemid::integer(); (This, Item) -> boolean() when This::wxMenu(), Item::wxMenuItem:wxMenuItem(). 'Destroy'(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_Destroy_1_0, <>); 'Destroy'(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Destroy_1_1, <>). %% @doc See external documentation. -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) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Enable, <>). %% @doc See external documentation. %%
Also:
%% findItem(This, Item) -> integer() when
%% This::wxMenu(), Item::unicode:chardata().
%% -spec findItem(This, Itemid) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(); (This, Item) -> integer() when This::wxMenu(), Item::unicode:chardata(). findItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_FindItem_2, <>); findItem(#wx_ref{type=ThisT,ref=ThisRef},Item) when is_list(Item) -> ?CLASS(ThisT,wxMenu), Item_UC = unicode:characters_to_binary([Item,0]), wxe_util:call(?wxMenu_FindItem_1, <>). %% @doc See external documentation. -spec findItemByPosition(This, Position) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Position::integer(). findItemByPosition(#wx_ref{type=ThisT,ref=ThisRef},Position) when is_integer(Position) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_FindItemByPosition, <>). %% @doc See external documentation. -spec getHelpString(This, Itemid) -> unicode:charlist() when This::wxMenu(), Itemid::integer(). getHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetHelpString, <>). %% @doc See external documentation. -spec getLabel(This, Itemid) -> unicode:charlist() when This::wxMenu(), Itemid::integer(). getLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetLabel, <>). %% @doc See external documentation. -spec getMenuItemCount(This) -> integer() when This::wxMenu(). getMenuItemCount(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetMenuItemCount, <>). %% @doc See external documentation. -spec getMenuItems(This) -> [wxMenuItem:wxMenuItem()] when This::wxMenu(). getMenuItems(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetMenuItems, <>). %% @doc See external documentation. -spec getTitle(This) -> unicode:charlist() when This::wxMenu(). getTitle(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetTitle, <>). %% @doc See external documentation. %%
Also:
%% insert(This, Pos, Item) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem().
%% %%
Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX -spec insert(This, Pos, Itemid) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(); (This, Pos, Item) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem(). insert(This,Pos,Itemid) when is_record(This, wx_ref),is_integer(Pos),is_integer(Itemid) -> insert(This,Pos,Itemid, []); insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ItemT,ref=ItemRef}) when is_integer(Pos) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Insert_2, <>). %% @doc See external documentation. %%
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()}. insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, Options) when is_integer(Pos),is_integer(Itemid),is_list(Options) -> ?CLASS(ThisT,wxMenu), MOpts = fun({text, Text}, Acc) -> Text_UC = unicode:characters_to_binary([Text,0]),[<<1: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>>|Acc]; ({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<2: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]; ({kind, Kind}, Acc) -> [<<3:32/?UI,Kind:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Insert_3, <>). %% @equiv insert(This,Pos,Itemid,Text,Submenu, []) -spec insert(This, Pos, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when 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) -> insert(This,Pos,Itemid,Text,Submenu, []). %% @doc See external documentation. %%
Also:
%% insert(This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Pos::integer(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
%% Option :: {'help', unicode:chardata()}.
%% -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()}. 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) -> ?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, <>); 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) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), 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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Insert_5_1, <>). %% @equiv insertCheckItem(This,Pos,Itemid,Text, []) -spec insertCheckItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when 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) -> insertCheckItem(This,Pos,Itemid,Text, []). %% @doc See external documentation. -spec insertCheckItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_InsertCheckItem, <>). %% @equiv insertRadioItem(This,Pos,Itemid,Text, []) -spec insertRadioItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when 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) -> insertRadioItem(This,Pos,Itemid,Text, []). %% @doc See external documentation. -spec insertRadioItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_InsertRadioItem, <>). %% @doc See external documentation. -spec insertSeparator(This, Pos) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Pos::integer(). insertSeparator(#wx_ref{type=ThisT,ref=ThisRef},Pos) when is_integer(Pos) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_InsertSeparator, <>). %% @doc See external documentation. -spec isChecked(This, Itemid) -> boolean() when This::wxMenu(), Itemid::integer(). isChecked(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_IsChecked, <>). %% @doc See external documentation. -spec isEnabled(This, Itemid) -> boolean() when This::wxMenu(), Itemid::integer(). isEnabled(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_IsEnabled, <>). %% @doc See external documentation. %%
Also:
%% prepend(This, Item) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().
%% %%
Kind = ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX -spec prepend(This, Itemid) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(); (This, Item) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Item::wxMenuItem:wxMenuItem(). prepend(This,Itemid) when is_record(This, wx_ref),is_integer(Itemid) -> prepend(This,Itemid, []); prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Prepend_1, <>). %% @doc See external documentation. %%
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()}. prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options) when is_integer(Itemid),is_list(Options) -> ?CLASS(ThisT,wxMenu), MOpts = fun({text, Text}, Acc) -> Text_UC = unicode:characters_to_binary([Text,0]),[<<1: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>>|Acc]; ({help, Help}, Acc) -> Help_UC = unicode:characters_to_binary([Help,0]),[<<2: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]; ({kind, Kind}, Acc) -> [<<3:32/?UI,Kind:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Prepend_2, <>). %% @equiv prepend(This,Itemid,Text,Submenu, []) -spec prepend(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when 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) -> prepend(This,Itemid,Text,Submenu, []). %% @doc See external documentation. %%
Also:
%% prepend(This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Itemid::integer(), Text::unicode:chardata(), Submenu::wxMenu(),
%% Option :: {'help', unicode:chardata()}.
%% -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()}. prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,Help,IsCheckable) when is_integer(Itemid),is_list(Text),is_list(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, <>); 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) -> ?CLASS(ThisT,wxMenu), Text_UC = unicode:characters_to_binary([Text,0]), ?CLASS(SubmenuT,wxMenu), 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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_Prepend_4_1, <>). %% @equiv prependCheckItem(This,Itemid,Text, []) -spec prependCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). prependCheckItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> prependCheckItem(This,Itemid,Text, []). %% @doc See external documentation. -spec prependCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_PrependCheckItem, <>). %% @equiv prependRadioItem(This,Itemid,Text, []) -spec prependRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::unicode:chardata(). prependRadioItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> prependRadioItem(This,Itemid,Text, []). %% @doc See external documentation. -spec prependRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(), Text::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) -> ?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]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), wxe_util:call(?wxMenu_PrependRadioItem, <>). %% @doc See external documentation. -spec prependSeparator(This) -> wxMenuItem:wxMenuItem() when This::wxMenu(). prependSeparator(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_PrependSeparator, <>). %% @doc See external documentation. %%
Also:
%% remove(This, Item) -> wxMenuItem:wxMenuItem() when
%% This::wxMenu(), Item::wxMenuItem:wxMenuItem().
%% -spec remove(This, Itemid) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Itemid::integer(); (This, Item) -> wxMenuItem:wxMenuItem() when This::wxMenu(), Item::wxMenuItem:wxMenuItem(). remove(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_Remove_1_0, <>); remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> ?CLASS(ThisT,wxMenu), ?CLASS(ItemT,wxMenuItem), wxe_util:call(?wxMenu_Remove_1_1, <>). %% @doc See external documentation. -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) -> ?CLASS(ThisT,wxMenu), HelpString_UC = unicode:characters_to_binary([HelpString,0]), wxe_util:cast(?wxMenu_SetHelpString, <>). %% @doc See external documentation. -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) -> ?CLASS(ThisT,wxMenu), Label_UC = unicode:characters_to_binary([Label,0]), wxe_util:cast(?wxMenu_SetLabel, <>). %% @doc See external documentation. -spec setTitle(This, Title) -> 'ok' when This::wxMenu(), Title::unicode:chardata(). setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) when is_list(Title) -> ?CLASS(ThisT,wxMenu), Title_UC = unicode:characters_to_binary([Title,0]), wxe_util:cast(?wxMenu_SetTitle, <>). %% @doc Destroys this object, do not use object again -spec destroy(This::wxMenu()) -> 'ok'. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxMenu), wxe_util:destroy(?DESTROY_OBJECT,Obj), ok. %% From wxEvtHandler %% @hidden disconnect(This,EventType, Options) -> wxEvtHandler:disconnect(This,EventType, Options). %% @hidden disconnect(This,EventType) -> wxEvtHandler:disconnect(This,EventType). %% @hidden disconnect(This) -> wxEvtHandler:disconnect(This). %% @hidden connect(This,EventType, Options) -> wxEvtHandler:connect(This,EventType, Options). %% @hidden connect(This,EventType) -> wxEvtHandler:connect(This,EventType).