1/*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * Copyright 2000, 2010 Oracle and/or its affiliates.
5 *
6 * OpenOffice.org - a multi-platform office productivity suite
7 *
8 * This file is part of OpenOffice.org.
9 *
10 * OpenOffice.org is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License version 3
12 * only, as published by the Free Software Foundation.
13 *
14 * OpenOffice.org is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU Lesser General Public License version 3 for more details
18 * (a copy is included in the LICENSE file that accompanied this code).
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * version 3 along with OpenOffice.org.  If not, see
22 * <http://www.openoffice.org/license.html>
23 * for a copy of the LGPLv3 License.
24 *
25************************************************************************/
26
27#ifndef __com_sun_star_sdb_application_ApplicationController_idl__
28#define __com_sun_star_sdb_application_ApplicationController_idl__
29
30#include <com/sun/star/frame/Controller.idl>
31#include <com/sun/star/ui/XContextMenuInterception.idl>
32#include <com/sun/star/awt/XUserInputInterception.idl>
33#include <com/sun/star/view/XSelectionSupplier.idl>
34#include <com/sun/star/frame/XTitle.idl>
35#include <com/sun/star/frame/XTitleChangeBroadcaster.idl>
36#include <com/sun/star/sdb/application/XDatabaseDocumentUI.idl>
37
38//=============================================================================
39
40module com { module sun { module star { module sdb { module application {
41
42//=============================================================================
43
44/** is the default controller implementation for OpenOffice.org's database application.
45 */
46service DefaultViewController
47{
48    /** defines basic controller functionality
49    */
50    service ::com::sun::star::frame::Controller;
51
52    /** allows intercepting context menu requests done by the user
53
54        <p>The <member scope="::com::sun::star::ui">ContextMenuExecuteEvent::Selection</member> member
55        of the event passed to an interceptor will <em>not</em> be the controller itself
56        (though the controller also supports the <a href="#XSelectionSupplier"><code>XSelectionSupplier</code></a>
57        interface), but a component which descrbes the current selection of the very window where the context
58        menu was requested.</p>
59
60        <p>In OpenOffice.org's database application, database objects such as tables, queries, forms,
61        reports are displayed in a tree-like fashion. Currently, only context menu requests on this tree view
62        can be intercepted using the <code>XContextMenuInterception</code> interface. Context menu requests
63        in other places cannot be intercepted.</p>
64
65        <p>For the aforementioned tree view, the selection supplied by the <code>ContextMenuEvent::Selection</code>
66        component is an array of <type>NamedDatabaseObject</type> instances.</p>
67    */
68    interface ::com::sun::star::ui::XContextMenuInterception;
69
70    /** allows intercepting user input done by the user
71    */
72    interface ::com::sun::star::awt::XUserInputInterception;
73
74    /** <a name="XSelectionSupplier"></a>
75        provides access to the current selection inside the application window, and allows to change it
76        programmatically
77
78        <p>The selection is an array of <type>NamedDatabaseObject</type> instances.</p>
79    */
80    interface ::com::sun::star::view::XSelectionSupplier;
81
82    /** allows to retrieve and set the title which of the component
83    */
84    interface ::com::sun::star::frame::XTitle;
85
86    /** allows being notified about changes in the component's title
87    */
88    interface ::com::sun::star::frame::XTitleChangeBroadcaster;
89
90    /** allows programmatic access to aspects of the application's user interface.
91    */
92    interface XDatabaseDocumentUI;
93};
94
95//=============================================================================
96
97}; }; }; }; };
98
99//=============================================================================
100
101#endif
102