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 #ifndef _SFXHINTPOST_HXX 28 #define _SFXHINTPOST_HXX 29 30 #include <sfx2/genlink.hxx> 31 #include <tools/ref.hxx> 32 33 //=================================================================== 34 35 class SfxHint; 36 37 //------------------------------------------------------------------- 38 39 class SfxHintPoster: public SvRefBase 40 41 /* [Beschreibung] 42 43 Mit Instanzen dieser Klasse k"onnen eindeutige Events per PostUserEvent 44 "uber die StarView-Application verschickt werden. Wenn das User-Event 45 ausgel"ost wird, wird der Handler <Event()> gerufen, dessen 46 Basisimplementierung den mit <SetEventHdl()> angegbenen Link ruft. 47 48 Die Instanz wird via Ref-Count mindestens solange gehalten, wie 49 ein ggf. abgeschicktes Event noch nicht angekommen ist. Sollte das 50 Ziel vorher sterben, ist die Verbindung zuvor mit 'SetEventHdl(GenLink())' 51 zu kappen. 52 */ 53 54 { 55 sal_uIntPtr nId; 56 GenLink aLink; 57 58 private: 59 void RegisterEvent(); 60 //#if 0 // _SOLAR__PRIVATE 61 DECL_LINK( DoEvent_Impl, SfxHint * ); 62 //#endif 63 64 protected: 65 virtual ~SfxHintPoster(); 66 virtual void Event( SfxHint* pPostedHint ); 67 68 public: 69 SfxHintPoster(); 70 SfxHintPoster( const GenLink& rLink ); 71 72 void Post( SfxHint* pHint = 0 ); 73 void SetEventHdl( const GenLink& rLink ); 74 }; 75 76 //------------------------------------------------------------------- 77 78 SV_DECL_IMPL_REF(SfxHintPoster); 79 80 #endif 81