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 FORMS_SOLAR_DISPATCHER_HXX
21 #define FORMS_SOLAR_DISPATCHER_HXX
23 #include <rtl/ustring.hxx>
25 //.........................................................................
28 //.........................................................................
30 //=========================================================================
31 //= IFeatureDispatcher
32 //=========================================================================
33 class IFeatureDispatcher
36 /** dispatches a feature
39 the id of the feature to dispatch
41 virtual void dispatch( sal_Int16 _nFeatureId
) const = 0;
43 /** dispatches a feature, with an additional named parameter
46 the id of the feature to dispatch
48 @param _pParamAsciiName
49 the Ascii name of the parameter of the dispatch call
52 the value of the parameter of the dispatch call
54 virtual void dispatchWithArgument(
55 sal_Int16 _nFeatureId
,
56 const sal_Char
* _pParamName
,
57 const ::com::sun::star::uno::Any
& _rParamValue
60 /** checks whether a given feature is enabled
62 virtual bool isEnabled( sal_Int16 _nFeatureId
) const = 0;
64 /** returns the boolean state of a feature
66 Certain features may support more status information than only the enabled/disabled
67 state. The type of such additional information is fixed relative to a given feature, but
68 may differ between different features.
70 This method allows retrieving status information about features which have an additional
71 boolean information associated with it.
73 virtual bool getBooleanState( sal_Int16 _nFeatureId
) const = 0;
75 /** returns the string state of a feature
77 Certain features may support more status information than only the enabled/disabled
78 state. The type of such additional information is fixed relative to a given feature, but
79 may differ between different features.
81 This method allows retrieving status information about features which have an additional
82 string information associated with it.
84 virtual OUString
getStringState( sal_Int16 _nFeatureId
) const = 0;
86 /** returns the integer state of a feature
88 Certain features may support more status information than only the enabled/disabled
89 state. The type of such additional information is fixed relative to a given feature, but
90 may differ between different features.
92 This method allows retrieving status information about features which have an additional
93 integer information associated with it.
95 virtual sal_Int32
getIntegerState( sal_Int16 _nFeatureId
) const = 0;
98 ~IFeatureDispatcher() {}
101 //.........................................................................
103 //.........................................................................
105 #endif // FORMS_SOLAR_DISPATCHER_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */