xref: /aoo42x/main/sfx2/inc/inettbc.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SFX_INETTBC_HXX
29 #define _SFX_INETTBC_HXX
30 
31 // includes *****************************************************************
32 #include <tools/string.hxx>
33 #include <tools/urlobj.hxx>
34 
35 #ifndef _COMBOBOX_HXX //autogen
36 #include <vcl/combobox.hxx>
37 #endif
38 #include <svtools/acceleratorexecute.hxx>
39 
40 #if _SOLAR__PRIVATE
41 
42 #include <sfx2/tbxctrl.hxx>
43 class SvtURLBox;
44 
45 class SfxURLToolBoxControl_Impl : public SfxToolBoxControl
46 {
47 private:
48     ::svt::AcceleratorExecute*  pAccExec;
49 
50     SvtURLBox* 				GetURLBox() const;
51     void                    OpenURL( const String& rName, sal_Bool bNew ) const;
52 
53     DECL_LINK(              OpenHdl, void* );
54     DECL_LINK(              SelectHdl, void* );
55     DECL_LINK( WindowEventListener, VclSimpleEvent* );
56 
57     struct ExecuteInfo
58     {
59         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >     xDispatch;
60         ::com::sun::star::util::URL                                                aTargetURL;
61         ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >  aArgs;
62     };
63 
64     DECL_STATIC_LINK( SfxURLToolBoxControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
65 
66 public:
67 
68 							SFX_DECL_TOOLBOX_CONTROL();
69 
70 							SfxURLToolBoxControl_Impl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
71     virtual                 ~SfxURLToolBoxControl_Impl();
72 
73 	virtual Window* 		CreateItemWindow( Window* pParent );
74 	virtual void			StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
75 };
76 
77 #endif
78 
79 #endif
80 
81