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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_TOOLBOXCONTROLLER_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_TOOLBOXCONTROLLER_HXX
22 #include <svtools/toolboxcontroller.hxx>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <cppuhelper/implbase1.hxx>
25 #include "apitools.hxx"
26 #include "moduledbu.hxx"
34 typedef ::cppu::ImplHelper1
< ::com::sun::star::lang::XServiceInfo
> TToolboxController_BASE
;
36 class OToolboxController
: public ::svt::ToolboxController
37 ,public TToolboxController_BASE
39 typedef std::map
<OUString
, sal_Bool
> TCommandState
;
40 OModuleClient m_aModuleClient
;
41 TCommandState m_aStates
;
42 sal_uInt16 m_nToolBoxId
;
44 ::std::unique_ptr
<PopupMenu
> getMenu();
46 OToolboxController(const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxORB
);
49 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
51 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
53 DECLARE_SERVICE_INFO_STATIC();
56 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
, std::exception
) SAL_OVERRIDE
;
58 virtual void SAL_CALL
statusChanged( const ::com::sun::star::frame::FeatureStateEvent
& Event
) throw ( ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
60 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XWindow
> SAL_CALL
createPopupWindow() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
63 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_TOOLBOXCONTROLLER_HXX
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */