fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / sfx2 / evntconf.hxx
blob2f181ad820b1ced284773d7e880ef7fb0ba1e7d2
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 _SFX_EVENTCONF_HXX
20 #define _SFX_EVENTCONF_HXX
22 #include "sal/config.h"
23 #include "sfx2/dllapi.h"
24 #include "sal/types.h"
25 #include <tools/rtti.hxx>
26 #include <vcl/fixed.hxx>
27 #include <vcl/button.hxx>
29 #include <sfx2/event.hxx>
31 #include <sfx2/sfxsids.hrc>
32 #ifdef ITEMID_MACRO
33 #undef ITEMID_MACRO
34 #endif
35 #define ITEMID_MACRO SID_ATTR_MACROITEM
36 #include <svl/macitem.hxx>
37 #include <vector>
39 class SfxObjectShell;
40 class SvxMacroTableDtor;
42 struct SFX2_DLLPUBLIC SfxEventName
44 sal_uInt16 mnId;
45 String maEventName;
46 String maUIName;
48 SfxEventName( sal_uInt16 nId,
49 const String& rEventName,
50 const String& rUIName )
51 : mnId( nId )
52 , maEventName( rEventName )
53 , maUIName( rUIName ) {}
56 typedef ::std::vector< SfxEventName* > _SfxEventNamesList;
58 class SFX2_DLLPUBLIC SfxEventNamesList
60 private:
61 _SfxEventNamesList aEventNamesList;
62 void DelDtor();
64 public:
65 SfxEventNamesList() {}
66 SfxEventNamesList( const SfxEventNamesList &rCpy ) { *this = rCpy; }
67 ~SfxEventNamesList() { DelDtor(); }
68 SfxEventNamesList& operator=( const SfxEventNamesList &rCpy );
70 size_t size() const { return aEventNamesList.size(); };
72 SfxEventName* at( size_t Index ) const
73 { return Index < aEventNamesList.size() ? aEventNamesList[ Index ] : NULL; }
75 void push_back( SfxEventName* Item ) { aEventNamesList.push_back( Item ); }
78 class SFX2_DLLPUBLIC SfxEventNamesItem : public SfxPoolItem
80 SfxEventNamesList aEventsList;
82 public:
83 TYPEINFO();
85 SfxEventNamesItem ( const sal_uInt16 nId ) : SfxPoolItem( nId ) {}
87 virtual int operator==( const SfxPoolItem& ) const;
88 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
89 SfxMapUnit eCoreMetric,
90 SfxMapUnit ePresMetric,
91 OUString &rText,
92 const IntlWrapper * = 0 ) const;
93 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
94 virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
95 virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
96 virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
98 const SfxEventNamesList& GetEvents() const { return aEventsList;}
99 void SetEvents( const SfxEventNamesList& rList ) { aEventsList = rList; }
100 void AddEvent( const String&, const String&, sal_uInt16 );
103 // -----------------------------------------------------------------------
105 #define PROP_EVENT_TYPE "EventType"
106 #define PROP_LIBRARY "Library"
107 #define PROP_SCRIPT "Script"
108 #define PROP_MACRO_NAME "MacroName"
109 #define STAR_BASIC "StarBasic"
111 class SFX2_DLLPUBLIC SfxEventConfiguration
113 public:
114 static void ConfigureEvent( OUString aName, const SvxMacro&, SfxObjectShell* pObjSh);
115 static SvxMacro* ConvertToMacro( const com::sun::star::uno::Any& rElement, SfxObjectShell* pDoc, sal_Bool bBlowUp );
118 #endif
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */