update emoji autocorrect entries from po-files
[LibreOffice.git] / include / dbaccess / IController.hxx
blob87679fcd54ebae8166cc5b33086cfa16af04eead
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/.
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 .
20 #ifndef INCLUDED_DBACCESS_ICONTROLLER_HXX
21 #define INCLUDED_DBACCESS_ICONTROLLER_HXX
23 #include <com/sun/star/beans/PropertyValue.hpp>
24 #include <com/sun/star/uno/Sequence.hxx>
25 #include <dbaccess/dbaccessdllapi.h>
27 namespace com { namespace sun { namespace star {
28 namespace util {
29 struct URL;
31 namespace frame {
32 class XController;
34 } } }
36 class NotifyEvent;
38 namespace dbaui
40 // interface for controller depended calls like commands
41 class DBACCESS_DLLPUBLIC IController
43 public:
44 /** executes the given command without checking if it is allowed
45 @param _rCommand the URL of the command
47 virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0;
49 /** executes the given command only when it is allowed
50 @param _rCommand
51 the URL of the command
53 virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0;
55 /** executes the given command without checking if it is allowed
56 @param _nCommandId
57 the id of the command URL
59 virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0;
61 /** executes the given command only when it is allowed
62 @param _nCommandId
63 the id of the command URL
65 virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0;
68 /** checks if the given Command is enabled
69 @param _nCommandId
70 the id of the command URL
72 @return
73 <TRUE/> if the command is allowed, otherwise <FALSE/>.
75 virtual bool isCommandEnabled(sal_uInt16 _nCommandId) const = 0;
77 /** checks if the given Command is enabled
78 @param _rCompleteCommandURL
79 the URL of the command
81 @return
82 <TRUE/> if the command is allowed, otherwise <FALSE/>.
84 virtual bool isCommandEnabled( const OUString& _rCompleteCommandURL ) const = 0;
86 /** registers a command URL, giving it a unique name
88 If you call this with a command URL which is supported by the controller, then
89 you will simply get the controller's internal numeric shortcut to this command.
91 If you call this with a command URL which is not supported by the controller, then
92 you will get a new ID, which is unique during the lifetime of the controller.
94 If the command URL is invalid, or the controller cannot register new commands anymore,
95 then 0 is returned.
97 virtual sal_uInt16
98 registerCommandURL( const OUString& _rCompleteCommandURL ) = 0;
100 /** notifyHiContrastChanged will be called when the hicontrast mode changed.
101 @param _bHiContrast
102 <TRUE/> when in hicontrast mode.
104 virtual void notifyHiContrastChanged() = 0;
106 /** checks if the selected data source is read only
107 @return
108 <TRUE/> if read only, otherwise <FALSE/>
110 virtual bool isDataSourceReadOnly() const = 0;
112 /** provides access to the model of the controller
114 This must be the same model as returned by XController::getModel, and might be <NULL/> when
115 the controller does not have an own model.
117 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
118 getXController() throw( ::com::sun::star::uno::RuntimeException ) = 0;
120 /** allows interception of user input, aka mouse clicks and key events
122 virtual bool interceptUserInput( const NotifyEvent& _rEvent ) = 0;
124 virtual void SAL_CALL acquire( ) throw () = 0;
125 virtual void SAL_CALL release( ) throw () = 0;
127 protected:
128 ~IController() {}
131 #endif // INCLUDED_DBACCESS_ICONTROLLER_HXX
133 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */