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/wxComboBox.erl | 92 +++++++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 29 deletions(-) (limited to 'lib/wx/src/gen/wxComboBox.erl') diff --git a/lib/wx/src/gen/wxComboBox.erl b/lib/wx/src/gen/wxComboBox.erl index f743df4e93..88cee2e3a4 100644 --- a/lib/wx/src/gen/wxComboBox.erl +++ b/lib/wx/src/gen/wxComboBox.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 @@ -76,6 +76,7 @@ show/1,show/2,thaw/1,transferDataFromWindow/1,transferDataToWindow/1, update/1,updateWindowUI/1,updateWindowUI/2,validate/1,warpPointer/3]). +-export_type([wxComboBox/0]). %% @hidden parent_class(wxControlWithItems) -> true; parent_class(wxControl) -> true; @@ -83,21 +84,30 @@ parent_class(wxWindow) -> true; parent_class(wxEvtHandler) -> true; parent_class(_Class) -> erlang:error({badtype, ?MODULE}). -%% @spec () -> wxComboBox() +-type wxComboBox() :: wx:wx_object(). %% @doc See external documentation. +-spec new() -> wxComboBox(). new() -> wxe_util:construct(?wxComboBox_new_0, <<>>). -%% @spec (Parent::wxWindow:wxWindow(), Id::integer()) -> wxComboBox() %% @equiv new(Parent,Id, []) +-spec new(Parent, Id) -> wxComboBox() 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]) -> wxComboBox() -%% Option = {value, string()} | {pos, {X::integer(), Y::integer()}} | {size, {W::integer(), H::integer()}} | {choices, [[string()]]} | {style, integer()} | {validator, wx:wx()} %% @doc See external documentation. +-spec new(Parent, Id, [Option]) -> wxComboBox() when + Parent::wxWindow:wxWindow(), Id::integer(), + Option :: {value, string()} + | {pos, {X::integer(), Y::integer()}} + | {size, {W::integer(), H::integer()}} + | {choices, [[string()]]} + | {style, integer()} + | {validator, wx:wx()}. new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options) when is_integer(Id),is_list(Options) -> ?CLASS(ParentT,wxWindow), @@ -112,15 +122,19 @@ new(#wx_ref{type=ParentT,ref=ParentRef},Id, Options) wxe_util:construct(?wxComboBox_new_3, <>). -%% @spec (This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]) -> bool() %% @equiv create(This,Parent,Id,Value,Pos,Size,Choices, []) +-spec create(This, Parent, Id, Value, Pos, Size, Choices) -> boolean() when + This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]]. + create(This,Parent,Id,Value,Pos={PosX,PosY},Size={SizeW,SizeH},Choices) when is_record(This, wx_ref),is_record(Parent, wx_ref),is_integer(Id),is_list(Value),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices) -> create(This,Parent,Id,Value,Pos,Size,Choices, []). -%% @spec (This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], [Option]) -> bool() -%% Option = {style, integer()} | {validator, wx:wx()} %% @doc See external documentation. +-spec create(This, Parent, Id, Value, Pos, Size, Choices, [Option]) -> boolean() when + This::wxComboBox(), Parent::wxWindow:wxWindow(), Id::integer(), Value::string(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}, Choices::[[string()]], + Option :: {style, integer()} + | {validator, wx:wx()}. create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Value,{PosX,PosY},{SizeW,SizeH},Choices, Options) when is_integer(Id),is_list(Value),is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH),is_list(Choices),is_list(Options) -> ?CLASS(ThisT,wxComboBox), @@ -135,92 +149,105 @@ create(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=ParentT,ref=ParentRef},Id,Va wxe_util:call(?wxComboBox_Create, <>|| 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::wxComboBox()) -> bool() %% @doc See external documentation. +-spec canCopy(This) -> boolean() when + This::wxComboBox(). canCopy(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_CanCopy, <>). -%% @spec (This::wxComboBox()) -> bool() %% @doc See external documentation. +-spec canCut(This) -> boolean() when + This::wxComboBox(). canCut(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_CanCut, <>). -%% @spec (This::wxComboBox()) -> bool() %% @doc See external documentation. +-spec canPaste(This) -> boolean() when + This::wxComboBox(). canPaste(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_CanPaste, <>). -%% @spec (This::wxComboBox()) -> bool() %% @doc See external documentation. +-spec canRedo(This) -> boolean() when + This::wxComboBox(). canRedo(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_CanRedo, <>). -%% @spec (This::wxComboBox()) -> bool() %% @doc See external documentation. +-spec canUndo(This) -> boolean() when + This::wxComboBox(). canUndo(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_CanUndo, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec copy(This) -> ok when + This::wxComboBox(). copy(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Copy, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec cut(This) -> ok when + This::wxComboBox(). cut(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Cut, <>). -%% @spec (This::wxComboBox()) -> integer() %% @doc See external documentation. +-spec getInsertionPoint(This) -> integer() when + This::wxComboBox(). getInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_GetInsertionPoint, <>). -%% @spec (This::wxComboBox()) -> integer() %% @doc See external documentation. +-spec getLastPosition(This) -> integer() when + This::wxComboBox(). getLastPosition(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_GetLastPosition, <>). -%% @spec (This::wxComboBox()) -> string() %% @doc See external documentation. +-spec getValue(This) -> string() when + This::wxComboBox(). getValue(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:call(?wxComboBox_GetValue, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec paste(This) -> ok when + This::wxComboBox(). paste(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Paste, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec redo(This) -> ok when + This::wxComboBox(). redo(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Redo, <>). -%% @spec (This::wxComboBox(), From::integer(), To::integer(), Value::string()) -> ok %% @doc See external documentation. +-spec replace(This, From, To, Value) -> ok when + This::wxComboBox(), From::integer(), To::integer(), Value::string(). replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value) when is_integer(From),is_integer(To),is_list(Value) -> ?CLASS(ThisT,wxComboBox), @@ -228,47 +255,53 @@ replace(#wx_ref{type=ThisT,ref=ThisRef},From,To,Value) wxe_util:cast(?wxComboBox_Replace, <>). -%% @spec (This::wxComboBox(), From::integer(), To::integer()) -> ok %% @doc See external documentation. +-spec remove(This, From, To) -> ok when + This::wxComboBox(), From::integer(), To::integer(). remove(#wx_ref{type=ThisT,ref=ThisRef},From,To) when is_integer(From),is_integer(To) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Remove, <>). -%% @spec (This::wxComboBox(), Pos::integer()) -> ok %% @doc See external documentation. +-spec setInsertionPoint(This, Pos) -> ok when + This::wxComboBox(), Pos::integer(). setInsertionPoint(#wx_ref{type=ThisT,ref=ThisRef},Pos) when is_integer(Pos) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_SetInsertionPoint, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec setInsertionPointEnd(This) -> ok when + This::wxComboBox(). setInsertionPointEnd(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_SetInsertionPointEnd, <>). -%% @spec (This::wxComboBox(), N::integer()) -> ok %% @doc See external documentation. +-spec setSelection(This, N) -> ok when + This::wxComboBox(), N::integer(). setSelection(#wx_ref{type=ThisT,ref=ThisRef},N) when is_integer(N) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_SetSelection_1, <>). -%% @spec (This::wxComboBox(), From::integer(), To::integer()) -> ok %% @doc See external documentation. +-spec setSelection(This, From, To) -> ok when + This::wxComboBox(), From::integer(), To::integer(). setSelection(#wx_ref{type=ThisT,ref=ThisRef},From,To) when is_integer(From),is_integer(To) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_SetSelection_2, <>). -%% @spec (This::wxComboBox(), Value::string()) -> ok %% @doc See external documentation. +-spec setValue(This, Value) -> ok when + This::wxComboBox(), Value::string(). setValue(#wx_ref{type=ThisT,ref=ThisRef},Value) when is_list(Value) -> ?CLASS(ThisT,wxComboBox), @@ -276,15 +309,16 @@ setValue(#wx_ref{type=ThisT,ref=ThisRef},Value) wxe_util:cast(?wxComboBox_SetValue, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc See external documentation. +-spec undo(This) -> ok when + This::wxComboBox(). undo(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxComboBox), wxe_util:cast(?wxComboBox_Undo, <>). -%% @spec (This::wxComboBox()) -> ok %% @doc Destroys this object, do not use object again +-spec destroy(This::wxComboBox) -> ok. destroy(Obj=#wx_ref{type=Type}) -> ?CLASS(Type,wxComboBox), wxe_util:destroy(?DESTROY_OBJECT,Obj), -- cgit v1.2.3