2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2002-12-10 16:19:42 +00:00
|
|
|
|
2013-10-23 19:17:00 +02:00
|
|
|
#ifndef INCLUDED_COMPHELPER_ACCESSIBLEKEYBINDINGHELPER_HXX
|
|
|
|
#define INCLUDED_COMPHELPER_ACCESSIBLEKEYBINDINGHELPER_HXX
|
2002-12-10 16:19:42 +00:00
|
|
|
|
2003-04-24 16:25:46 +00:00
|
|
|
#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
|
2015-07-10 17:50:12 +09:00
|
|
|
#include <cppuhelper/implbase.hxx>
|
2002-12-10 16:19:42 +00:00
|
|
|
#include <osl/mutex.hxx>
|
|
|
|
|
|
|
|
#include <vector>
|
2012-06-28 13:12:59 +02:00
|
|
|
|
2013-11-09 13:59:36 -06:00
|
|
|
#include <comphelper/comphelperdllapi.h>
|
2002-12-10 16:19:42 +00:00
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2002-12-10 16:19:42 +00:00
|
|
|
namespace comphelper
|
|
|
|
{
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2002-12-10 16:19:42 +00:00
|
|
|
// OAccessibleKeyBindingHelper
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2002-12-10 16:19:42 +00:00
|
|
|
|
2015-10-19 12:51:29 +02:00
|
|
|
typedef ::cppu::WeakImplHelper < css::accessibility::XAccessibleKeyBinding
|
2015-07-10 17:50:12 +09:00
|
|
|
> OAccessibleKeyBindingHelper_Base;
|
2002-12-10 16:19:42 +00:00
|
|
|
|
|
|
|
/** a helper class for implementing an accessible keybinding
|
|
|
|
*/
|
2005-02-16 14:51:45 +00:00
|
|
|
class COMPHELPER_DLLPUBLIC OAccessibleKeyBindingHelper : public OAccessibleKeyBindingHelper_Base
|
2002-12-10 16:19:42 +00:00
|
|
|
{
|
|
|
|
private:
|
2015-10-19 12:51:29 +02:00
|
|
|
typedef ::std::vector< css::uno::Sequence< css::awt::KeyStroke > > KeyBindings;
|
2002-12-10 16:19:42 +00:00
|
|
|
|
|
|
|
KeyBindings m_aKeyBindings;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
::osl::Mutex m_aMutex;
|
|
|
|
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~OAccessibleKeyBindingHelper() override;
|
2002-12-10 16:19:42 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
OAccessibleKeyBindingHelper();
|
|
|
|
OAccessibleKeyBindingHelper( const OAccessibleKeyBindingHelper& rHelper );
|
|
|
|
|
2015-10-19 12:51:29 +02:00
|
|
|
void AddKeyBinding( const css::uno::Sequence< css::awt::KeyStroke >& rKeyBinding ) throw (css::uno::RuntimeException);
|
|
|
|
void AddKeyBinding( const css::awt::KeyStroke& rKeyStroke ) throw (css::uno::RuntimeException);
|
2002-12-10 16:19:42 +00:00
|
|
|
|
|
|
|
// XAccessibleKeyBinding
|
2015-10-19 12:51:29 +02:00
|
|
|
virtual sal_Int32 SAL_CALL getAccessibleKeyBindingCount() throw (css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Sequence< css::awt::KeyStroke > SAL_CALL getAccessibleKeyBinding( sal_Int32 nIndex ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
|
2002-12-10 16:19:42 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2002-12-10 16:19:42 +00:00
|
|
|
} // namespace comphelper
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2002-12-10 16:19:42 +00:00
|
|
|
|
2013-10-23 19:17:00 +02:00
|
|
|
#endif // INCLUDED_COMPHELPER_ACCESSIBLEKEYBINDINGHELPER_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|