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
29 tools::SvRef
<SvMetaType
> aSlotType
;
30 tools::SvRef
<SvMetaSlot
> aMethod
;
31 SvIdentifier aGroupId
;
32 SvIdentifier aExecMethod
;
33 SvIdentifier aStateMethod
;
41 SvBOOL aRecordPerItem
;// exclusive
44 SvBOOL aRecordAbsolute
;
47 SvBOOL aToolBoxConfig
;
51 SvIdentifier aPseudoPrefix
;
52 OString aDisableFlags
;
53 SvMetaSlot
* pLinkedSlot
;
54 SvMetaSlot
* pNextSlot
;
56 SvMetaEnumValue
* pEnumValue
;
60 void WriteSlot( const OString
& rShellName
,
61 sal_uInt16 nCount
, const OString
& rSlotId
,
62 SvSlotElementList
&rList
,
64 SvIdlDataBase
& rBase
, SvStream
& rOutStm
);
66 void SetEnumValue(SvMetaEnumValue
*p
) { pEnumValue
= p
; }
67 OString
GetMangleName() const;
68 bool IsVariable() const;
69 bool IsMethod() const;
71 void SetRecordPerItem( bool bSet
)
73 aRecordPerItem
= bSet
;
75 aRecordPerSet
= aNoRecord
= false;
77 void SetRecordPerSet( bool bSet
)
81 aRecordPerItem
= aNoRecord
= false;
83 void SetNoRecord( bool bSet
)
87 aRecordPerItem
= aRecordPerSet
= false;
92 SvMetaSlot( SvMetaType
* pType
);
94 SvMetaAttribute
* GetMethod() const;
95 SvMetaType
* GetSlotType() const;
96 const OString
& GetGroupId() const;
97 const OString
& GetExecMethod() const;
98 const OString
& GetStateMethod() const;
99 const OString
& GetDisableFlags() const;
100 bool GetPseudoSlots() const;
101 bool GetToggle() const;
102 bool GetAutoUpdate() const;
104 bool GetAsynchron() const;
106 bool GetRecordPerItem() const;
107 bool GetRecordPerSet() const;
108 bool GetNoRecord() const;
109 bool GetRecordAbsolute() const;
111 const OString
& GetPseudoPrefix() const;
112 bool GetMenuConfig() const;
113 bool GetToolBoxConfig() const;
114 bool GetAccelConfig() const;
115 bool GetFastCall() const;
116 bool GetContainer() const;
117 bool GetReadOnlyDoc() const;
118 bool GetExport() const;
119 bool GetHidden() const;
121 sal_uLong
GetListPos() const
123 void SetListPos(sal_uLong n
)
125 void ResetSlotPointer()
126 { pNextSlot
= pLinkedSlot
= nullptr; }
128 virtual bool Test( SvTokenStream
& rInStm
) override
;
129 virtual void ReadAttributesSvIdl( SvIdlDataBase
& rBase
,
130 SvTokenStream
& rInStm
) override
;
131 virtual bool ReadSvIdl( SvIdlDataBase
&, SvTokenStream
& rInStm
) override
;
132 virtual void Insert( SvSlotElementList
&, const OString
& rPrefix
,
133 SvIdlDataBase
& ) override
;
134 void WriteSlotStubs( const OString
& rShellName
,
135 ByteStringList
& rList
,
136 SvStream
& rOutStm
);
137 sal_uInt16
WriteSlotMap( const OString
& rShellName
,
141 SvIdlDataBase
& rBase
,
142 SvStream
& rOutStm
);
143 sal_uInt16
WriteSlotParamArray( SvIdlDataBase
& rBase
,
144 SvStream
& rOutStm
);
147 #endif // INCLUDED_IDL_INC_SLOT_HXX
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */