4
%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
18
%% This file is generated DO NOT EDIT
20
%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html">wxIconBundle</a>.
21
%% @type wxIconBundle(). An object reference, The representation is internal
22
%% and can be changed without notice. It can't be used for comparsion
23
%% stored on disc or distributed for use on other nodes.
25
-module(wxIconBundle).
27
-export([addIcon/2,addIcon/3,destroy/1,getIcon/1,getIcon/2,new/0,new/1,new/2]).
30
-export([parent_class/1]).
33
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
35
%% @spec () -> wxIconBundle()
36
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
38
wxe_util:construct(?wxIconBundle_new_0,
41
%% @spec (Ic::wxIconBundle() | wxIcon:wxIcon()) -> wxIconBundle()
42
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
43
new(#wx_ref{type=IcT,ref=IcRef}) ->
44
IcOP = case ?CLASS_T(IcT,wxIconBundle) of
46
?wxIconBundle_new_1_1;
47
_ -> ?CLASS(IcT,wxIcon),
50
wxe_util:construct(IcOP,
53
%% @spec (File::string(), Type::integer()) -> wxIconBundle()
54
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlewxiconbundle">external documentation</a>.
56
when is_list(File),is_integer(Type) ->
57
File_UC = unicode:characters_to_binary([File,0]),
58
wxe_util:construct(?wxIconBundle_new_2,
59
<<(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((4+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
61
%% @spec (This::wxIconBundle(), Icon::wxIcon:wxIcon()) -> ok
62
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
63
addIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}) ->
64
?CLASS(ThisT,wxIconBundle),
66
wxe_util:cast(?wxIconBundle_AddIcon_1,
67
<<ThisRef:32/?UI,IconRef:32/?UI>>).
69
%% @spec (This::wxIconBundle(), File::string(), Type::integer()) -> ok
70
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundleaddicon">external documentation</a>.
71
addIcon(#wx_ref{type=ThisT,ref=ThisRef},File,Type)
72
when is_list(File),is_integer(Type) ->
73
?CLASS(ThisT,wxIconBundle),
74
File_UC = unicode:characters_to_binary([File,0]),
75
wxe_util:cast(?wxIconBundle_AddIcon_2,
76
<<ThisRef:32/?UI,(byte_size(File_UC)):32/?UI,(File_UC)/binary, 0:(((8- ((0+byte_size(File_UC)) band 16#7)) band 16#7))/unit:8,Type:32/?UI>>).
78
%% @spec (This::wxIconBundle()) -> wxIcon:wxIcon()
79
%% @equiv getIcon(This, [])
81
when is_record(This, wx_ref) ->
84
%% @spec (This::wxIconBundle(),X::term()) -> wxIcon:wxIcon()
85
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxiconbundle.html#wxiconbundlegeticon">external documentation</a>.
86
%% <br /> Alternatives:
88
%% getIcon(This::wxIconBundle(), [Option]) -> wxIcon:wxIcon() </c>
89
%%<br /> Option = {size, integer()}
92
%% getIcon(This::wxIconBundle(), Size::{W::integer(),H::integer()}) -> wxIcon:wxIcon() </c>
94
getIcon(#wx_ref{type=ThisT,ref=ThisRef}, Options)
95
when is_list(Options) ->
96
?CLASS(ThisT,wxIconBundle),
97
MOpts = fun({size, Size}, Acc) -> [<<1:32/?UI,Size:32/?UI>>|Acc];
98
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
99
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
100
wxe_util:call(?wxIconBundle_GetIcon_1_0,
101
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>);
102
getIcon(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH})
103
when is_integer(SizeW),is_integer(SizeH) ->
104
?CLASS(ThisT,wxIconBundle),
105
wxe_util:call(?wxIconBundle_GetIcon_1_1,
106
<<ThisRef:32/?UI,SizeW:32/?UI,SizeH:32/?UI>>).
108
%% @spec (This::wxIconBundle()) -> ok
109
%% @doc Destroys this object, do not use object again
110
destroy(Obj=#wx_ref{type=Type}) ->
111
?CLASS(Type,wxIconBundle),
112
wxe_util:destroy(?wxIconBundle_destruct,Obj),