1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
23 * Alexandre Trémon <atremon@elansoftware.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
40 // Declaration of IHTMLButtonElement and related classes
42 #ifndef IHTMLBUTTONELEMENT_H
43 #define IHTMLBUTTONELEMENT_H
45 #include "IEHtmlNode.h"
49 // NOTE: Nasty hack in case arcane SDK does not define IHTMLButtonElement
51 #ifndef __IHTMLButtonElement_INTERFACE_DEFINED__
52 MIDL_INTERFACE("3050f2bb-98b5-11cf-bb82-00aa00bdce0b")
53 IHTMLButtonElement
: public IDispatch
56 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_type(
57 /* [out][retval] */ BSTR
*p
) = 0;
59 virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE
put_value(
60 /* [in] */ BSTR v
) = 0;
62 virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE
get_value(
63 /* [out][retval] */ BSTR
*p
) = 0;
65 virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE
put_name(
66 /* [in] */ BSTR v
) = 0;
68 virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE
get_name(
69 /* [out][retval] */ BSTR
*p
) = 0;
71 virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE
put_status(
72 /* [in] */ VARIANT v
) = 0;
74 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_status(
75 /* [out][retval] */ VARIANT
*p
) = 0;
77 virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE
put_disabled(
78 /* [in] */ VARIANT_BOOL v
) = 0;
80 virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE
get_disabled(
81 /* [out][retval] */ VARIANT_BOOL
*p
) = 0;
83 virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE
get_form(
84 /* [out][retval] */ IHTMLFormElement
**p
) = 0;
86 virtual /* [id] */ HRESULT STDMETHODCALLTYPE
createTextRange(
87 /* [out][retval] */ IHTMLTxtRange
**range
) = 0;
92 class CIEHtmlButtonElement
:
94 public IDispatchImpl
<IHTMLButtonElement
, &__uuidof(IHTMLButtonElement
), &LIBID_MSHTML
>
97 CIEHtmlButtonElement() {
100 HRESULT
FinalConstruct( );
101 virtual HRESULT
GetHtmlElement(CIEHtmlElement
**ppHtmlElement
);
102 virtual HRESULT
SetDOMNode(nsIDOMNode
*pDomNode
);
103 virtual HRESULT
SetParent(CNode
*pParent
);
105 DECLARE_GET_CONTROLLING_UNKNOWN()
108 virtual ~CIEHtmlButtonElement() {
113 BEGIN_COM_MAP(CIEHtmlButtonElement
)
114 COM_INTERFACE_ENTRY(IDispatch
)
115 COM_INTERFACE_ENTRY(IHTMLButtonElement
)
116 COM_INTERFACE_ENTRY_AGGREGATE(IID_IHTMLElement
, m_pHtmlElementAgg
.p
)
117 COM_INTERFACE_ENTRY_AGGREGATE(__uuidof(IHTMLDOMNode
), m_pHtmlElementAgg
.p
)
120 // IHTMLButtonElement Implementation:
121 virtual HRESULT STDMETHODCALLTYPE
get_type(BSTR __RPC_FAR
*p
);
122 virtual HRESULT STDMETHODCALLTYPE
put_value(BSTR v
);
123 virtual HRESULT STDMETHODCALLTYPE
get_value(BSTR __RPC_FAR
*p
);
124 virtual HRESULT STDMETHODCALLTYPE
put_name(BSTR v
);
125 virtual HRESULT STDMETHODCALLTYPE
get_name(BSTR __RPC_FAR
*p
);
126 virtual HRESULT STDMETHODCALLTYPE
put_status(VARIANT v
);
127 virtual HRESULT STDMETHODCALLTYPE
get_status(VARIANT __RPC_FAR
*p
);
128 virtual HRESULT STDMETHODCALLTYPE
put_disabled(VARIANT_BOOL v
);
129 virtual HRESULT STDMETHODCALLTYPE
get_disabled(VARIANT_BOOL __RPC_FAR
*p
);
130 virtual HRESULT STDMETHODCALLTYPE
get_form(IHTMLFormElement __RPC_FAR
*__RPC_FAR
*p
);
131 virtual HRESULT STDMETHODCALLTYPE
createTextRange(IHTMLTxtRange __RPC_FAR
*__RPC_FAR
*range
);
134 CComPtr
<IUnknown
> m_pHtmlElementAgg
;
137 typedef CComObject
<CIEHtmlButtonElement
> CIEHtmlButtonElementInstance
;
139 #endif //IHTMLBUTTONELEMENT_H