1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef COMMANDIMAGEPROVIDER_HXX
25 #define COMMANDIMAGEPROVIDER_HXX
26 
27 /** === begin UNO includes === **/
28 #include <com/sun/star/frame/XModel.hpp>
29 /** === end UNO includes === **/
30 
31 #include <comphelper/componentcontext.hxx>
32 #include <vcl/image.hxx>
33 
34 #include <boost/shared_ptr.hpp>
35 
36 //........................................................................
37 namespace frm
38 {
39 //........................................................................
40 
41     //=====================================================================
42     //= ICommandImageProvider
43     //=====================================================================
44     typedef ::rtl::OUString                                 CommandURL;
45     typedef ::com::sun::star::uno::Sequence< CommandURL >   CommandURLs;
46     typedef ::std::vector< Image >                          CommandImages;
47 
48     class SAL_NO_VTABLE ICommandImageProvider
49     {
50     public:
51         virtual CommandImages   getCommandImages(
52                                     const CommandURLs& _rCommandURLs,
53                                     const bool _bLarge,
54                                     const bool _bHiContrast
55                                 ) const = 0;
56 
~ICommandImageProvider()57         virtual ~ICommandImageProvider() { }
58     };
59 
60     typedef ::boost::shared_ptr< const ICommandImageProvider >  PCommandImageProvider;
61 
62     //=====================================================================
63     //= factory
64     //=====================================================================
65     PCommandImageProvider
66         createDocumentCommandImageProvider(
67             const ::comphelper::ComponentContext& _rContext,
68             const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocument
69         );
70 
71 //........................................................................
72 } // namespace frm
73 //........................................................................
74 
75 #endif // COMMANDIMAGEPROVIDER_HXX
76