Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sfx2 / event.hxx
blobb545e0ae31ec16a872b39cb264be406352253725
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: event.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SFXEVENT_HXX
31 #define _SFXEVENT_HXX
33 #ifndef _STRING_HXX //autogen
34 #include <tools/string.hxx>
35 #endif
36 #ifndef _SFXHINT_HXX //autogen
37 #include <bf_svtools/hint.hxx>
38 #endif
40 #include <com/sun/star/uno/Sequence.hxx>
41 #include <com/sun/star/beans/PropertyValue.hpp>
42 class PrintDialog;
43 class Printer;
44 namespace binfilter {
46 class SfxObjectShell;
48 //-------------------------------------------------------------------
50 class SfxEventHint : public SfxHint
52 USHORT nEventId;
53 SfxObjectShell* pObjShell;
54 String _aArgs;
55 BOOL _bDummy;
56 BOOL _bAddToHistory;
58 public:
59 TYPEINFO();
60 SfxEventHint( USHORT nId,
61 const String& rArgs,
62 SfxObjectShell *pObj = 0 )
63 : nEventId(nId),
64 pObjShell(pObj),
65 _bAddToHistory(FALSE),
66 _aArgs( rArgs )
68 SfxEventHint( USHORT nId, SfxObjectShell *pObj = 0 )
69 : nEventId(nId),
70 pObjShell(pObj),
71 _bAddToHistory(FALSE)
74 const String& GetArgs() const { return _aArgs;}
76 USHORT GetEventId() const
77 { return nEventId; }
79 SfxObjectShell* GetObjShell() const
80 { return pObjShell; }
83 //-------------------------------------------------------------------
85 class SfxNamedHint : public SfxHint
87 String _aEventName;
88 SfxObjectShell* _pObjShell;
89 String _aArgs;
90 BOOL _bDummy;
91 BOOL _bAddToHistory;
93 public:
94 TYPEINFO();
96 SfxNamedHint( const String& rName,
97 const String& rArgs,
98 SfxObjectShell *pObj = 0 )
99 : _aEventName( rName ),
100 _pObjShell( pObj),
101 _bAddToHistory( FALSE ),
102 _aArgs( rArgs )
105 SfxNamedHint( const String& rName,
106 SfxObjectShell *pObj = 0 )
107 : _aEventName( rName ),
108 _pObjShell( pObj ),
109 _bAddToHistory( FALSE )
112 const String& GetArgs() const { return _aArgs;}
113 const String& GetName() const { return _aEventName; }
114 SfxObjectShell* GetObjShell() const { return _pObjShell; }
117 class SfxPrintingHint : public SfxHint
119 PrintDialog* pDialog;
120 Printer* pPrinter;
121 sal_Int32 nWhich;
122 ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aOpts;
123 public:
124 TYPEINFO();
125 SfxPrintingHint( sal_Int32 nEvent, PrintDialog* pDlg, Printer* pPrt, const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rOpts )
126 : pDialog( pDlg )
127 , pPrinter( pPrt )
128 , nWhich( nEvent )
129 , aOpts( rOpts )
132 SfxPrintingHint( sal_Int32 nEvent, PrintDialog* pDlg, Printer* pPrt )
133 : pDialog( pDlg )
134 , pPrinter( pPrt )
135 , nWhich( nEvent )
138 Printer* GetPrinter() const { return pPrinter; }
139 PrintDialog* GetPrintDialog() const { return pDialog; }
140 sal_Int32 GetWhich() const { return nWhich; }
141 const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& GetAdditionalOptions() { return aOpts; }
144 }//end of namespace binfilter
145 #endif