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/wxSingleChoiceDialog.erl | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'lib/wx/src/gen/wxSingleChoiceDialog.erl') diff --git a/lib/wx/src/gen/wxSingleChoiceDialog.erl b/lib/wx/src/gen/wxSingleChoiceDialog.erl index e2b835917e..741e935e41 100644 --- a/lib/wx/src/gen/wxSingleChoiceDialog.erl +++ b/lib/wx/src/gen/wxSingleChoiceDialog.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. 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 @@ -77,6 +77,7 @@ transferDataFromWindow/1,transferDataToWindow/1,update/1,updateWindowUI/1, updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxSingleChoiceDialog/0]). %% @hidden parent_class(wxDialog) -> true; parent_class(wxTopLevelWindow) -> true; @@ -84,21 +85,26 @@ parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxSingleChoiceDialog() +-type wxSingleChoiceDialog() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxSingleChoiceDialog(). new() -> wxe_util:construct(?wxSingleChoiceDialog_new_0, <<>>). -%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]]) -> wxSingleChoiceDialog() %% @equiv new(Parent,Message,Caption,Choices, []) +-spec new(Parent, Message, Caption, Choices) -> wxSingleChoiceDialog() when + Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]]. + new(Parent,Message,Caption,Choices) when is_record(Parent, wx_ref),is_list(Message),is_list(Caption),is_list(Choices) -> new(Parent,Message,Caption,Choices, []). -%% @spec (Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]], [Option]) -> wxSingleChoiceDialog() -%% Option = {style, integer()} | {pos, {X::integer(), Y::integer()}} %% @doc See external documentation. +-spec new(Parent, Message, Caption, Choices, [Option]) -> wxSingleChoiceDialog() when + Parent::wxWindow:wxWindow(), Message::string(), Caption::string(), Choices::[[string()]], + Option :: {style, integer()} + | {pos, {X::integer(), Y::integer()}}. new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options) when is_list(Message),is_list(Caption),is_list(Choices),is_list(Options) -> ?CLASS(ParentT,wxWindow), @@ -113,30 +119,33 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Message,Caption,Choices, Options) wxe_util:construct(?wxSingleChoiceDialog_new_5, <>|| UC_Str <- Choices_UCA>>)/binary, 0:(((8- ((4 + lists:sum([byte_size(S)+4||S<-Choices_UCA])) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). -%% @spec (This::wxSingleChoiceDialog()) -> integer() %% @doc See external documentation. +-spec getSelection(This) -> integer() when + This::wxSingleChoiceDialog(). getSelection(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxSingleChoiceDialog), wxe_util:call(?wxSingleChoiceDialog_GetSelection, <>). -%% @spec (This::wxSingleChoiceDialog()) -> string() %% @doc See external documentation. +-spec getStringSelection(This) -> string() when + This::wxSingleChoiceDialog(). getStringSelection(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxSingleChoiceDialog), wxe_util:call(?wxSingleChoiceDialog_GetStringSelection, <>). -%% @spec (This::wxSingleChoiceDialog(), Sel::integer()) -> ok %% @doc See external documentation. +-spec setSelection(This, Sel) -> ok when + This::wxSingleChoiceDialog(), Sel::integer(). setSelection(#wx_ref{type=ThisT,ref=ThisRef},Sel) when is_integer(Sel) -> ?CLASS(ThisT,wxSingleChoiceDialog), wxe_util:cast(?wxSingleChoiceDialog_SetSelection, <>). -%% @spec (This::wxSingleChoiceDialog()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxSingleChoiceDialog) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxSingleChoiceDialog), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3