1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: slot.hxx,v $
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 ************************************************************************/
35 #include <command.hxx>
37 /******************** class SvMetaSlot **********************************/
39 class SvMetaSlotMemberList
;
40 class SvMetaSlot
: public SvMetaAttribute
42 SvMetaTypeRef aSlotType
;
43 SvMetaAttributeRef aMethod
;
44 SvIdentifier aGroupId
;
46 SvIdentifier aConfigId
;
47 SvIdentifier aExecMethod
;
48 SvIdentifier aStateMethod
;
49 SvIdentifier aDefault
;
54 SvBOOL aCachable
; // exclusiv
59 SvBOOL aSynchron
; // exclusiv
62 SvBOOL aRecordPerItem
;// exclusiv
66 SvBOOL aRecordAbsolute
;
70 SvBOOL aToolBoxConfig
;
71 SvBOOL aStatusBarConfig
;
75 SvBOOL aImageRotation
;
76 SvBOOL aImageReflection
;
77 SvIdentifier aPseudoPrefix
;
78 SvString aDisableFlags
;
79 SvMetaSlot
* pLinkedSlot
;
80 SvMetaSlot
* pNextSlot
;
82 SvMetaEnumValue
* pEnumValue
;
86 void WriteSlot( const ByteString
& rShellName
,
87 USHORT nCount
, const ByteString
& rSlotId
,
88 SvSlotElementList
&rList
,
89 const ByteString
& rPrefix
,
90 SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
91 virtual void Write( SvIdlDataBase
& rBase
,
92 SvStream
& rOutStm
, USHORT nTab
,
93 WriteType
, WriteAttribute
= 0 );
95 void SetEnumValue(SvMetaEnumValue
*p
)
99 void SetCachable( BOOL bSet
)
105 void SetVolatile( BOOL bSet
)
111 void SetToggle( BOOL bSet
)
115 void SetAutoUpdate( BOOL bSet
)
120 void SetSynchron( BOOL bSet
)
126 void SetAsynchron( BOOL bSet
)
133 void SetRecordPerItem( BOOL bSet
)
135 aRecordPerItem
= bSet
;
137 aRecordPerSet
= aRecordManual
= aNoRecord
= FALSE
;
139 void SetRecordPerSet( BOOL bSet
)
141 aRecordPerSet
= bSet
;
143 aRecordPerItem
= aRecordManual
= aNoRecord
= FALSE
;
145 void SetRecordManual( BOOL bSet
)
147 aRecordManual
= bSet
;
149 aRecordPerItem
= aRecordPerSet
= aNoRecord
= FALSE
;
151 void SetNoRecord( BOOL bSet
)
155 aRecordPerItem
= aRecordPerSet
= aRecordManual
= FALSE
;
157 void SetRecordAbsolute( BOOL bSet
)
158 { aRecordAbsolute
= bSet
; }
159 void SetHasDialog( BOOL bSet
)
160 { aHasDialog
= bSet
; }
161 void SetMenuConfig( BOOL bSet
)
162 { aMenuConfig
= bSet
; }
163 void SetToolBoxConfig( BOOL bSet
)
164 { aToolBoxConfig
= bSet
; }
165 void SetStatusBarConfig( BOOL bSet
)
166 { aStatusBarConfig
= bSet
; }
167 void SetAccelConfig( BOOL bSet
)
168 { aAccelConfig
= bSet
; }
169 void SetAllConfig( BOOL bSet
)
172 aToolBoxConfig
= bSet
;
173 aStatusBarConfig
= bSet
;
176 void SetFastCall( BOOL bSet
)
177 { aFastCall
= bSet
; }
178 void SetContainer( BOOL bSet
)
179 { aContainer
= bSet
; }
180 void SetImageRotation( BOOL bSet
)
181 { aImageRotation
= bSet
; }
182 void SetImageReflection( BOOL bSet
)
183 { aImageReflection
= bSet
; }
186 SV_DECL_META_FACTORY1( SvMetaSlot
, SvMetaReference
, 11 )
187 SvMetaObject
* MakeClone() const;
188 SvMetaSlot
*Clone() const { return (SvMetaSlot
*)MakeClone(); }
191 SvMetaSlot( SvMetaType
* pType
);
193 virtual BOOL
IsVariable() const;
194 virtual BOOL
IsMethod() const;
195 virtual ByteString
GetMangleName( BOOL bVariable
) const;
197 SvMetaAttribute
* GetMethod() const;
198 SvMetaType
* GetSlotType() const;
199 BOOL
GetHasCoreId() const;
200 const ByteString
& GetGroupId() const;
201 const ByteString
& GetConfigId() const;
202 const ByteString
& GetExecMethod() const;
203 const ByteString
& GetStateMethod() const;
204 const ByteString
& GetDefault() const;
205 const ByteString
& GetDisableFlags() const;
206 BOOL
GetPseudoSlots() const;
211 BOOL
GetCachable() const;
212 BOOL
GetVolatile() const;
213 BOOL
GetToggle() const;
214 BOOL
GetAutoUpdate() const;
216 BOOL
GetSynchron() const;
217 BOOL
GetAsynchron() const;
219 BOOL
GetRecordPerItem() const;
220 BOOL
GetRecordPerSet() const;
221 BOOL
GetRecordManual() const;
222 BOOL
GetNoRecord() const;
223 BOOL
GetRecordAbsolute() const;
225 BOOL
GetHasDialog() const;
226 const ByteString
& GetPseudoPrefix() const;
227 const ByteString
& GetUnoName() const;
228 BOOL
GetMenuConfig() const;
229 BOOL
GetToolBoxConfig() const;
230 BOOL
GetStatusBarConfig() const;
231 BOOL
GetAccelConfig() const;
232 BOOL
GetFastCall() const;
233 BOOL
GetContainer() const;
234 BOOL
GetImageRotation() const;
235 BOOL
GetImageReflection() const;
236 SvMetaSlot
* GetLinkedSlot() const
237 { return pLinkedSlot
; }
238 SvMetaSlot
* GetNextSlot() const
239 { return pNextSlot
; }
240 ULONG
GetListPos() const
242 void SetListPos(ULONG n
)
244 void ResetSlotPointer()
245 { pNextSlot
= pLinkedSlot
= 0; }
247 // void FillSbxObject( SvIdlDataBase & rBase, SbxObject *, BOOL bProp );
249 SvMetaEnumValue
* GetEnumValue() const
250 { return pEnumValue
; }
251 virtual BOOL
Test( SvIdlDataBase
&, SvTokenStream
& rInStm
);
252 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
253 SvTokenStream
& rInStm
);
254 virtual void WriteAttributesSvIdl( SvIdlDataBase
& rBase
,
255 SvStream
& rOutStm
, USHORT nTab
);
256 virtual BOOL
ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
);
257 virtual void WriteSvIdl( SvIdlDataBase
& rBase
,
258 SvStream
& rOutStm
, USHORT nTab
);
259 virtual void Insert( SvSlotElementList
&, const ByteString
& rPrefix
,
261 void WriteSlotStubs( const ByteString
& rShellName
,
262 ByteStringList
& rList
,
263 SvStream
& rOutStm
);
264 USHORT
WriteSlotMap( const ByteString
& rShellName
,
268 SvIdlDataBase
& rBase
,
269 SvStream
& rOutStm
);
270 USHORT
WriteSlotParamArray( SvIdlDataBase
& rBase
,
271 SvStream
& rOutStm
);
272 virtual void WriteHelpId( SvIdlDataBase
& rBase
, SvStream
& rOutStm
,
274 virtual void WriteSrc( SvIdlDataBase
& rBase
, SvStream
& rOutStm
,
276 virtual void WriteCSV( SvIdlDataBase
&, SvStream
& );
279 SV_DECL_IMPL_REF(SvMetaSlot
)
280 SV_DECL_IMPL_PERSIST_LIST(SvMetaSlot
,SvMetaSlot
*)