Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / idl / inc / slot.hxx
blob1aa6ebca6913e9d4b7337f91112fa839ab2de075
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 public:
29 SvIdentifier aGroupId;
30 SvIdentifier aExecMethod;
31 SvIdentifier aStateMethod;
33 SvBOOL aToggle;
34 SvBOOL aAutoUpdate;
36 SvBOOL aAsynchron;
38 SvBOOL aRecordPerItem;// exclusive
39 SvBOOL aRecordPerSet;
40 SvBOOL aNoRecord;
41 SvBOOL aRecordAbsolute;
43 SvBOOL aMenuConfig;
44 SvBOOL aToolBoxConfig;
45 SvBOOL aAccelConfig;
46 SvBOOL aFastCall;
47 SvBOOL aContainer;
48 OString aDisableFlags;
49 SvMetaSlot* pNextSlot;
50 sal_uLong nListPos;
51 SvBOOL aReadOnlyDoc;
52 SvBOOL aExport;
54 void WriteSlot( const OString& rShellName,
55 sal_uInt16 nCount, const OString& rSlotId,
56 SvSlotElementList &rList,
57 size_t nStart,
58 SvIdlDataBase & rBase, SvStream & rOutStm );
60 bool IsVariable() const;
61 bool IsMethod() const;
63 void SetRecordPerItem( bool bSet )
65 aRecordPerItem = bSet;
66 if( bSet )
67 aRecordPerSet = aNoRecord = false;
69 void SetRecordPerSet( bool bSet )
71 aRecordPerSet = bSet;
72 if( bSet )
73 aRecordPerItem = aNoRecord = false;
75 void SetNoRecord( bool bSet )
77 aNoRecord = bSet;
78 if( bSet )
79 aRecordPerItem = aRecordPerSet = false;
82 public:
83 SvMetaSlot();
84 SvMetaSlot( SvMetaType * pType );
86 const OString& GetGroupId() const;
87 const OString& GetExecMethod() const;
88 const OString& GetStateMethod() const;
89 const OString& GetDisableFlags() const;
90 bool GetToggle() const;
91 bool GetAutoUpdate() const;
93 bool GetAsynchron() const;
95 bool GetRecordPerItem() const;
96 bool GetRecordPerSet() const;
97 bool GetNoRecord() const;
98 bool GetRecordAbsolute() const;
100 bool GetMenuConfig() const;
101 bool GetToolBoxConfig() const;
102 bool GetAccelConfig() const;
103 bool GetFastCall() const;
104 bool GetContainer() const;
105 bool GetReadOnlyDoc() const;
106 bool GetExport() const;
107 bool GetHidden() const;
109 sal_uLong GetListPos() const
110 { return nListPos; }
111 void SetListPos(sal_uLong n)
112 { nListPos = n; }
113 void ResetSlotPointer()
114 { pNextSlot = nullptr; }
116 virtual bool Test( SvTokenStream & rInStm ) override;
117 virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase,
118 SvTokenStream & rInStm ) override;
119 virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
120 virtual void Insert( SvSlotElementList& ) override;
121 void WriteSlotStubs( const OString& rShellName,
122 ByteStringList & rList,
123 SvStream & rOutStm ) const;
124 sal_uInt16 WriteSlotMap( const OString& rShellName,
125 sal_uInt16 nCount,
126 SvSlotElementList&,
127 size_t nStart,
128 SvIdlDataBase & rBase,
129 SvStream & rOutStm );
130 sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
131 SvStream & rOutStm ) const;
134 #endif // INCLUDED_IDL_INC_SLOT_HXX
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */