1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2008-2021. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%% This file is generated DO NOT EDIT
20
21-module(wxPen).
22-include("wxe.hrl").
23-export([destroy/1,getCap/1,getColour/1,getJoin/1,getStyle/1,getWidth/1,isOk/1,
24  new/0,new/1,new/2,setCap/2,setColour/2,setColour/4,setJoin/2,setStyle/2,
25  setWidth/2]).
26
27%% inherited exports
28-export([parent_class/1]).
29
30-type wxPen() :: wx:wx_object().
31-export_type([wxPen/0]).
32%% @hidden
33parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
34
35%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpenwxpen">external documentation</a>.
36-spec new() -> wxPen().
37new() ->
38  wxe_util:queue_cmd(?get_env(), ?wxPen_new_0),
39  wxe_util:rec(?wxPen_new_0).
40
41%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpenwxpen">external documentation</a>.
42%% <br /> Also:<br />
43%% new(Pen) -> wxPen() when<br />
44%% 	Pen::wxPen().<br />
45%%
46%%<br /> Style = ?wxPENSTYLE_INVALID | ?wxPENSTYLE_SOLID | ?wxPENSTYLE_DOT | ?wxPENSTYLE_LONG_DASH | ?wxPENSTYLE_SHORT_DASH | ?wxPENSTYLE_DOT_DASH | ?wxPENSTYLE_USER_DASH | ?wxPENSTYLE_TRANSPARENT | ?wxPENSTYLE_STIPPLE_MASK_OPAQUE | ?wxPENSTYLE_STIPPLE_MASK | ?wxPENSTYLE_STIPPLE | ?wxPENSTYLE_BDIAGONAL_HATCH | ?wxPENSTYLE_CROSSDIAG_HATCH | ?wxPENSTYLE_FDIAGONAL_HATCH | ?wxPENSTYLE_CROSS_HATCH | ?wxPENSTYLE_HORIZONTAL_HATCH | ?wxPENSTYLE_VERTICAL_HATCH | ?wxPENSTYLE_FIRST_HATCH | ?wxPENSTYLE_LAST_HATCH
47-spec new(Colour) -> wxPen() when
48	Colour::wx:wx_colour();
49      (Pen) -> wxPen() when
50	Pen::wxPen().
51
52new(Colour)
53 when ?is_colordata(Colour) ->
54  new(Colour, []);
55new(#wx_ref{type=PenT}=Pen) ->
56  ?CLASS(PenT,wxPen),
57  wxe_util:queue_cmd(Pen,?get_env(),?wxPen_new_1),
58  wxe_util:rec(?wxPen_new_1).
59
60%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpenwxpen">external documentation</a>.
61%%<br /> Style = ?wxPENSTYLE_INVALID | ?wxPENSTYLE_SOLID | ?wxPENSTYLE_DOT | ?wxPENSTYLE_LONG_DASH | ?wxPENSTYLE_SHORT_DASH | ?wxPENSTYLE_DOT_DASH | ?wxPENSTYLE_USER_DASH | ?wxPENSTYLE_TRANSPARENT | ?wxPENSTYLE_STIPPLE_MASK_OPAQUE | ?wxPENSTYLE_STIPPLE_MASK | ?wxPENSTYLE_STIPPLE | ?wxPENSTYLE_BDIAGONAL_HATCH | ?wxPENSTYLE_CROSSDIAG_HATCH | ?wxPENSTYLE_FDIAGONAL_HATCH | ?wxPENSTYLE_CROSS_HATCH | ?wxPENSTYLE_HORIZONTAL_HATCH | ?wxPENSTYLE_VERTICAL_HATCH | ?wxPENSTYLE_FIRST_HATCH | ?wxPENSTYLE_LAST_HATCH
62-spec new(Colour, [Option]) -> wxPen() when
63	Colour::wx:wx_colour(),
64	Option :: {'width', integer()}
65		 | {'style', wx:wx_enum()}.
66new(Colour, Options)
67 when ?is_colordata(Colour),is_list(Options) ->
68  MOpts = fun({width, _width} = Arg) -> Arg;
69          ({style, _style} = Arg) -> Arg;
70          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
71  Opts = lists:map(MOpts, Options),
72  wxe_util:queue_cmd(wxe_util:color(Colour), Opts,?get_env(),?wxPen_new_2),
73  wxe_util:rec(?wxPen_new_2).
74
75%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpengetcap">external documentation</a>.
76%%<br /> Res = ?wxCAP_INVALID | ?wxCAP_ROUND | ?wxCAP_PROJECTING | ?wxCAP_BUTT
77-spec getCap(This) -> wx:wx_enum() when
78	This::wxPen().
79getCap(#wx_ref{type=ThisT}=This) ->
80  ?CLASS(ThisT,wxPen),
81  wxe_util:queue_cmd(This,?get_env(),?wxPen_GetCap),
82  wxe_util:rec(?wxPen_GetCap).
83
84%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpengetcolour">external documentation</a>.
85-spec getColour(This) -> wx:wx_colour4() when
86	This::wxPen().
87getColour(#wx_ref{type=ThisT}=This) ->
88  ?CLASS(ThisT,wxPen),
89  wxe_util:queue_cmd(This,?get_env(),?wxPen_GetColour),
90  wxe_util:rec(?wxPen_GetColour).
91
92%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpengetjoin">external documentation</a>.
93%%<br /> Res = ?wxJOIN_INVALID | ?wxJOIN_BEVEL | ?wxJOIN_MITER | ?wxJOIN_ROUND
94-spec getJoin(This) -> wx:wx_enum() when
95	This::wxPen().
96getJoin(#wx_ref{type=ThisT}=This) ->
97  ?CLASS(ThisT,wxPen),
98  wxe_util:queue_cmd(This,?get_env(),?wxPen_GetJoin),
99  wxe_util:rec(?wxPen_GetJoin).
100
101%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpengetstyle">external documentation</a>.
102%%<br /> Res = ?wxPENSTYLE_INVALID | ?wxPENSTYLE_SOLID | ?wxPENSTYLE_DOT | ?wxPENSTYLE_LONG_DASH | ?wxPENSTYLE_SHORT_DASH | ?wxPENSTYLE_DOT_DASH | ?wxPENSTYLE_USER_DASH | ?wxPENSTYLE_TRANSPARENT | ?wxPENSTYLE_STIPPLE_MASK_OPAQUE | ?wxPENSTYLE_STIPPLE_MASK | ?wxPENSTYLE_STIPPLE | ?wxPENSTYLE_BDIAGONAL_HATCH | ?wxPENSTYLE_CROSSDIAG_HATCH | ?wxPENSTYLE_FDIAGONAL_HATCH | ?wxPENSTYLE_CROSS_HATCH | ?wxPENSTYLE_HORIZONTAL_HATCH | ?wxPENSTYLE_VERTICAL_HATCH | ?wxPENSTYLE_FIRST_HATCH | ?wxPENSTYLE_LAST_HATCH
103-spec getStyle(This) -> wx:wx_enum() when
104	This::wxPen().
105getStyle(#wx_ref{type=ThisT}=This) ->
106  ?CLASS(ThisT,wxPen),
107  wxe_util:queue_cmd(This,?get_env(),?wxPen_GetStyle),
108  wxe_util:rec(?wxPen_GetStyle).
109
110%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpengetwidth">external documentation</a>.
111-spec getWidth(This) -> integer() when
112	This::wxPen().
113getWidth(#wx_ref{type=ThisT}=This) ->
114  ?CLASS(ThisT,wxPen),
115  wxe_util:queue_cmd(This,?get_env(),?wxPen_GetWidth),
116  wxe_util:rec(?wxPen_GetWidth).
117
118%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpenisok">external documentation</a>.
119-spec isOk(This) -> boolean() when
120	This::wxPen().
121isOk(#wx_ref{type=ThisT}=This) ->
122  ?CLASS(ThisT,wxPen),
123  wxe_util:queue_cmd(This,?get_env(),?wxPen_IsOk),
124  wxe_util:rec(?wxPen_IsOk).
125
126%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcap">external documentation</a>.
127%%<br /> CapStyle = ?wxCAP_INVALID | ?wxCAP_ROUND | ?wxCAP_PROJECTING | ?wxCAP_BUTT
128-spec setCap(This, CapStyle) -> 'ok' when
129	This::wxPen(), CapStyle::wx:wx_enum().
130setCap(#wx_ref{type=ThisT}=This,CapStyle)
131 when is_integer(CapStyle) ->
132  ?CLASS(ThisT,wxPen),
133  wxe_util:queue_cmd(This,CapStyle,?get_env(),?wxPen_SetCap).
134
135%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcolour">external documentation</a>.
136-spec setColour(This, Colour) -> 'ok' when
137	This::wxPen(), Colour::wx:wx_colour().
138setColour(#wx_ref{type=ThisT}=This,Colour)
139 when ?is_colordata(Colour) ->
140  ?CLASS(ThisT,wxPen),
141  wxe_util:queue_cmd(This,wxe_util:color(Colour),?get_env(),?wxPen_SetColour_1).
142
143%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetcolour">external documentation</a>.
144-spec setColour(This, Red, Green, Blue) -> 'ok' when
145	This::wxPen(), Red::integer(), Green::integer(), Blue::integer().
146setColour(#wx_ref{type=ThisT}=This,Red,Green,Blue)
147 when is_integer(Red),is_integer(Green),is_integer(Blue) ->
148  ?CLASS(ThisT,wxPen),
149  wxe_util:queue_cmd(This,Red,Green,Blue,?get_env(),?wxPen_SetColour_3).
150
151%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetjoin">external documentation</a>.
152%%<br /> Join_style = ?wxJOIN_INVALID | ?wxJOIN_BEVEL | ?wxJOIN_MITER | ?wxJOIN_ROUND
153-spec setJoin(This, Join_style) -> 'ok' when
154	This::wxPen(), Join_style::wx:wx_enum().
155setJoin(#wx_ref{type=ThisT}=This,Join_style)
156 when is_integer(Join_style) ->
157  ?CLASS(ThisT,wxPen),
158  wxe_util:queue_cmd(This,Join_style,?get_env(),?wxPen_SetJoin).
159
160%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetstyle">external documentation</a>.
161%%<br /> Style = ?wxPENSTYLE_INVALID | ?wxPENSTYLE_SOLID | ?wxPENSTYLE_DOT | ?wxPENSTYLE_LONG_DASH | ?wxPENSTYLE_SHORT_DASH | ?wxPENSTYLE_DOT_DASH | ?wxPENSTYLE_USER_DASH | ?wxPENSTYLE_TRANSPARENT | ?wxPENSTYLE_STIPPLE_MASK_OPAQUE | ?wxPENSTYLE_STIPPLE_MASK | ?wxPENSTYLE_STIPPLE | ?wxPENSTYLE_BDIAGONAL_HATCH | ?wxPENSTYLE_CROSSDIAG_HATCH | ?wxPENSTYLE_FDIAGONAL_HATCH | ?wxPENSTYLE_CROSS_HATCH | ?wxPENSTYLE_HORIZONTAL_HATCH | ?wxPENSTYLE_VERTICAL_HATCH | ?wxPENSTYLE_FIRST_HATCH | ?wxPENSTYLE_LAST_HATCH
162-spec setStyle(This, Style) -> 'ok' when
163	This::wxPen(), Style::wx:wx_enum().
164setStyle(#wx_ref{type=ThisT}=This,Style)
165 when is_integer(Style) ->
166  ?CLASS(ThisT,wxPen),
167  wxe_util:queue_cmd(This,Style,?get_env(),?wxPen_SetStyle).
168
169%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxpen.html#wxpensetwidth">external documentation</a>.
170-spec setWidth(This, Width) -> 'ok' when
171	This::wxPen(), Width::integer().
172setWidth(#wx_ref{type=ThisT}=This,Width)
173 when is_integer(Width) ->
174  ?CLASS(ThisT,wxPen),
175  wxe_util:queue_cmd(This,Width,?get_env(),?wxPen_SetWidth).
176
177%% @doc Destroys this object, do not use object again
178-spec destroy(This::wxPen()) -> 'ok'.
179destroy(Obj=#wx_ref{type=Type}) ->
180  ?CLASS(Type,wxPen),
181  wxe_util:queue_cmd(Obj, ?get_env(), ?DESTROY_OBJECT),
182  ok.
183