%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2008-2009. 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 %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. %% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights 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]). %% @hidden parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). %% @spec () -> wxMenu() %% @equiv new([]) new() -> new([]). %% @spec ([Option]) -> wxMenu() %% Option = {style, integer()} %% @doc See external documentation. 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, <>). %% @spec (Title::string(), [Option]) -> wxMenu() %% Option = {style, integer()} %% @doc See external documentation. 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>>). %% @spec (This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv append(This,Itemid,Text, []) append(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> append(This,Itemid,Text, []). %% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::wxMenu()|term()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% append(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> append(This,Itemid,Text,Submenu, [])

%%

%% append(This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %%
Option = {help, string()} | {kind, WxItemKind} %%
WxItemKind = integer() %%
WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX %%

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, <>). %% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% append(This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok %%

%%

%% append(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() %%
Option = {help, string()} %%

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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv appendCheckItem(This,Itemid,Text, []) appendCheckItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> appendCheckItem(This,Itemid,Text, []). %% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv appendRadioItem(This,Itemid,Text, []) appendRadioItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> appendRadioItem(This,Itemid,Text, []). %% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. appendSeparator(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_AppendSeparator, <>). %% @spec (This::wxMenu()) -> ok %% @doc See external documentation. break(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Break, <>). %% @spec (This::wxMenu(), Itemid::integer(), Check::bool()) -> ok %% @doc See external documentation. check(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Check) when is_integer(Itemid),is_boolean(Check) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Check, <>). %% @spec (This::wxMenu(),X::integer()|term()) -> bool() %% @doc See external documentation. %%
Alternatives: %%

%% delete(This::wxMenu(), Itemid::integer()) -> bool() %%

%%

%% delete(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> bool() %%

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, <>). %% @spec (This::wxMenu(),X::integer()|term()) -> bool() %% @doc See external documentation. %%
Alternatives: %%

%% 'Destroy'(This::wxMenu(), Itemid::integer()) -> bool() %%

%%

%% 'Destroy'(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> bool() %%

'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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Enable::bool()) -> ok %% @doc See external documentation. enable(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Enable) when is_integer(Itemid),is_boolean(Enable) -> ?CLASS(ThisT,wxMenu), wxe_util:cast(?wxMenu_Enable, <>). %% @spec (This::wxMenu(),X::integer()|string()) -> wxMenuItem:wxMenuItem()|integer() %% @doc See external documentation. %%
Alternatives: %%

%% findItem(This::wxMenu(), Itemid::integer()) -> wxMenuItem:wxMenuItem() %%

%%

%% findItem(This::wxMenu(), Item::string()) -> integer() %%

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, <>). %% @spec (This::wxMenu(), Position::integer()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. findItemByPosition(#wx_ref{type=ThisT,ref=ThisRef},Position) when is_integer(Position) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_FindItemByPosition, <>). %% @spec (This::wxMenu(), Itemid::integer()) -> string() %% @doc See external documentation. getHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetHelpString, <>). %% @spec (This::wxMenu(), Itemid::integer()) -> string() %% @doc See external documentation. getLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetLabel, <>). %% @spec (This::wxMenu()) -> integer() %% @doc See external documentation. getMenuItemCount(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetMenuItemCount, <>). %% @spec (This::wxMenu()) -> [wxMenuItem:wxMenuItem()] %% @doc See external documentation. getMenuItems(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetMenuItems, <>). %% @spec (This::wxMenu()) -> string() %% @doc See external documentation. getTitle(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_GetTitle, <>). %% @spec (This::wxMenu(),Pos::integer(),X::integer()|term()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% insert(This::wxMenu(), Pos::integer(), Itemid::integer()) -> insert(This,Pos,Itemid, [])

%%

%% insert(This::wxMenu(), Pos::integer(), Item::wxMenuItem:wxMenuItem()) -> 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, <>). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {text, string()} | {help, string()} | {kind, WxItemKind} %% WxItemKind = integer() %% @doc See external documentation. %%
WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX 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, <>). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> wxMenuItem:wxMenuItem() %% @equiv insert(This,Pos,Itemid,Text,Submenu, []) 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, []). %% @spec (This::wxMenu(),Pos::integer(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% insert(This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok %%

%%

%% insert(This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() %%
Option = {help, string()} %%

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, <>). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv insertCheckItem(This,Pos,Itemid,Text, []) 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, []). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv insertRadioItem(This,Pos,Itemid,Text, []) 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, []). %% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Pos::integer()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. insertSeparator(#wx_ref{type=ThisT,ref=ThisRef},Pos) when is_integer(Pos) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_InsertSeparator, <>). %% @spec (This::wxMenu(), Itemid::integer()) -> bool() %% @doc See external documentation. isChecked(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_IsChecked, <>). %% @spec (This::wxMenu(), Itemid::integer()) -> bool() %% @doc See external documentation. isEnabled(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_IsEnabled, <>). %% @spec (This::wxMenu(),X::integer()|term()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% prepend(This::wxMenu(), Itemid::integer()) -> prepend(This,Itemid, [])

%%

%% prepend(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {text, string()} | {help, string()} | {kind, WxItemKind} %% WxItemKind = integer() %% @doc See external documentation. %%
WxItemKind is one of ?wxITEM_SEPARATOR | ?wxITEM_NORMAL | ?wxITEM_CHECK | ?wxITEM_RADIO | ?wxITEM_MAX 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> wxMenuItem:wxMenuItem() %% @equiv prepend(This,Itemid,Text,Submenu, []) 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, []). %% @spec (This::wxMenu(),Itemid::integer(),Text::string(),X::string()|wxMenu(),X::bool()|term()) -> ok|wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% prepend(This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::bool()) -> ok %%

%%

%% prepend(This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), [Option]) -> wxMenuItem:wxMenuItem() %%
Option = {help, string()} %%

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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv prependCheckItem(This,Itemid,Text, []) prependCheckItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> prependCheckItem(This,Itemid,Text, []). %% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv prependRadioItem(This,Itemid,Text, []) prependRadioItem(This,Itemid,Text) when is_record(This, wx_ref),is_integer(Itemid),is_list(Text) -> prependRadioItem(This,Itemid,Text, []). %% @spec (This::wxMenu(), Itemid::integer(), Text::string(), [Option]) -> wxMenuItem:wxMenuItem() %% Option = {help, string()} %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. prependSeparator(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxMenu), wxe_util:call(?wxMenu_PrependSeparator, <>). %% @spec (This::wxMenu(),X::integer()|term()) -> wxMenuItem:wxMenuItem() %% @doc See external documentation. %%
Alternatives: %%

%% remove(This::wxMenu(), Itemid::integer()) -> wxMenuItem:wxMenuItem() %%

%%

%% remove(This::wxMenu(), Item::wxMenuItem:wxMenuItem()) -> 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), HelpString::string()) -> ok %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Itemid::integer(), Label::string()) -> ok %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu(), Title::string()) -> ok %% @doc See external documentation. 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, <>). %% @spec (This::wxMenu()) -> ok %% @doc Destroys this object, do not use object again 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).