%%
%% %CopyrightBegin%
%%
%% 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%% %CopyrightEnd%
%% This file is generated DO NOT EDIT
%% @doc See external documentation: wxSizerItem.
%% @type wxSizerItem(). An object reference, The representation is internal
%% and can be changed without notice. It can't be used for comparsion
%% stored on disc or distributed for use on other nodes.
-module(wxSizerItem).
-include("wxe.hrl").
-export([calcMin/1,deleteWindows/1,destroy/1,detachSizer/1,getBorder/1,getFlag/1,
getMinSize/1,getPosition/1,getProportion/1,getRatio/1,getRect/1,getSize/1,
getSizer/1,getSpacer/1,getUserData/1,getWindow/1,isShown/1,isSizer/1,
isSpacer/1,isWindow/1,new/0,new/2,new/3,new/5,new/6,setBorder/2,setDimension/3,
setFlag/2,setInitSize/3,setMinSize/2,setMinSize/3,setProportion/2,
setRatio/2,setRatio/3,setSizer/2,setSpacer/2,setSpacer/3,setWindow/2,
show/2]).
%% inherited exports
-export([parent_class/1]).
-export_type([wxSizerItem/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-type wxSizerItem() :: wx:wx_object().
%% @doc See external documentation.
-spec new() -> wxSizerItem().
new() ->
wxe_util:construct(?wxSizerItem_new_0,
<<>>).
%% @doc See external documentation.
-spec new(Window, Flags) -> wxSizerItem() when
Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Flags::wxSizerFlags:wxSizerFlags().
new(#wx_ref{type=WindowT,ref=WindowRef},#wx_ref{type=FlagsT,ref=FlagsRef}) ->
WindowOP = case ?CLASS_T(WindowT,wxWindow) of
true ->
?CLASS(FlagsT,wxSizerFlags),
?wxSizerItem_new_2_1;
_ -> ?CLASS(WindowT,wxSizer),
?CLASS(FlagsT,wxSizerFlags),
?wxSizerItem_new_2_0
end,
wxe_util:construct(WindowOP,
<>).
%% @doc See external documentation.
-spec new(Width, Height, Flags) -> wxSizerItem() when
Width::integer(), Height::integer(), Flags::wxSizerFlags:wxSizerFlags().
new(Width,Height,#wx_ref{type=FlagsT,ref=FlagsRef})
when is_integer(Width),is_integer(Height) ->
?CLASS(FlagsT,wxSizerFlags),
wxe_util:construct(?wxSizerItem_new_3,
<>).
%% @doc See external documentation.
-spec new(Window, Proportion, Flag, Border, UserData) -> wxSizerItem() when
Window::wxWindow:wxWindow() | wxSizer:wxSizer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx().
new(#wx_ref{type=WindowT,ref=WindowRef},Proportion,Flag,Border,#wx_ref{type=UserDataT,ref=UserDataRef})
when is_integer(Proportion),is_integer(Flag),is_integer(Border) ->
WindowOP = case ?CLASS_T(WindowT,wxWindow) of
true ->
?CLASS(UserDataT,wx),
?wxSizerItem_new_5_1;
_ -> ?CLASS(WindowT,wxSizer),
?CLASS(UserDataT,wx),
?wxSizerItem_new_5_0
end,
wxe_util:construct(WindowOP,
<>).
%% @doc See external documentation.
-spec new(Width, Height, Proportion, Flag, Border, UserData) -> wxSizerItem() when
Width::integer(), Height::integer(), Proportion::integer(), Flag::integer(), Border::integer(), UserData::wx:wx().
new(Width,Height,Proportion,Flag,Border,#wx_ref{type=UserDataT,ref=UserDataRef})
when is_integer(Width),is_integer(Height),is_integer(Proportion),is_integer(Flag),is_integer(Border) ->
?CLASS(UserDataT,wx),
wxe_util:construct(?wxSizerItem_new_6,
<>).
%% @doc See external documentation.
-spec calcMin(This) -> {W::integer(), H::integer()} when
This::wxSizerItem().
calcMin(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_CalcMin,
<>).
%% @doc See external documentation.
-spec deleteWindows(This) -> ok when
This::wxSizerItem().
deleteWindows(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_DeleteWindows,
<>).
%% @doc See external documentation.
-spec detachSizer(This) -> ok when
This::wxSizerItem().
detachSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_DetachSizer,
<>).
%% @doc See external documentation.
-spec getBorder(This) -> integer() when
This::wxSizerItem().
getBorder(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetBorder,
<>).
%% @doc See external documentation.
-spec getFlag(This) -> integer() when
This::wxSizerItem().
getFlag(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetFlag,
<>).
%% @doc See external documentation.
-spec getMinSize(This) -> {W::integer(), H::integer()} when
This::wxSizerItem().
getMinSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetMinSize,
<>).
%% @doc See external documentation.
-spec getPosition(This) -> {X::integer(), Y::integer()} when
This::wxSizerItem().
getPosition(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetPosition,
<>).
%% @doc See external documentation.
-spec getProportion(This) -> integer() when
This::wxSizerItem().
getProportion(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetProportion,
<>).
%% @doc See external documentation.
-spec getRatio(This) -> number() when
This::wxSizerItem().
getRatio(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetRatio,
<>).
%% @doc See external documentation.
-spec getRect(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
This::wxSizerItem().
getRect(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetRect,
<>).
%% @doc See external documentation.
-spec getSize(This) -> {W::integer(), H::integer()} when
This::wxSizerItem().
getSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSize,
<>).
%% @doc See external documentation.
-spec getSizer(This) -> wxSizer:wxSizer() when
This::wxSizerItem().
getSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSizer,
<>).
%% @doc See external documentation.
-spec getSpacer(This) -> {W::integer(), H::integer()} when
This::wxSizerItem().
getSpacer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetSpacer,
<>).
%% @doc See external documentation.
-spec getUserData(This) -> wx:wx() when
This::wxSizerItem().
getUserData(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetUserData,
<>).
%% @doc See external documentation.
-spec getWindow(This) -> wxWindow:wxWindow() when
This::wxSizerItem().
getWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_GetWindow,
<>).
%% @doc See external documentation.
-spec isSizer(This) -> boolean() when
This::wxSizerItem().
isSizer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsSizer,
<>).
%% @doc See external documentation.
-spec isShown(This) -> boolean() when
This::wxSizerItem().
isShown(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsShown,
<>).
%% @doc See external documentation.
-spec isSpacer(This) -> boolean() when
This::wxSizerItem().
isSpacer(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsSpacer,
<>).
%% @doc See external documentation.
-spec isWindow(This) -> boolean() when
This::wxSizerItem().
isWindow(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:call(?wxSizerItem_IsWindow,
<>).
%% @doc See external documentation.
-spec setBorder(This, Border) -> ok when
This::wxSizerItem(), Border::integer().
setBorder(#wx_ref{type=ThisT,ref=ThisRef},Border)
when is_integer(Border) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetBorder,
<>).
%% @doc See external documentation.
-spec setDimension(This, Pos, Size) -> ok when
This::wxSizerItem(), Pos::{X::integer(), Y::integer()}, Size::{W::integer(), H::integer()}.
setDimension(#wx_ref{type=ThisT,ref=ThisRef},{PosX,PosY},{SizeW,SizeH})
when is_integer(PosX),is_integer(PosY),is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetDimension,
<>).
%% @doc See external documentation.
-spec setFlag(This, Flag) -> ok when
This::wxSizerItem(), Flag::integer().
setFlag(#wx_ref{type=ThisT,ref=ThisRef},Flag)
when is_integer(Flag) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetFlag,
<>).
%% @doc See external documentation.
-spec setInitSize(This, X, Y) -> ok when
This::wxSizerItem(), X::integer(), Y::integer().
setInitSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetInitSize,
<>).
%% @doc See external documentation.
-spec setMinSize(This, Size) -> ok when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetMinSize_1,
<>).
%% @doc See external documentation.
-spec setMinSize(This, X, Y) -> ok when
This::wxSizerItem(), X::integer(), Y::integer().
setMinSize(#wx_ref{type=ThisT,ref=ThisRef},X,Y)
when is_integer(X),is_integer(Y) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetMinSize_2,
<>).
%% @doc See external documentation.
-spec setProportion(This, Proportion) -> ok when
This::wxSizerItem(), Proportion::integer().
setProportion(#wx_ref{type=ThisT,ref=ThisRef},Proportion)
when is_integer(Proportion) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetProportion,
<>).
%% @doc See external documentation.
-spec setRatio(This, Ratio) -> ok when
This::wxSizerItem(), Ratio::number();
(This, Size) -> ok when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Ratio)
when is_number(Ratio) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetRatio_1_0,
<>);
setRatio(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetRatio_1_1,
<>).
%% @doc See external documentation.
-spec setRatio(This, Width, Height) -> ok when
This::wxSizerItem(), Width::integer(), Height::integer().
setRatio(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetRatio_2,
<>).
%% @doc See external documentation.
-spec setSizer(This, Sizer) -> ok when
This::wxSizerItem(), Sizer::wxSizer:wxSizer().
setSizer(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=SizerT,ref=SizerRef}) ->
?CLASS(ThisT,wxSizerItem),
?CLASS(SizerT,wxSizer),
wxe_util:cast(?wxSizerItem_SetSizer,
<>).
%% @doc See external documentation.
-spec setSpacer(This, Size) -> ok when
This::wxSizerItem(), Size::{W::integer(), H::integer()}.
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
when is_integer(SizeW),is_integer(SizeH) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetSpacer_1,
<>).
%% @doc See external documentation.
-spec setSpacer(This, Width, Height) -> ok when
This::wxSizerItem(), Width::integer(), Height::integer().
setSpacer(#wx_ref{type=ThisT,ref=ThisRef},Width,Height)
when is_integer(Width),is_integer(Height) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_SetSpacer_2,
<>).
%% @doc See external documentation.
-spec setWindow(This, Window) -> ok when
This::wxSizerItem(), Window::wxWindow:wxWindow().
setWindow(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=WindowT,ref=WindowRef}) ->
?CLASS(ThisT,wxSizerItem),
?CLASS(WindowT,wxWindow),
wxe_util:cast(?wxSizerItem_SetWindow,
<>).
%% @doc See external documentation.
-spec show(This, Show) -> ok when
This::wxSizerItem(), Show::boolean().
show(#wx_ref{type=ThisT,ref=ThisRef},Show)
when is_boolean(Show) ->
?CLASS(ThisT,wxSizerItem),
wxe_util:cast(?wxSizerItem_Show,
<>).
%% @doc Destroys this object, do not use object again
-spec destroy(This::wxSizerItem()) -> ok.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxSizerItem),
wxe_util:destroy(?DESTROY_OBJECT,Obj),
ok.