Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / dbaccess / source / ui / querydesign / limitboxcontroller.hxx
blob5a2ad947c08a5d2db24f788de9b01fee9c9fea19
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
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"
20 namespace dbaui
23 class LimitBoxImpl;
25 /**
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
33 public:
34 explicit LimitBoxController(
35 const css::uno::Reference< css::uno::XComponentContext >& rxContext );
36 virtual ~LimitBoxController();
38 /// XInterface
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;
43 /// XServiceInfo
44 DECLARE_SERVICE_INFO_STATIC();
46 /// XComponent
47 virtual void SAL_CALL dispose() throw (css::uno::RuntimeException, std::exception) override;
49 /// XStatusListener
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;
62 private:
63 VclPtr<LimitBoxImpl> m_pLimitBox;
66 } ///dbaui namespace
68 #endif /// INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_LIMITBOXCONTROLLER_HXX
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */