1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_IDL_INC_SLOT_HXX
21 #define INCLUDED_IDL_INC_SLOT_HXX
24 #include <command.hxx>
26 class SvMetaSlot
: public SvMetaAttribute
28 SvMetaTypeRef aSlotType
;
29 SvMetaAttributeRef aMethod
;
30 SvIdentifier aGroupId
;
32 SvIdentifier aConfigId
;
33 SvIdentifier aExecMethod
;
34 SvIdentifier aStateMethod
;
35 SvIdentifier aDefault
;
40 SvBOOL aCachable
; // exclusive
45 SvBOOL aSynchron
; // exclusive
48 SvBOOL aRecordPerItem
;// exclusive
52 SvBOOL aRecordAbsolute
;
56 SvBOOL aToolBoxConfig
;
57 SvBOOL aStatusBarConfig
;
61 SvBOOL aImageRotation
;
62 SvBOOL aImageReflection
;
63 SvIdentifier aPseudoPrefix
;
64 SvString aDisableFlags
;
65 SvMetaSlot
* pLinkedSlot
;
66 SvMetaSlot
* pNextSlot
;
68 SvMetaEnumValue
* pEnumValue
;
71 void WriteSlot( const OString
& rShellName
,
72 sal_uInt16 nCount
, const OString
& rSlotId
,
73 SvSlotElementList
&rList
,
75 SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
77 void SetEnumValue(SvMetaEnumValue
*p
)
80 void SetCachable( bool bSet
)
86 void SetVolatile( bool bSet
)
92 void SetToggle( bool bSet
)
96 void SetAutoUpdate( bool bSet
)
101 void SetSynchron( bool bSet
)
107 void SetAsynchron( bool bSet
)
114 void SetRecordPerItem( bool bSet
)
116 aRecordPerItem
= bSet
;
118 aRecordPerSet
= aRecordManual
= aNoRecord
= false;
120 void SetRecordPerSet( bool bSet
)
122 aRecordPerSet
= bSet
;
124 aRecordPerItem
= aRecordManual
= aNoRecord
= false;
126 void SetRecordManual( bool bSet
)
128 aRecordManual
= bSet
;
130 aRecordPerItem
= aRecordPerSet
= aNoRecord
= false;
132 void SetNoRecord( bool bSet
)
136 aRecordPerItem
= aRecordPerSet
= aRecordManual
= false;
138 void SetRecordAbsolute( bool bSet
)
139 { aRecordAbsolute
= bSet
; }
140 void SetHasDialog( bool bSet
)
141 { aHasDialog
= bSet
; }
142 void SetMenuConfig( bool bSet
)
143 { aMenuConfig
= bSet
; }
144 void SetToolBoxConfig( bool bSet
)
145 { aToolBoxConfig
= bSet
; }
146 void SetStatusBarConfig( bool bSet
)
147 { aStatusBarConfig
= bSet
; }
148 void SetAccelConfig( bool bSet
)
149 { aAccelConfig
= bSet
; }
150 void SetAllConfig( bool bSet
)
153 aToolBoxConfig
= bSet
;
154 aStatusBarConfig
= bSet
;
157 void SetFastCall( bool bSet
)
158 { aFastCall
= bSet
; }
159 void SetContainer( bool bSet
)
160 { aContainer
= bSet
; }
161 void SetImageRotation( bool bSet
)
162 { aImageRotation
= bSet
; }
163 void SetImageReflection( bool bSet
)
164 { aImageReflection
= bSet
; }
168 SvMetaObject
* MakeClone() const;
169 SvMetaSlot
*Clone() const { return static_cast<SvMetaSlot
*>(MakeClone()); }
172 SvMetaSlot( SvMetaType
* pType
);
174 virtual bool IsVariable() const SAL_OVERRIDE
;
175 virtual bool IsMethod() const SAL_OVERRIDE
;
176 virtual OString
GetMangleName( bool bVariable
) const SAL_OVERRIDE
;
178 SvMetaAttribute
* GetMethod() const;
179 SvMetaType
* GetSlotType() const;
180 bool GetHasCoreId() const;
181 const OString
& GetGroupId() const;
182 const OString
& GetConfigId() const;
183 const OString
& GetExecMethod() const;
184 const OString
& GetStateMethod() const;
185 const OString
& GetDefault() const;
186 const OString
& GetDisableFlags() const;
187 bool GetPseudoSlots() const;
188 bool GetCachable() const;
189 bool GetVolatile() const;
190 bool GetToggle() const;
191 bool GetAutoUpdate() const;
193 bool GetSynchron() const;
194 bool GetAsynchron() const;
196 bool GetRecordPerItem() const;
197 bool GetRecordPerSet() const;
198 bool GetRecordManual() const;
199 bool GetNoRecord() const;
200 bool GetRecordAbsolute() const;
202 bool GetHasDialog() const;
203 const OString
& GetPseudoPrefix() const;
204 const OString
& GetUnoName() const;
205 bool GetMenuConfig() const;
206 bool GetToolBoxConfig() const;
207 bool GetStatusBarConfig() const;
208 bool GetAccelConfig() const;
209 bool GetFastCall() const;
210 bool GetContainer() const;
211 bool GetImageRotation() const;
212 bool GetImageReflection() const;
213 SvMetaSlot
* GetLinkedSlot() const
214 { return pLinkedSlot
; }
215 SvMetaSlot
* GetNextSlot() const
216 { return pNextSlot
; }
217 sal_uLong
GetListPos() const
219 void SetListPos(sal_uLong n
)
221 void ResetSlotPointer()
222 { pNextSlot
= pLinkedSlot
= 0; }
224 SvMetaEnumValue
* GetEnumValue() const
225 { return pEnumValue
; }
226 virtual bool Test( SvIdlDataBase
&, SvTokenStream
& rInStm
) SAL_OVERRIDE
;
227 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
228 SvTokenStream
& rInStm
) SAL_OVERRIDE
;
229 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) SAL_OVERRIDE
;
230 virtual void Insert( SvSlotElementList
&, const OString
& rPrefix
,
231 SvIdlDataBase
& ) SAL_OVERRIDE
;
232 void WriteSlotStubs( const OString
& rShellName
,
233 ByteStringList
& rList
,
234 SvStream
& rOutStm
);
235 sal_uInt16
WriteSlotMap( const OString
& rShellName
,
239 SvIdlDataBase
& rBase
,
240 SvStream
& rOutStm
);
241 sal_uInt16
WriteSlotParamArray( SvIdlDataBase
& rBase
,
242 SvStream
& rOutStm
);
244 typedef tools::SvRef
<SvMetaSlot
> SvMetaSlotRef
;
246 class SvMetaSlotMemberList
: public SvRefMemberList
<SvMetaSlot
*> {};
248 #endif // INCLUDED_IDL_INC_SLOT_HXX
250 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */