fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / sfx2 / ctrlitem.hxx
blobaf6288e772e91b6dc41d345aed1dc8e7fb15a58a
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 .
19 #ifndef _SFXCTRLITEM_HXX
20 #define _SFXCTRLITEM_HXX
22 #include "sal/config.h"
23 #include "sfx2/dllapi.h"
24 #include "sal/types.h"
25 #include <svl/poolitem.hxx>
27 class SfxPoolItem;
28 class SfxBindings;
29 class SvStream;
31 class SFX2_DLLPUBLIC SfxControllerItem
33 private:
34 sal_uInt16 nId;
35 SfxControllerItem* pNext; // to notify next ControllerItem
36 SfxBindings* pBindings;
38 protected:
39 #if defined( DBG_UTIL )
40 SAL_DLLPRIVATE void CheckConfigure_Impl( sal_uIntPtr nType );
41 #endif
43 public:
44 SfxBindings & GetBindings() {
45 DBG_ASSERT(pBindings, "no Bindings");
46 return *pBindings;
48 const SfxBindings & GetBindings() const {
49 DBG_ASSERT(pBindings, "no Bindings");
50 return *pBindings;
53 SfxControllerItem(); // for arrays
54 SfxControllerItem( sal_uInt16 nId, SfxBindings & );
55 virtual ~SfxControllerItem();
57 void Bind( sal_uInt16 nNewId, SfxBindings * = 0); // Register in SfxBindings
58 void UnBind();
59 void ReBind();
60 sal_Bool IsBound() const;
61 void ClearCache();
62 void SetBindings(SfxBindings &rBindings) { pBindings = &rBindings; }
64 SfxControllerItem* GetItemLink();
65 SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewLink );
67 void SetId( sal_uInt16 nItemId );
68 sal_uInt16 GetId() const { return nId; }
70 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
71 const SfxPoolItem* pState );
72 virtual void DeleteFloatingWindow();
74 SfxMapUnit GetCoreMetric() const;
76 static SfxItemState GetItemState( const SfxPoolItem* pState );
78 SAL_DLLPRIVATE sal_Bool IsBindable_Impl() const
79 { return pBindings != NULL; }
80 SAL_DLLPRIVATE void BindInternal_Impl( sal_uInt16 nNewId, SfxBindings* );
83 //====================================================================
85 class SFX2_DLLPUBLIC SfxStatusForwarder: public SfxControllerItem
87 SfxControllerItem* pMaster;
89 protected:
90 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
91 const SfxPoolItem* pState );
93 public:
94 SfxStatusForwarder( sal_uInt16 nSlotId,
95 SfxControllerItem&rMaster );
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */