Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_so3 / pseudo.hxx
blob86549f4934269717bbfcfdb8c6489d9b5c755847
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: pseudo.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 _PSEUDO_HXX
31 #define _PSEUDO_HXX
33 #ifndef _UNQID_HXX //autogen
34 #include <tools/unqid.hxx>
35 #endif
36 #ifndef _IFACE_HXX
37 #include <bf_so3/iface.hxx>
38 #endif
39 #ifndef _OWNLIST_HXX
40 #include <bf_svtools/ownlist.hxx>
41 #endif
43 #ifndef INCLUDED_SO3DLLAPI_H
44 #include "bf_so3/so3dllapi.h"
45 #endif
47 class Menu;
49 namespace binfilter {
51 class SvBaseLink;
52 class SvEmbeddedClient;
53 class ImpOleObject;
55 //=========================================================================
56 class SO3_DLLPUBLIC SvVerb
57 /* [Beschreibung]
59 Die Klasse beschreibt einen Befehl, der an ein SvPseudoObject
60 geschickt werden kann.
62 [Querverweise]
64 <SvPseudoObject::DoVerb>
67 private:
68 long nId;
69 String aName;
70 UniqueItemId aMenuId;
71 BOOL bOnMenu : 1,
72 bConst : 1;
73 public:
74 SvVerb( long nIdP, const String & rNameP,
75 BOOL bConstP = FALSE, BOOL bOnMenuP = TRUE );
76 SvVerb( const SvVerb & );
77 SvVerb & operator = ( const SvVerb & );
78 ~SvVerb();
80 const String & GetName() const { return aName; }
81 long GetId() const { return nId; }
82 USHORT GetMenuId() const { return (USHORT)aMenuId.GetId(); }
83 BOOL IsConst() const { return bConst; }
84 BOOL IsOnMenu() const { return bOnMenu; }
87 //=========================================================================
88 class SO3_DLLPUBLIC SvVerbList
90 PRV_SV_DECL_OWNER_LIST(SvVerbList,SvVerb)
93 //=========================================================================
94 // Muessen mit OLE2 Werten uebereinstimmen
95 #define SVVERB_SHOW -1
96 #define SVVERB_OPEN -2
97 #define SVVERB_HIDE -3
98 #define SVVERB_UIACTIVATE -4
99 #define SVVERB_IPACTIVATE -5
101 // Eigene Verbs
102 #define SVVERB_PROPS 1
104 // Muessen mit OLE2 Werten uebereinstimmen
105 #define SVOBJ_MISCSTATUS_SERVERRESIZE 1
106 #define SVOBJ_MISCSTATUS_NOTREPLACE 4
107 #define SVOBJ_MISCSTATUS_CANTLINKINSIDE 16
108 #define SVOBJ_MISCSTATUS_LINK 64
109 #define SVOBJ_MISCSTATUS_INSIDEOUT 128
110 #define SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE 256
111 #define SVOBJ_MISCSTATUS_NOTRESIZEABLE 512
112 #define SVOBJ_MISCSTATUS_ALWAYSACTIVATE 1024
113 #define SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE 2048
114 #define SVOBJ_MISCSTATUS_SPECIALOBJECT 4096
116 class SO3_DLLPUBLIC SvPseudoObject : virtual public SvObject
117 /* [Beschreibung]
119 Diese Klasse stellt die Basisschnittstelle fuer Klassen zur Verfuegung,
120 deren Instanzen von aussen, z.B. via Link oder als Ole-Objekt,
121 angesprochen werden kann. Sie besitzt folgende Eigenschaften:
122 -Informationen (z.B. den Typ) ueber das Objekt liefern.
123 -Daten- und Benachrichtigungsquelle ueber die Klassen
124 <SvDataObject> und <SvAdvise>
125 -Das Objekt anzeigen oder im Server aktivieren.
128 friend class ImpOleObject;
129 private:
130 SvVerbList * pVerbs; // Liste der Verben
131 BOOL bDeleteVerbs; // TRUE, wenn pVerbs loeschen
132 protected:
133 ~SvPseudoObject();
135 virtual ErrCode Verb( long nVerbPos, SvEmbeddedClient * pCallerClient,
136 Window * pWin, const Rectangle * pWorkAreaPixel );
137 virtual BOOL Close();
138 public:
139 SvPseudoObject();
141 SO2_DECL_STANDARD_CLASS_DLL( SvPseudoObject, SOAPP )
143 virtual void FillClass( SvGlobalName * pClassName,
144 ULONG * pFormat,
145 String * pAppName,
146 String * pFullTypeName,
147 String * pShortTypeName,
148 long nFileFormat = SOFFICE_FILEFORMAT_CURRENT ) const;
149 SvGlobalName GetClassName() const;
151 // Befehle
152 void SetVerbList( SvVerbList * pVerbsP, BOOL bDeleteVerbs=FALSE );
153 virtual const SvVerbList & GetVerbList() const;
155 virtual ULONG GetMiscStatus() const;
159 #ifndef SO2_DECL_SVPSEUDOOBJECT_DEFINED
160 #define SO2_DECL_SVPSEUDOOBJECT_DEFINED
161 SO2_DECL_REF(SvPseudoObject)
162 #endif
163 SO2_IMPL_REF( SvPseudoObject )
167 #endif