Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_so3 / ipobj.hxx
blob54be3dd20afb65b8c397a1ccf65ea09f442f438e
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: ipobj.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 ************************************************************************/
31 #ifndef _IPOBJ_HXX
32 #define _IPOBJ_HXX
34 #include <bf_so3/embobj.hxx>
35 #include <bf_so3/ipobj.hxx>
37 #ifndef INCLUDED_SO3DLLAPI_H
38 #include "bf_so3/so3dllapi.h"
39 #endif
41 /*************************************************************************/
42 /*************************************************************************/
43 class MenuBar;
44 class Window;
45 class KeyEvent;
46 class Palette;
48 namespace binfilter {
49 class SvContainerEnvironment;
50 class ImpInPlaceObject;
51 class ImpInPlaceSite;
52 class ImpOleInPlaceActiveObject;
53 struct IOleInPlaceObject;
54 struct IOleInPlaceActiveObject;
55 class SvInPlaceEnvironment;
56 class SvInPlaceObjectList;
57 class SvInPlaceClipWindow;
58 class SvInPlaceWindow;
59 /*************************************************************************
60 *************************************************************************/
61 class SvInPlaceObject;
62 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
63 #define SO2_DECL_SVINPLACEOBJECT_DEFINED
64 SO2_DECL_REF(SvInPlaceObject)
65 #endif
67 class SO3_DLLPUBLIC SvInPlaceObject : public SvEmbeddedObject
69 friend class ImpInPlaceObject;
70 friend class ImpInPlaceSite;
71 friend class SvInPlaceClient;
72 friend class ImpOleInPlaceActiveObject;
73 friend class SvEditObjectProtocol;
74 friend class ImplSvEditObjectProtocol;
75 friend class SvInPlaceEnvironment;
77 private:
78 IOleInPlaceObject * pObjI;
79 IOleInPlaceActiveObject * pActiveObj;
80 SvInPlaceEnvironment * pIPEnv;
81 BOOL bIsUndoable:1,
82 bDeleteIPEnv:1;
84 SO3_DLLPRIVATE BOOL DoMergePalette();
85 protected:
86 ~SvInPlaceObject();
88 virtual void TopWinActivate( BOOL bActivate );
89 virtual void DocWinActivate( BOOL bActivate );
91 SO3_DLLPRIVATE void SetIPEnv( SvInPlaceEnvironment * pFrm );
93 virtual ErrCode Verb( long nVerbPos, SvEmbeddedClient * pCallerClient,
94 Window * pWin, const Rectangle * pWorkAreaPixel );
95 virtual void Open( BOOL bOpen );
96 virtual void InPlaceActivate( BOOL bActivate );
97 virtual void UIActivate( BOOL bActivate );
99 SO3_DLLPRIVATE void SetUndoable( BOOL bUndoable )
100 { bIsUndoable = bUndoable; }
101 // View
102 virtual BOOL MergePalette( const Palette & rContainerPal );
103 public:
104 SvInPlaceObject();
105 SO2_DECL_STANDARD_CLASS_DLL(SvInPlaceObject,SOAPP)
106 IOleInPlaceObject * GetInPlaceObject() const;
107 IOleInPlaceActiveObject * GetInPlaceActiveObject() const;
108 BOOL SetInPlaceActiveObject( IOleInPlaceActiveObject * );
110 SvInPlaceEnvironment* GetIPEnv() const { return pIPEnv; }
111 SvInPlaceClient * GetIPClient() const
112 { return aProt.GetIPClient(); }
113 static SvInPlaceObjectList & GetIPActiveObjectList();
115 // Robuste Protokollsteuerung
116 ErrCode DoInPlaceActivate( BOOL bActivate );
117 ErrCode DoUIActivate( BOOL bActivate );
119 virtual void SetVisArea( const Rectangle & rVisArea );
120 BOOL IsUndoable() const { return bIsUndoable; }
121 virtual BOOL ReactivateAndUndo();
124 DECLARE_LIST(SvInPlaceObjectList,SvInPlaceObject*)
125 SO2_IMPL_REF(SvInPlaceObject)
127 //=========================================================================
128 class SO3_DLLPUBLIC SvDeathObject : public SvInPlaceObject
129 /* [Beschreibung]
131 Wenn das Laden eine Ole-Objektes fehlschl"agt, kann dieses Objekt
132 teilweise als ersatzt dienen.
134 [Probleme]
136 Nicht an allen Methoden des Objektes erkennt der Aufrufer,
137 dass es sich um eine Ersatzobjekt handelt.
140 protected:
141 SO3_DLLPRIVATE virtual ErrCode Verb( long, SvEmbeddedClient * pCallerClient,
142 Window * pWin, const Rectangle * pWorkRectPixel );
143 SO3_DLLPRIVATE virtual void Draw( OutputDevice *,
144 const JobSetup & rSetup,
145 USHORT nAspect = ASPECT_CONTENT );
146 public:
147 SvDeathObject( const Rectangle & rVisArea );
152 #endif // _IPOBJ_HXX