diff options
author | Dan Gudmundsson <dgud@erlang.org> | 2012-02-24 12:25:19 +0100 |
---|---|---|
committer | Dan Gudmundsson <dgud@erlang.org> | 2012-02-24 12:25:19 +0100 |
commit | e28f2b94964c75eaea74e860a413532ebdcacc4b (patch) | |
tree | 9fc6c448c1cb548d0d495a80343ce870b0f0678c /lib/wx/src | |
parent | ec9ee1b76343c146cec17d0642dd9d1db7bbf3d6 (diff) | |
download | otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.tar.gz otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.tar.bz2 otp-e28f2b94964c75eaea74e860a413532ebdcacc4b.zip |
[wx] Add wxTaskBarIcon class
Diffstat (limited to 'lib/wx/src')
-rw-r--r-- | lib/wx/src/gen/wxTaskBarIcon.erl | 102 | ||||
-rw-r--r-- | lib/wx/src/gen/wxTaskBarIconEvent.erl | 64 | ||||
-rw-r--r-- | lib/wx/src/gen/wxe_debug.hrl | 5 | ||||
-rw-r--r-- | lib/wx/src/gen/wxe_funcs.hrl | 5 |
4 files changed, 176 insertions, 0 deletions
diff --git a/lib/wx/src/gen/wxTaskBarIcon.erl b/lib/wx/src/gen/wxTaskBarIcon.erl new file mode 100644 index 0000000000..5ca2c91b16 --- /dev/null +++ b/lib/wx/src/gen/wxTaskBarIcon.erl @@ -0,0 +1,102 @@ +%% +%% %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: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html">wxTaskBarIcon</a>. +%% <p>This class is derived (and can use functions) from: +%% <br />{@link wxEvtHandler} +%% </p> +%% @type wxTaskBarIcon(). 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(wxTaskBarIcon). +-include("wxe.hrl"). +-export([destroy/1,new/0,popupMenu/2,removeIcon/1,setIcon/2,setIcon/3]). + +%% inherited exports +-export([connect/2,connect/3,disconnect/1,disconnect/2,disconnect/3,parent_class/1]). + +-export_type([wxTaskBarIcon/0]). +%% @hidden +parent_class(wxEvtHandler) -> true; +parent_class(_Class) -> erlang:error({badtype, ?MODULE}). + +-type wxTaskBarIcon() :: wx:wx_object(). +%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconwxtaskbaricon">external documentation</a>. +-spec new() -> wxTaskBarIcon(). +new() -> + wxe_util:construct(?wxTaskBarIcon_new, + <<>>). + +%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconpopupmenu">external documentation</a>. +-spec popupMenu(This, Menu) -> boolean() when + This::wxTaskBarIcon(), Menu::wxMenu:wxMenu(). +popupMenu(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MenuT,ref=MenuRef}) -> + ?CLASS(ThisT,wxTaskBarIcon), + ?CLASS(MenuT,wxMenu), + wxe_util:call(?wxTaskBarIcon_PopupMenu, + <<ThisRef:32/?UI,MenuRef:32/?UI>>). + +%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconremoveicon">external documentation</a>. +-spec removeIcon(This) -> boolean() when + This::wxTaskBarIcon(). +removeIcon(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxTaskBarIcon), + wxe_util:call(?wxTaskBarIcon_RemoveIcon, + <<ThisRef:32/?UI>>). + +%% @equiv setIcon(This,Icon, []) +-spec setIcon(This, Icon) -> boolean() when + This::wxTaskBarIcon(), Icon::wxIcon:wxIcon(). + +setIcon(This,Icon) + when is_record(This, wx_ref),is_record(Icon, wx_ref) -> + setIcon(This,Icon, []). + +%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbaricon.html#wxtaskbariconseticon">external documentation</a>. +-spec setIcon(This, Icon, [Option]) -> boolean() when + This::wxTaskBarIcon(), Icon::wxIcon:wxIcon(), + Option :: {tooltip, unicode:chardata()}. +setIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxTaskBarIcon), + ?CLASS(IconT,wxIcon), + MOpts = fun({tooltip, Tooltip}, Acc) -> Tooltip_UC = unicode:characters_to_binary([Tooltip,0]),[<<1:32/?UI,(byte_size(Tooltip_UC)):32/?UI,(Tooltip_UC)/binary, 0:(((8- ((0+byte_size(Tooltip_UC)) band 16#7)) band 16#7))/unit:8>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxTaskBarIcon_SetIcon, + <<ThisRef:32/?UI,IconRef:32/?UI, BinOpt/binary>>). + +%% @doc Destroys this object, do not use object again +-spec destroy(This::wxTaskBarIcon()) -> ok. +destroy(Obj=#wx_ref{type=Type}) -> + ?CLASS(Type,wxTaskBarIcon), + wxe_util:destroy(?DESTROY_OBJECT,Obj), + ok. + %% From wxEvtHandler +%% @hidden +disconnect(This,EventType, Options) -> wxEvtHandler:disconnect(This,EventType, Options). +%% @hidden +disconnect(This,EventType) -> wxEvtHandler:disconnect(This,EventType). +%% @hidden +disconnect(This) -> wxEvtHandler:disconnect(This). +%% @hidden +connect(This,EventType, Options) -> wxEvtHandler:connect(This,EventType, Options). +%% @hidden +connect(This,EventType) -> wxEvtHandler:connect(This,EventType). diff --git a/lib/wx/src/gen/wxTaskBarIconEvent.erl b/lib/wx/src/gen/wxTaskBarIconEvent.erl new file mode 100644 index 0000000000..9f2af608c5 --- /dev/null +++ b/lib/wx/src/gen/wxTaskBarIconEvent.erl @@ -0,0 +1,64 @@ +%% +%% %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: <a href="http://www.wxwidgets.org/manuals/stable/wx_wxtaskbariconevent.html">wxTaskBarIconEvent</a>. +%% <dl><dt>Use {@link wxEvtHandler:connect/3.} with EventType:</dt> +%% <dd><em>taskbar_move</em>, <em>taskbar_left_down</em>, <em>taskbar_left_up</em>, <em>taskbar_right_down</em>, <em>taskbar_right_up</em>, <em>taskbar_left_dclick</em>, <em>taskbar_right_dclick</em></dd></dl> +%% See also the message variant {@link wxEvtHandler:wxTaskBarIcon(). #wxTaskBarIcon{}} event record type. +%% +%% <p>This class is derived (and can use functions) from: +%% <br />{@link wxEvent} +%% </p> +%% @type wxTaskBarIconEvent(). 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(wxTaskBarIconEvent). +-include("wxe.hrl"). +-export([]). + +%% inherited exports +-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1, + resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]). + +-export_type([wxTaskBarIconEvent/0]). +%% @hidden +parent_class(wxEvent) -> true; +parent_class(_Class) -> erlang:error({badtype, ?MODULE}). + +-type wxTaskBarIconEvent() :: wx:wx_object(). + %% From wxEvent +%% @hidden +stopPropagation(This) -> wxEvent:stopPropagation(This). +%% @hidden +skip(This, Options) -> wxEvent:skip(This, Options). +%% @hidden +skip(This) -> wxEvent:skip(This). +%% @hidden +shouldPropagate(This) -> wxEvent:shouldPropagate(This). +%% @hidden +resumePropagation(This,PropagationLevel) -> wxEvent:resumePropagation(This,PropagationLevel). +%% @hidden +isCommandEvent(This) -> wxEvent:isCommandEvent(This). +%% @hidden +getTimestamp(This) -> wxEvent:getTimestamp(This). +%% @hidden +getSkipped(This) -> wxEvent:getSkipped(This). +%% @hidden +getId(This) -> wxEvent:getId(This). diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl index 430ac5a5c0..a93d27654f 100644 --- a/lib/wx/src/gen/wxe_debug.hrl +++ b/lib/wx/src/gen/wxe_debug.hrl @@ -3298,6 +3298,11 @@ wxdebug_table() -> {3516, {wxAuiManagerEvent, canVeto, 0}}, {3517, {wxLogNull, new, 0}}, {3518, {wxLogNull, 'Destroy', undefined}}, + {3519, {wxTaskBarIcon, new, 0}}, + {3520, {wxTaskBarIcon, destruct, 0}}, + {3521, {wxTaskBarIcon, popupMenu, 1}}, + {3522, {wxTaskBarIcon, removeIcon, 0}}, + {3523, {wxTaskBarIcon, setIcon, 2}}, {-1, {mod, func, -1}} ]. diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl index a820c9d50e..d0fea79ff9 100644 --- a/lib/wx/src/gen/wxe_funcs.hrl +++ b/lib/wx/src/gen/wxe_funcs.hrl @@ -3295,3 +3295,8 @@ -define(wxAuiManagerEvent_CanVeto, 3516). -define(wxLogNull_new, 3517). -define(wxLogNull_destroy, 3518). +-define(wxTaskBarIcon_new, 3519). +-define(wxTaskBarIcon_destruct, 3520). +-define(wxTaskBarIcon_PopupMenu, 3521). +-define(wxTaskBarIcon_RemoveIcon, 3522). +-define(wxTaskBarIcon_SetIcon, 3523). |