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/.
10 #ifndef INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_LIMITBOXCONTROLLER_HXX
11 #define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_LIMITBOXCONTROLLER_HXX
13 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <svtools/toolboxcontroller.hxx>
15 #include <rtl/ustring.hxx>
16 #include <vcl/vclptr.hxx>
18 #include "apitools.hxx"
26 * A ToolboxController to paste LimitBox onto the Query Design Toolbar
27 * It is communicating with querycontroller and this channel make enable
28 * to set\get the value of limitbox when switching between views
30 class LimitBoxController
: public svt::ToolboxController
,
31 public css::lang::XServiceInfo
34 explicit LimitBoxController(
35 const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
);
36 virtual ~LimitBoxController();
39 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& aType
) throw (css::uno::RuntimeException
, std::exception
) override
;
40 virtual void SAL_CALL
acquire() throw () override
;
41 virtual void SAL_CALL
release() throw () override
;
44 DECLARE_SERVICE_INFO_STATIC();
47 virtual void SAL_CALL
dispose() throw (css::uno::RuntimeException
, std::exception
) override
;
50 virtual void SAL_CALL
statusChanged( const css::frame::FeatureStateEvent
& Event
) throw ( css::uno::RuntimeException
, std::exception
) override
;
52 /// XToolbarController
53 virtual void SAL_CALL
execute( sal_Int16 KeyModifier
) throw (css::uno::RuntimeException
, std::exception
) override
;
54 virtual void SAL_CALL
click() throw (css::uno::RuntimeException
, std::exception
) override
;
55 virtual void SAL_CALL
doubleClick() throw (css::uno::RuntimeException
, std::exception
) override
;
56 virtual css::uno::Reference
< css::awt::XWindow
> SAL_CALL
createPopupWindow() throw (css::uno::RuntimeException
, std::exception
) override
;
57 virtual css::uno::Reference
< css::awt::XWindow
> SAL_CALL
createItemWindow( const css::uno::Reference
< css::awt::XWindow
>& Parent
) throw (css::uno::RuntimeException
, std::exception
) override
;
59 void dispatchCommand( const css::uno::Sequence
< css::beans::PropertyValue
>& rArgs
);
60 using svt::ToolboxController::dispatchCommand
;
63 VclPtr
<LimitBoxImpl
> m_pLimitBox
;
68 #endif /// INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_LIMITBOXCONTROLLER_HXX
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */