Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef FORMS_SOLAR_DISPATCHER_HXX
30 : : #define FORMS_SOLAR_DISPATCHER_HXX
31 : :
32 : : #include <rtl/ustring.hxx>
33 : :
34 : : //.........................................................................
35 : : namespace frm
36 : : {
37 : : //.........................................................................
38 : :
39 : : //=========================================================================
40 : : //= IFeatureDispatcher
41 : : //=========================================================================
42 : 113 : class IFeatureDispatcher
43 : : {
44 : : public:
45 : : /** dispatches a feature
46 : :
47 : : @param _nFeatureId
48 : : the id of the feature to dispatch
49 : : */
50 : : virtual void dispatch( sal_Int16 _nFeatureId ) const = 0;
51 : :
52 : : /** dispatches a feature, with an additional named parameter
53 : :
54 : : @param _nFeatureId
55 : : the id of the feature to dispatch
56 : :
57 : : @param _pParamAsciiName
58 : : the Ascii name of the parameter of the dispatch call
59 : :
60 : : @param _rParamValue
61 : : the value of the parameter of the dispatch call
62 : : */
63 : : virtual void dispatchWithArgument(
64 : : sal_Int16 _nFeatureId,
65 : : const sal_Char* _pParamName,
66 : : const ::com::sun::star::uno::Any& _rParamValue
67 : : ) const = 0;
68 : :
69 : : /** checks whether a given feature is enabled
70 : : */
71 : : virtual bool isEnabled( sal_Int16 _nFeatureId ) const = 0;
72 : :
73 : : /** returns the boolean state of a feature
74 : :
75 : : Certain features may support more status information than only the enabled/disabled
76 : : state. The type of such additional information is fixed relative to a given feature, but
77 : : may differ between different features.
78 : :
79 : : This method allows retrieving status information about features which have an additional
80 : : boolean information associated with it.
81 : : */
82 : : virtual bool getBooleanState( sal_Int16 _nFeatureId ) const = 0;
83 : :
84 : : /** returns the string state of a feature
85 : :
86 : : Certain features may support more status information than only the enabled/disabled
87 : : state. The type of such additional information is fixed relative to a given feature, but
88 : : may differ between different features.
89 : :
90 : : This method allows retrieving status information about features which have an additional
91 : : string information associated with it.
92 : : */
93 : : virtual ::rtl::OUString getStringState( sal_Int16 _nFeatureId ) const = 0;
94 : :
95 : : /** returns the integer state of a feature
96 : :
97 : : Certain features may support more status information than only the enabled/disabled
98 : : state. The type of such additional information is fixed relative to a given feature, but
99 : : may differ between different features.
100 : :
101 : : This method allows retrieving status information about features which have an additional
102 : : integer information associated with it.
103 : : */
104 : : virtual sal_Int32 getIntegerState( sal_Int16 _nFeatureId ) const = 0;
105 : :
106 : : protected:
107 : 113 : ~IFeatureDispatcher() {}
108 : : };
109 : :
110 : : //.........................................................................
111 : : } // namespace frm
112 : : //.........................................................................
113 : :
114 : : #endif // FORMS_SOLAR_DISPATCHER_HXX
115 : :
116 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|