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_wxfont.html">wxFont</a>.
21
%% @type wxFont(). 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.
27
-export([destroy/1,getDefaultEncoding/0,getFaceName/1,getFamily/1,getNativeFontInfoDesc/1,
28
getNativeFontInfoUserDesc/1,getPointSize/1,getStyle/1,getUnderlined/1,
29
getWeight/1,isFixedWidth/1,new/0,new/1,new/4,new/5,ok/1,setDefaultEncoding/1,
30
setFaceName/2,setFamily/2,setPointSize/2,setStyle/2,setUnderlined/2,
34
-export([parent_class/1]).
37
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
39
%% @spec () -> wxFont()
40
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
42
wxe_util:construct(?wxFont_new_0,
45
%% @spec (Fontname::string()) -> wxFont()
46
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
48
when is_list(Fontname) ->
49
Fontname_UC = unicode:characters_to_binary([Fontname,0]),
50
wxe_util:construct(?wxFont_new_1,
51
<<(byte_size(Fontname_UC)):32/?UI,(Fontname_UC)/binary, 0:(((8- ((4+byte_size(Fontname_UC)) band 16#7)) band 16#7))/unit:8>>).
53
%% @spec (Size::integer(), Family::WxFontFamily, Style::WxFontStyle, Weight::integer()) -> wxFont()
54
%% @equiv new(Size,Family,Style,Weight, [])
55
new(Size,Family,Style,Weight)
56
when is_integer(Size),is_integer(Family),is_integer(Style),is_integer(Weight) ->
57
new(Size,Family,Style,Weight, []).
59
%% @spec (Size::integer(), Family::WxFontFamily, Style::WxFontStyle, Weight::integer(), [Option]) -> wxFont()
60
%% Option = {underlined, bool()} | {face, string()} | {encoding, WxFontEncoding}
61
%% WxFontFamily = integer()
62
%% WxFontStyle = integer()
63
%% WxFontEncoding = integer()
64
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontwxfont">external documentation</a>.
65
%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
66
%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
67
%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
68
new(Size,Family,Style,Weight, Options)
69
when is_integer(Size),is_integer(Family),is_integer(Style),is_integer(Weight),is_list(Options) ->
70
MOpts = fun({underlined, Underlined}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>|Acc];
71
({face, Face}, Acc) -> Face_UC = unicode:characters_to_binary([Face,0]),[<<2:32/?UI,(byte_size(Face_UC)):32/?UI,(Face_UC)/binary, 0:(((8- ((0+byte_size(Face_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
72
({encoding, Encoding}, Acc) -> [<<3:32/?UI,Encoding:32/?UI>>|Acc];
73
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
74
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
75
wxe_util:construct(?wxFont_new_5,
76
<<Size:32/?UI,Family:32/?UI,Style:32/?UI,Weight:32/?UI, BinOpt/binary>>).
78
%% @spec (This::wxFont()) -> bool()
79
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontisfixedwidth">external documentation</a>.
80
isFixedWidth(#wx_ref{type=ThisT,ref=ThisRef}) ->
82
wxe_util:call(?wxFont_IsFixedWidth,
85
%% @spec () -> WxFontEncoding
86
%% WxFontEncoding = integer()
87
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetdefaultencoding">external documentation</a>.
88
%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
89
getDefaultEncoding() ->
90
wxe_util:call(?wxFont_GetDefaultEncoding,
93
%% @spec (This::wxFont()) -> string()
94
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetfacename">external documentation</a>.
95
getFaceName(#wx_ref{type=ThisT,ref=ThisRef}) ->
97
wxe_util:call(?wxFont_GetFaceName,
100
%% @spec (This::wxFont()) -> WxFontFamily
101
%% WxFontFamily = integer()
102
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetfamily">external documentation</a>.
103
%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
104
getFamily(#wx_ref{type=ThisT,ref=ThisRef}) ->
105
?CLASS(ThisT,wxFont),
106
wxe_util:call(?wxFont_GetFamily,
109
%% @spec (This::wxFont()) -> string()
110
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetnativefontinfodesc">external documentation</a>.
111
getNativeFontInfoDesc(#wx_ref{type=ThisT,ref=ThisRef}) ->
112
?CLASS(ThisT,wxFont),
113
wxe_util:call(?wxFont_GetNativeFontInfoDesc,
116
%% @spec (This::wxFont()) -> string()
117
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetnativefontinfouserdesc">external documentation</a>.
118
getNativeFontInfoUserDesc(#wx_ref{type=ThisT,ref=ThisRef}) ->
119
?CLASS(ThisT,wxFont),
120
wxe_util:call(?wxFont_GetNativeFontInfoUserDesc,
123
%% @spec (This::wxFont()) -> integer()
124
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetpointsize">external documentation</a>.
125
getPointSize(#wx_ref{type=ThisT,ref=ThisRef}) ->
126
?CLASS(ThisT,wxFont),
127
wxe_util:call(?wxFont_GetPointSize,
130
%% @spec (This::wxFont()) -> WxFontStyle
131
%% WxFontStyle = integer()
132
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetstyle">external documentation</a>.
133
%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
134
getStyle(#wx_ref{type=ThisT,ref=ThisRef}) ->
135
?CLASS(ThisT,wxFont),
136
wxe_util:call(?wxFont_GetStyle,
139
%% @spec (This::wxFont()) -> bool()
140
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetunderlined">external documentation</a>.
141
getUnderlined(#wx_ref{type=ThisT,ref=ThisRef}) ->
142
?CLASS(ThisT,wxFont),
143
wxe_util:call(?wxFont_GetUnderlined,
146
%% @spec (This::wxFont()) -> integer()
147
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontgetweight">external documentation</a>.
148
getWeight(#wx_ref{type=ThisT,ref=ThisRef}) ->
149
?CLASS(ThisT,wxFont),
150
wxe_util:call(?wxFont_GetWeight,
153
%% @spec (This::wxFont()) -> bool()
154
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontok">external documentation</a>.
155
ok(#wx_ref{type=ThisT,ref=ThisRef}) ->
156
?CLASS(ThisT,wxFont),
157
wxe_util:call(?wxFont_Ok,
160
%% @spec (Encoding::WxFontEncoding) -> ok
161
%% WxFontEncoding = integer()
162
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetdefaultencoding">external documentation</a>.
163
%%<br /> WxFontEncoding is one of ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
164
setDefaultEncoding(Encoding)
165
when is_integer(Encoding) ->
166
wxe_util:cast(?wxFont_SetDefaultEncoding,
167
<<Encoding:32/?UI>>).
169
%% @spec (This::wxFont(), FaceName::string()) -> bool()
170
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetfacename">external documentation</a>.
171
setFaceName(#wx_ref{type=ThisT,ref=ThisRef},FaceName)
172
when is_list(FaceName) ->
173
?CLASS(ThisT,wxFont),
174
FaceName_UC = unicode:characters_to_binary([FaceName,0]),
175
wxe_util:call(?wxFont_SetFaceName,
176
<<ThisRef:32/?UI,(byte_size(FaceName_UC)):32/?UI,(FaceName_UC)/binary, 0:(((8- ((0+byte_size(FaceName_UC)) band 16#7)) band 16#7))/unit:8>>).
178
%% @spec (This::wxFont(), Family::WxFontFamily) -> ok
179
%% WxFontFamily = integer()
180
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetfamily">external documentation</a>.
181
%%<br /> WxFontFamily is one of ?wxFONTFAMILY_DEFAULT | ?wxFONTFAMILY_DECORATIVE | ?wxFONTFAMILY_ROMAN | ?wxFONTFAMILY_SCRIPT | ?wxFONTFAMILY_SWISS | ?wxFONTFAMILY_MODERN | ?wxFONTFAMILY_TELETYPE | ?wxFONTFAMILY_MAX | ?wxFONTFAMILY_UNKNOWN
182
setFamily(#wx_ref{type=ThisT,ref=ThisRef},Family)
183
when is_integer(Family) ->
184
?CLASS(ThisT,wxFont),
185
wxe_util:cast(?wxFont_SetFamily,
186
<<ThisRef:32/?UI,Family:32/?UI>>).
188
%% @spec (This::wxFont(), PointSize::integer()) -> ok
189
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetpointsize">external documentation</a>.
190
setPointSize(#wx_ref{type=ThisT,ref=ThisRef},PointSize)
191
when is_integer(PointSize) ->
192
?CLASS(ThisT,wxFont),
193
wxe_util:cast(?wxFont_SetPointSize,
194
<<ThisRef:32/?UI,PointSize:32/?UI>>).
196
%% @spec (This::wxFont(), Style::WxFontStyle) -> ok
197
%% WxFontStyle = integer()
198
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetstyle">external documentation</a>.
199
%%<br /> WxFontStyle is one of ?wxFONTSTYLE_NORMAL | ?wxFONTSTYLE_ITALIC | ?wxFONTSTYLE_SLANT | ?wxFONTSTYLE_MAX
200
setStyle(#wx_ref{type=ThisT,ref=ThisRef},Style)
201
when is_integer(Style) ->
202
?CLASS(ThisT,wxFont),
203
wxe_util:cast(?wxFont_SetStyle,
204
<<ThisRef:32/?UI,Style:32/?UI>>).
206
%% @spec (This::wxFont(), Underlined::bool()) -> ok
207
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetunderlined">external documentation</a>.
208
setUnderlined(#wx_ref{type=ThisT,ref=ThisRef},Underlined)
209
when is_boolean(Underlined) ->
210
?CLASS(ThisT,wxFont),
211
wxe_util:cast(?wxFont_SetUnderlined,
212
<<ThisRef:32/?UI,(wxe_util:from_bool(Underlined)):32/?UI>>).
214
%% @spec (This::wxFont(), Weight::integer()) -> ok
215
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfont.html#wxfontsetweight">external documentation</a>.
216
setWeight(#wx_ref{type=ThisT,ref=ThisRef},Weight)
217
when is_integer(Weight) ->
218
?CLASS(ThisT,wxFont),
219
wxe_util:cast(?wxFont_SetWeight,
220
<<ThisRef:32/?UI,Weight:32/?UI>>).
222
%% @spec (This::wxFont()) -> ok
223
%% @doc Destroys this object, do not use object again
224
destroy(Obj=#wx_ref{type=Type}) ->
226
wxe_util:destroy(?DESTROY_OBJECT,Obj),