Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_unotools_ACCELCFG_HXX
20 : #define INCLUDED_unotools_ACCELCFG_HXX
21 :
22 : #include <com/sun/star/awt/KeyEvent.hpp>
23 : #include <unotools/options.hxx>
24 :
25 : #include <rtl/ustring.hxx>
26 : #include <tools/stream.hxx>
27 :
28 0 : struct SvtAcceleratorConfigItem
29 : {
30 : sal_uInt16 nCode;
31 : sal_uInt16 nModifier;
32 : OUString aCommand;
33 : };
34 :
35 : #include <list>
36 : typedef ::std::list < SvtAcceleratorConfigItem > SvtAcceleratorItemList;
37 :
38 : class SvStream;
39 : class KeyEvent;
40 : class String;
41 : class SvtAcceleratorConfig_Impl;
42 :
43 : class SvtAcceleratorConfiguration: public utl::detail::Options
44 : {
45 : SvtAcceleratorConfig_Impl* pImp;
46 :
47 : private:
48 :
49 : public:
50 : // get the global accelerators
51 : SvtAcceleratorConfiguration();
52 :
53 : // get special accelerators
54 : static String GetStreamName();
55 : static SvStream* GetDefaultStream( StreamMode );
56 :
57 : virtual ~SvtAcceleratorConfiguration();
58 :
59 : // save the configuration to a stream, f.e. into a document
60 : bool Commit( SvStream& rStream );
61 : };
62 :
63 : #endif
64 :
65 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|