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/wxButton.erl | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'lib/wx/src/gen/wxButton.erl') diff --git a/lib/wx/src/gen/wxButton.erl b/lib/wx/src/gen/wxButton.erl index a75c45c5a3..facd885175 100644 --- a/lib/wx/src/gen/wxButton.erl +++ b/lib/wx/src/gen/wxButton.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 @@ -70,27 +70,36 @@ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1, update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxButton/0]). %% @hidden parent_class(wxControl) -> true; parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxButton() +-type wxButton() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxButton(). new() -> wxe_util:construct(?wxButton_new_0, <<>>). -%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxButton() %% @equiv new(Parent,Id, []) +-spec new(Parent, Id) -> wxButton() when + Parent::wxWindow:wxWindow(), Id::integer(). + new(Parent,Id) when is_record(Parent, wx_ref),is_integer(Id) -> new(Parent,Id, []). -%% @spec (Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> wxButton() -%% Option = {label, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()} %% @doc See external documentation. +-spec new(Parent, Id, [Option]) -> wxButton() when + Parent::wxWindow:wxWindow(), Id::integer(), + Option :: {label, string()} + | {pos, {X::integer(), Y::integer()}} + | {size, {W::integer(), H::integer()}} + | {style, integer()} + | {validator, wx:wx()}. new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options) when is_integer(Id),is_list(Options) -> ?CLASS(ParentT,wxWindow), @@ -104,15 +113,22 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options) wxe_util:construct(?wxButton_new_3, <>). -%% @spec (This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool() %% @equiv create(This,Parent,Id, []) +-spec create(This, Parent, Id) -> boolean() when + This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(). + create(This,Parent,Id) when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id) -> create(This,Parent,Id, []). -%% @spec (This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool() -%% Option = {label, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()} %% @doc See external documentation. +-spec create(This, Parent, Id, [Option]) -> boolean() when + This::wxButton(), Parent::wxWindow:wxWindow(), Id::integer(), + Option :: {label, string()} + | {pos, {X::integer(), Y::integer()}} + | {size, {W::integer(), H::integer()}} + | {style, integer()} + | {validator, wx:wx()}. create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, Options) when is_integer(Id),is_list(Options) -> ?CLASS(ThisT,wxButton), @@ -127,21 +143,23 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O wxe_util:call(?wxButton_Create, <>). -%% @spec () -> {W::integer(), H::integer()} %% @doc See external documentation. +-spec getDefaultSize() -> {W::integer(), H::integer()}. getDefaultSize() -> wxe_util:call(?wxButton_GetDefaultSize, <<>>). -%% @spec (This::wxButton()) -> ok %% @doc See external documentation. +-spec setDefault(This) -> ok when + This::wxButton(). setDefault(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxButton), wxe_util:cast(?wxButton_SetDefault, <>). -%% @spec (This::wxButton(), Label::string()) -> ok %% @doc See external documentation. +-spec setLabel(This, Label) -> ok when + This::wxButton(), Label::string(). setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label) when is_list(Label) -> ?CLASS(ThisT,wxButton), @@ -149,8 +167,8 @@ setLabel(#wx_ref{type=ThisT,ref=ThisRef},Label) wxe_util:cast(?wxButton_SetLabel, <>). -%% @spec (This::wxButton()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxButton) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxButton), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3