From a181c06152a3c935fdf63659322020fb7625b577 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 16 Feb 2012 11:04:18 +0100 Subject: [wx] Generated types for all wx classes --- lib/wx/src/gen/wxMenu.erl | 286 ++++++++++++++++++++++++---------------------- 1 file changed, 149 insertions(+), 137 deletions(-) (limited to 'lib/wx/src/gen/wxMenu.erl') diff --git a/lib/wx/src/gen/wxMenu.erl b/lib/wx/src/gen/wxMenu.erl index 615a845d11..dd674b117d 100644 --- a/lib/wx/src/gen/wxMenu.erl +++ b/lib/wx/src/gen/wxMenu.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. 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 @@ -40,18 +40,21 @@ %% 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}). -%% @spec () -> wxMenu() +-type wxMenu() :: wx:wx_object(). %% @equiv new([]) +-spec new() -> wxMenu(). + new() -> new([]). -%% @spec ([Option]) -> wxMenu() -%% Option = {style, integer()} %% @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]; @@ -60,9 +63,10 @@ new(Options) wxe_util:construct(?wxMenu_new_1, <>). -%% @spec (Title::string(), [Option]) -> wxMenu() -%% Option = {style, integer()} %% @doc See external documentation. +-spec new(Title, [Option]) -> wxMenu() when + Title::string(), + Option :: {style, integer()}. new(Title, Options) when is_list(Title),is_list(Options) -> Title_UC = unicode:characters_to_binary([Title,0]), @@ -72,31 +76,30 @@ new(Title, 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. +-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, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv append(This,Itemid,Text, []) +-spec append(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(). + 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 -%%

+-spec append(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(); + (This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), + Option :: {help, string()} + | {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) -> @@ -112,16 +115,12 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, 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()} -%%

+-spec append(This, Itemid, Text, Help, IsCheckable) -> ok when + This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::boolean(); + (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), + 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), @@ -140,15 +139,18 @@ append(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Sub wxe_util:call(?wxMenu_Append_4_1, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv appendCheckItem(This,Itemid,Text, []) +-spec appendCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(). + 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. +-spec appendCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), + Option :: {help, string()}. appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) when is_integer(Itemid),is_list(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -159,15 +161,18 @@ appendCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) wxe_util:call(?wxMenu_AppendCheckItem, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv appendRadioItem(This,Itemid,Text, []) +-spec appendRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(). + 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. +-spec appendRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), + Option :: {help, string()}. appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) when is_integer(Itemid),is_list(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -178,37 +183,36 @@ appendRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) wxe_util:call(?wxMenu_AppendRadioItem, <>). -%% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem() %% @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, <>). -%% @spec (This::wxMenu()) -> ok %% @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, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Check::bool()) -> ok %% @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, <>). -%% @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() -%%

+-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), @@ -220,15 +224,11 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> 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() -%%

+-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), @@ -240,23 +240,20 @@ delete(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> wxe_util:call(?wxMenu_Destroy_1_1, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Enable::bool()) -> ok %% @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, <>). -%% @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() -%%

+-spec findItem(This, Itemid) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(); + (This, Item) -> integer() when + This::wxMenu(), Item::string(). findItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid) when is_integer(Itemid) -> ?CLASS(ThisT,wxMenu), @@ -269,59 +266,62 @@ findItem(#wx_ref{type=ThisT,ref=ThisRef},Item) wxe_util:call(?wxMenu_FindItem_1, <>). -%% @spec (This::wxMenu(), Position::integer()) -> wxMenuItem:wxMenuItem() %% @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, <>). -%% @spec (This::wxMenu(), Itemid::integer()) -> string() %% @doc See external documentation. +-spec getHelpString(This, Itemid) -> string() 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, <>). -%% @spec (This::wxMenu(), Itemid::integer()) -> string() %% @doc See external documentation. +-spec getLabel(This, Itemid) -> string() 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, <>). -%% @spec (This::wxMenu()) -> integer() %% @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, <>). -%% @spec (This::wxMenu()) -> [wxMenuItem:wxMenuItem()] %% @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, <>). -%% @spec (This::wxMenu()) -> string() %% @doc See external documentation. +-spec getTitle(This) -> string() when + This::wxMenu(). 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() -%%

+-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) -> @@ -333,11 +333,13 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,#wx_ref{type=ItemT,ref=ItemRef}) 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 +%%
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, string()} + | {help, string()} + | {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), @@ -349,22 +351,20 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid, 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, []) +-spec insert(This, Pos, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), 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, []). -%% @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()} -%%

