• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ie_imp_PasteListener.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2003 Martin Sevior
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 
00022 #ifndef IE_IMP_PASTELISTENER_H
00023 #define  IE_IMP_PASTELISTENER_H
00024 
00025 #include "ut_types.h"
00026 #include "pt_Types.h"
00027 #include "pd_Document.h"
00028 class PX_ChangeRecord;
00029 
00030 #ifdef __sgi
00031 // <sys/signal.h> may #define signal, leaving PL_Listener::signal() pure
00032 // virtual if subclasses don't include the same header files.
00033 // Please keep the "/**/" to stop MSVC dependency generator complaining.
00034 #include  <sys/signal.h>
00035 #endif
00036 
00037 // PL_Listener -- A layout registers a listener with the
00038 //                PD_Document in order to be notified of
00039 //                any changes to the document as they
00040 //                occur.  The document will notify each
00041 //                registered listener (in an undefined
00042 //                order).  When the listener registers,
00043 //                it is provided an ID which may be used
00044 //                later to refer to it.
00045 
00046 class ABI_EXPORT IE_Imp_PasteListener: public PL_Listener
00047 {
00048 public:
00049     IE_Imp_PasteListener(PD_Document * pDocToPaste, PT_DocPosition insPoint, PD_Document * pSourceDoc);
00050     virtual ~IE_Imp_PasteListener(){}
00051 
00052     virtual bool        populate(fl_ContainerLayout* sfh,
00053                                  const PX_ChangeRecord * pcr);
00054 
00055     virtual bool        populateStrux(pf_Frag_Strux* sdh,
00056                                       const PX_ChangeRecord * pcr,
00057                                       fl_ContainerLayout* * psfh);
00058 
00059     virtual bool        change(fl_ContainerLayout* /*sfh*/,
00060                                const PX_ChangeRecord * /*pcr*/)
00061         {return true;}
00062 
00063     virtual bool        insertStrux(fl_ContainerLayout* /*sfh*/,
00064                                     const PX_ChangeRecord * /*pcr*/,
00065                                     pf_Frag_Strux* /*sdhNew*/,
00066                                     PL_ListenerId /*lid*/,
00067                                     void (* /*pfnBindHandles*/)(pf_Frag_Strux* sdhNew,
00068                                                             PL_ListenerId lid,
00069                                                             fl_ContainerLayout* sfhNew))
00070         { return true;}
00071 
00072     virtual bool        signal(UT_uint32 /*iSignal*/)
00073         { return true;}
00074     virtual PLListenerType getType() const
00075         {
00076             return PTL_UNKNOWN;
00077         }
00078 
00079 private:
00080     PD_Document *     getDoc(void) const;
00081     PD_Document *     m_pPasteDocument;
00082     PT_DocPosition    m_insPoint;
00083     bool              m_bFirstSection;
00084     bool              m_bFirstBlock;
00085     PD_Document *     m_pSourceDoc;
00086 };
00087 #endif  /* IE_IMP_PASTELISTENER_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1