1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_FORMS_SOURCE_INC_FEATUREDISPATCHER_HXX
21 #define INCLUDED_FORMS_SOURCE_INC_FEATUREDISPATCHER_HXX
23 #include <rtl/ustring.hxx>
29 class IFeatureDispatcher
32 /** dispatches a feature
35 the id of the feature to dispatch
37 virtual void dispatch( sal_Int16 _nFeatureId
) const = 0;
39 /** dispatches a feature, with an additional named parameter
42 the id of the feature to dispatch
44 @param _pParamAsciiName
45 the Ascii name of the parameter of the dispatch call
48 the value of the parameter of the dispatch call
50 virtual void dispatchWithArgument(
51 sal_Int16 _nFeatureId
,
52 const sal_Char
* _pParamName
,
53 const css::uno::Any
& _rParamValue
56 /** checks whether a given feature is enabled
58 virtual bool isEnabled( sal_Int16 _nFeatureId
) const = 0;
60 /** returns the boolean state of a feature
62 Certain features may support more status information than only the enabled/disabled
63 state. The type of such additional information is fixed relative to a given feature, but
64 may differ between different features.
66 This method allows retrieving status information about features which have an additional
67 boolean information associated with it.
69 virtual bool getBooleanState( sal_Int16 _nFeatureId
) const = 0;
71 /** returns the string state of a feature
73 Certain features may support more status information than only the enabled/disabled
74 state. The type of such additional information is fixed relative to a given feature, but
75 may differ between different features.
77 This method allows retrieving status information about features which have an additional
78 string information associated with it.
80 virtual OUString
getStringState( sal_Int16 _nFeatureId
) const = 0;
82 /** returns the integer state of a feature
84 Certain features may support more status information than only the enabled/disabled
85 state. The type of such additional information is fixed relative to a given feature, but
86 may differ between different features.
88 This method allows retrieving status information about features which have an additional
89 integer information associated with it.
91 virtual sal_Int32
getIntegerState( sal_Int16 _nFeatureId
) const = 0;
94 ~IFeatureDispatcher() {}
101 #endif // INCLUDED_FORMS_SOURCE_INC_FEATUREDISPATCHER_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */