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 DBACCESS_TOOLBOXCONTROLLER_HXX
20 : #define DBACCESS_TOOLBOXCONTROLLER_HXX
21 :
22 : #include <svtools/toolboxcontroller.hxx>
23 : #include <comphelper/stl_types.hxx>
24 : #include <com/sun/star/lang/XServiceInfo.hpp>
25 : #include <cppuhelper/implbase1.hxx>
26 : #include "apitools.hxx"
27 : #include "moduledbu.hxx"
28 : #include <memory>
29 :
30 : class PopupMenu;
31 : namespace dbaui
32 : {
33 : typedef ::cppu::ImplHelper1 < ::com::sun::star::lang::XServiceInfo> TToolboxController_BASE;
34 :
35 0 : class OToolboxController : public ::svt::ToolboxController
36 : ,public TToolboxController_BASE
37 : {
38 : DECLARE_STL_USTRINGACCESS_MAP(sal_Bool,TCommandState);
39 : OModuleClient m_aModuleClient;
40 : TCommandState m_aStates;
41 : sal_uInt16 m_nToolBoxId;
42 :
43 : ::std::auto_ptr<PopupMenu> getMenu();
44 : public:
45 : OToolboxController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
46 :
47 : // XInterface
48 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
49 : virtual void SAL_CALL acquire() throw ();
50 : virtual void SAL_CALL release() throw ();
51 : // XServiceInfo
52 : DECLARE_SERVICE_INFO_STATIC();
53 :
54 : // XInitialization
55 : virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
56 : // XStatusListener
57 : virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
58 : // XToolbarController
59 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
60 : };
61 : //..........................................................................
62 : } // dbaui
63 : //..........................................................................
64 : #endif //DBACCESS_TOOLBOXCONTROLLER_HXX
65 :
66 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|