fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / idl / inc / slot.hxx
blob3014d327b8e46f8184bfd694e003d506dffc7ce0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
23 #include <types.hxx>
24 #include <command.hxx>
26 class SvMetaSlot : public SvMetaAttribute
28 SvMetaTypeRef aSlotType;
29 SvMetaAttributeRef aMethod;
30 SvIdentifier aGroupId;
31 SvBOOL aHasCoreId;
32 SvIdentifier aConfigId;
33 SvIdentifier aExecMethod;
34 SvIdentifier aStateMethod;
35 SvIdentifier aDefault;
36 SvBOOL aPseudoSlots;
37 SvBOOL aGet;
38 SvBOOL aSet;
40 SvBOOL aCachable; // exclusive
41 SvBOOL aVolatile;
42 SvBOOL aToggle;
43 SvBOOL aAutoUpdate;
45 SvBOOL aSynchron; // exclusive
46 SvBOOL aAsynchron;
48 SvBOOL aRecordPerItem;// exclusive
49 SvBOOL aRecordPerSet;
50 SvBOOL aRecordManual;
51 SvBOOL aNoRecord;
52 SvBOOL aRecordAbsolute;
54 SvBOOL aHasDialog;
55 SvBOOL aMenuConfig;
56 SvBOOL aToolBoxConfig;
57 SvBOOL aStatusBarConfig;
58 SvBOOL aAccelConfig;
59 SvBOOL aFastCall;
60 SvBOOL aContainer;
61 SvBOOL aImageRotation;
62 SvBOOL aImageReflection;
63 SvIdentifier aPseudoPrefix;
64 SvString aDisableFlags;
65 SvMetaSlot* pLinkedSlot;
66 SvMetaSlot* pNextSlot;
67 sal_uLong nListPos;
68 SvMetaEnumValue* pEnumValue;
69 SvString aUnoName;
71 void WriteSlot( const OString& rShellName,
72 sal_uInt16 nCount, const OString& rSlotId,
73 SvSlotElementList &rList,
74 size_t nStart,
75 SvIdlDataBase & rBase, SvStream & rOutStm );
77 void SetEnumValue(SvMetaEnumValue *p)
78 { pEnumValue = p; }
79 protected:
80 void SetCachable( bool bSet )
82 aCachable = bSet;
83 if( bSet )
84 aVolatile = false;
86 void SetVolatile( bool bSet )
88 aVolatile = bSet;
89 if( bSet )
90 aCachable = false;
92 void SetToggle( bool bSet )
94 aToggle = bSet;
96 void SetAutoUpdate( bool bSet )
98 aAutoUpdate = bSet;
101 void SetSynchron( bool bSet )
103 aSynchron = bSet;
104 if( bSet )
105 aAsynchron = false;
107 void SetAsynchron( bool bSet )
109 aAsynchron = bSet;
110 if( bSet )
111 aSynchron = false;
114 void SetRecordPerItem( bool bSet )
116 aRecordPerItem = bSet;
117 if( bSet )
118 aRecordPerSet = aRecordManual = aNoRecord = false;
120 void SetRecordPerSet( bool bSet )
122 aRecordPerSet = bSet;
123 if( bSet )
124 aRecordPerItem = aRecordManual = aNoRecord = false;
126 void SetRecordManual( bool bSet )
128 aRecordManual = bSet;
129 if( bSet )
130 aRecordPerItem = aRecordPerSet = aNoRecord = false;
132 void SetNoRecord( bool bSet )
134 aNoRecord = bSet;
135 if( 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 )
152 aMenuConfig = bSet;
153 aToolBoxConfig = bSet;
154 aStatusBarConfig = bSet;
155 aAccelConfig = 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; }
166 public:
167 TYPEINFO_OVERRIDE();
168 SvMetaObject * MakeClone() const;
169 SvMetaSlot *Clone() const { return static_cast<SvMetaSlot *>(MakeClone()); }
171 SvMetaSlot();
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
218 { return nListPos; }
219 void SetListPos(sal_uLong n)
220 { nListPos = 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,
236 sal_uInt16 nCount,
237 SvSlotElementList&,
238 size_t nStart,
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: */