+-spec insert(This, Pos, Itemid, Text, Help, IsCheckable) -> ok when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::boolean(); + (This, Pos, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), Submenu::wxMenu(), + 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), @@ -383,15 +383,18 @@ insert(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text,#wx_ref{type=SubmenuT,ref wxe_util:call(?wxMenu_Insert_5_1, <>). -%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv insertCheckItem(This,Pos,Itemid,Text, []) +-spec insertCheckItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(). + 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. +-spec insertCheckItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), + Option :: {help, string()}. 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), @@ -402,15 +405,18 @@ insertCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options) wxe_util:call(?wxMenu_InsertCheckItem, <>). -%% @spec (This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv insertRadioItem(This,Pos,Itemid,Text, []) +-spec insertRadioItem(This, Pos, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(). + 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. +-spec insertRadioItem(This, Pos, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Pos::integer(), Itemid::integer(), Text::string(), + Option :: {help, string()}. 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), @@ -421,38 +427,38 @@ insertRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Pos,Itemid,Text, Options) wxe_util:call(?wxMenu_InsertRadioItem, <>). -%% @spec (This::wxMenu(), Pos::integer()) -> wxMenuItem:wxMenuItem() %% @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, <>). -%% @spec (This::wxMenu(), Itemid::integer()) -> bool() %% @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, <>). -%% @spec (This::wxMenu(), Itemid::integer()) -> bool() %% @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, <>). -%% @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() -%%

+-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) -> @@ -463,11 +469,13 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> 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 +%%
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, string()} + | {help, string()} + | {kind, wx:wx_enum()}. prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options) when is_integer(Itemid),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -479,22 +487,20 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid, Options) wxe_util:call(?wxMenu_Prepend_2, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu()) -> wxMenuItem:wxMenuItem() %% @equiv prepend(This,Itemid,Text,Submenu, []) +-spec prepend(This, Itemid, Text, Submenu) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), 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, []). -%% @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()} -%%

+-spec prepend(This, Itemid, Text, Help, IsCheckable) -> ok when + This::wxMenu(), Itemid::integer(), Text::string(), Help::string(), IsCheckable::boolean(); + (This, Itemid, Text, Submenu, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), Submenu::wxMenu(), + 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), @@ -513,15 +519,18 @@ prepend(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text,#wx_ref{type=SubmenuT,ref=Su wxe_util:call(?wxMenu_Prepend_4_1, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv prependCheckItem(This,Itemid,Text, []) +-spec prependCheckItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(). + 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. +-spec prependCheckItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), + Option :: {help, string()}. prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) when is_integer(Itemid),is_list(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -532,15 +541,18 @@ prependCheckItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) wxe_util:call(?wxMenu_PrependCheckItem, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Text::string()) -> wxMenuItem:wxMenuItem() %% @equiv prependRadioItem(This,Itemid,Text, []) +-spec prependRadioItem(This, Itemid, Text) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(). + 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. +-spec prependRadioItem(This, Itemid, Text, [Option]) -> wxMenuItem:wxMenuItem() when + This::wxMenu(), Itemid::integer(), Text::string(), + Option :: {help, string()}. prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) when is_integer(Itemid),is_list(Text),is_list(Options) -> ?CLASS(ThisT,wxMenu), @@ -551,22 +563,19 @@ prependRadioItem(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Text, Options) wxe_util:call(?wxMenu_PrependRadioItem, <>). -%% @spec (This::wxMenu()) -> wxMenuItem:wxMenuItem() %% @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, <>). -%% @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() -%%

+-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), @@ -578,8 +587,9 @@ remove(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ItemT,ref=ItemRef}) -> wxe_util:call(?wxMenu_Remove_1_1, <>). -%% @spec (This::wxMenu(), Itemid::integer(), HelpString::string()) -> ok %% @doc See external documentation. +-spec setHelpString(This, Itemid, HelpString) -> ok when + This::wxMenu(), Itemid::integer(), HelpString::string(). setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString) when is_integer(Itemid),is_list(HelpString) -> ?CLASS(ThisT,wxMenu), @@ -587,8 +597,9 @@ setHelpString(#wx_ref{type=ThisT,ref=ThisRef},Itemid,HelpString) wxe_util:cast(?wxMenu_SetHelpString, <>). -%% @spec (This::wxMenu(), Itemid::integer(), Label::string()) -> ok %% @doc See external documentation. +-spec setLabel(This, Itemid, Label) -> ok when + This::wxMenu(), Itemid::integer(), Label::string(). setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label) when is_integer(Itemid),is_list(Label) -> ?CLASS(ThisT,wxMenu), @@ -596,8 +607,9 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Itemid,Label) wxe_util:cast(?wxMenu_SetLabel, <>). -%% @spec (This::wxMenu(), Title::string()) -> ok %% @doc See external documentation. +-spec setTitle(This, Title) -> ok when + This::wxMenu(), Title::string(). setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) when is_list(Title) -> ?CLASS(ThisT,wxMenu), @@ -605,8 +617,8 @@ setTitle(#wx_ref{type=ThisT,ref=ThisRef},Title) wxe_util:cast(?wxMenu_SetTitle, <>). -%% @spec (This::wxMenu()) -> ok %% @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), -- cgit v1.2.3