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/wxColourPickerCtrl.erl | 49 ++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) (limited to 'lib/wx/src/gen/wxColourPickerCtrl.erl') diff --git a/lib/wx/src/gen/wxColourPickerCtrl.erl b/lib/wx/src/gen/wxColourPickerCtrl.erl index 60776925b9..91889006f9 100644 --- a/lib/wx/src/gen/wxColourPickerCtrl.erl +++ b/lib/wx/src/gen/wxColourPickerCtrl.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 @@ -74,6 +74,7 @@ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1, update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxColourPickerCtrl/0]). %% @hidden parent_class(wxPickerBase) -> true; parent_class(wxControl) -> true; @@ -81,21 +82,29 @@ parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxColourPickerCtrl() +-type wxColourPickerCtrl() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxColourPickerCtrl(). new() -> wxe_util:construct(?wxColourPickerCtrl_new_0, <<>>). -%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxColourPickerCtrl() %% @equiv new(Parent,Id, []) +-spec new(Parent, Id) -> wxColourPickerCtrl() 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]) -> wxColourPickerCtrl() -%% Option = {col, wx:colour()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {style, integer()} | {validator, wx:wx()} %% @doc See external documentation. +-spec new(Parent, Id, [Option]) -> wxColourPickerCtrl() when + Parent::wxWindow:wxWindow(), Id::integer(), + Option :: {col, wx:wx_colour()} + | {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), @@ -109,15 +118,22 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options) wxe_util:construct(?wxColourPickerCtrl_new_3, <>). -%% @spec (This::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer()) -> bool() %% @equiv create(This,Parent,Id, []) +-spec create(This, Parent, Id) -> boolean() when + This::wxColourPickerCtrl(), 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::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), [Option]) -> bool() -%% Option = {col, wx:colour()} | {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::wxColourPickerCtrl(), Parent::wxWindow:wxWindow(), Id::integer(), + Option :: {col, wx:wx_colour()} + | {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,wxColourPickerCtrl), @@ -132,22 +148,19 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O wxe_util:call(?wxColourPickerCtrl_Create, <>). -%% @spec (This::wxColourPickerCtrl()) -> wx:colour() %% @doc See external documentation. +-spec getColour(This) -> wx:wx_colour() when + This::wxColourPickerCtrl(). getColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxColourPickerCtrl), wxe_util:call(?wxColourPickerCtrl_GetColour, <>). -%% @spec (This::wxColourPickerCtrl(),X::string()|term()) -> bool()|ok %% @doc See external documentation. -%%
Alternatives: -%%

-%% setColour(This::wxColourPickerCtrl(), Text::string()) -> bool() -%%

-%%

-%% setColour(This::wxColourPickerCtrl(), Col::wx:colour()) -> ok -%%

+-spec setColour(This, Text) -> boolean() when + This::wxColourPickerCtrl(), Text::string(); + (This, Col) -> ok when + This::wxColourPickerCtrl(), Col::wx:wx_colour(). setColour(#wx_ref{type=ThisT,ref=ThisRef},Text) when is_list(Text) -> ?CLASS(ThisT,wxColourPickerCtrl), @@ -160,8 +173,8 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Col) wxe_util:cast(?wxColourPickerCtrl_SetColour_1_1, <>). -%% @spec (This::wxColourPickerCtrl()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxColourPickerCtrl) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxColourPickerCtrl), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3 From 217343d158afe60a5a6a15e8b894b6fd62611ad3 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 21 Feb 2012 16:05:37 +0100 Subject: [wx] Fix spec errors --- lib/wx/src/gen/wxColourPickerCtrl.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/wx/src/gen/wxColourPickerCtrl.erl') diff --git a/lib/wx/src/gen/wxColourPickerCtrl.erl b/lib/wx/src/gen/wxColourPickerCtrl.erl index 91889006f9..d9e0d20df8 100644 --- a/lib/wx/src/gen/wxColourPickerCtrl.erl +++ b/lib/wx/src/gen/wxColourPickerCtrl.erl @@ -149,7 +149,7 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id, O <>). %% @doc See external documentation. --spec getColour(This) -> wx:wx_colour() when +-spec getColour(This) -> wx:wx_colour4() when This::wxColourPickerCtrl(). getColour(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxColourPickerCtrl), @@ -158,7 +158,7 @@ getColour(#wx_ref{type=ThisT,ref=ThisRef}) -> %% @doc See external documentation. -spec setColour(This, Text) -> boolean() when - This::wxColourPickerCtrl(), Text::string(); + This::wxColourPickerCtrl(), Text::unicode:chardata(); (This, Col) -> ok when This::wxColourPickerCtrl(), Col::wx:wx_colour(). setColour(#wx_ref{type=ThisT,ref=ThisRef},Text) @@ -174,7 +174,7 @@ setColour(#wx_ref{type=ThisT,ref=ThisRef},Col) <>). %% @doc Destroys this object, do not use object again --spec destroy(This::wxColourPickerCtrl) -> ok. +-spec destroy(This::wxColourPickerCtrl()) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxColourPickerCtrl), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3 From ec9ee1b76343c146cec17d0642dd9d1db7bbf3d6 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 24 Feb 2012 11:53:41 +0100 Subject: [wx] Doc overloaded functions edoc do not handle overloaded type-specs, so doc them manually --- lib/wx/src/gen/wxColourPickerCtrl.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/wx/src/gen/wxColourPickerCtrl.erl') diff --git a/lib/wx/src/gen/wxColourPickerCtrl.erl b/lib/wx/src/gen/wxColourPickerCtrl.erl index d9e0d20df8..5fd51eba15 100644 --- a/lib/wx/src/gen/wxColourPickerCtrl.erl +++ b/lib/wx/src/gen/wxColourPickerCtrl.erl @@ -157,6 +157,10 @@ getColour(#wx_ref{type=ThisT,ref=ThisRef}) -> <>). %% @doc See external documentation. +%%
Also:
+%% setColour(This, Col) -> ok when
+%% This::wxColourPickerCtrl(), Col::wx:wx_colour().
+%% -spec setColour(This, Text) -> boolean() when This::wxColourPickerCtrl(), Text::unicode:chardata(); (This, Col) -> ok when -- cgit v1.2.3