Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / form / control / GridControl.idl
blob5150f3de718ab41ab28888fd7285aea109d0e107
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 __com_sun_star_form_control_GridControl_idl__
21 #define __com_sun_star_form_control_GridControl_idl__
23 #include <com/sun/star/awt/UnoControl.idl>
24 #include <com/sun/star/form/XGrid.idl>
25 #include <com/sun/star/form/XBoundComponent.idl>
26 #include <com/sun/star/form/XGridFieldDataSupplier.idl>
27 #include <com/sun/star/util/XModifyBroadcaster.idl>
28 #include <com/sun/star/util/XModeSelector.idl>
29 #include <com/sun/star/container/XIndexAccess.idl>
30 #include <com/sun/star/container/XEnumerationAccess.idl>
31 #include <com/sun/star/container/XContainer.idl>
32 #include <com/sun/star/frame/XDispatchProviderInterception.idl>
33 #include <com/sun/star/view/XSelectionSupplier.idl>
36 module com { module sun { module star { module form {
38 published interface XGridControl;
40 module control {
43 /** describes a table-like control for displaying data.
45 <p>The model of the control has to support the com::sun::star::form::component::GridControl
46 service.</p>
48 @see com::sun::star::awt::UnoControl
49 @see com::sun::star::awt::UnoControlModel
51 published service GridControl
53 service com::sun::star::awt::UnoControl;
55 /** allows committing the content of the active cell of the control.
57 interface com::sun::star::form::XBoundComponent;
59 /** allows access to the active cell within the grid.
61 <p>Only the column position can be modified using this interface, as the row position within
62 a table control bound to a data source is given implicitly (by the cursor position of the data source).</p>
64 interface com::sun::star::form::XGrid;
66 [optional] interface com::sun::star::form::XGridControl;
68 /** used to broadcast modifications made by the user (within the active cell)
70 interface com::sun::star::util::XModifyBroadcaster;
72 /** allows access to the field data of the grid's current row in different formats
74 [optional] interface com::sun::star::form::XGridFieldDataSupplier;
76 /** allows access to objects wrapping a single column
78 interface com::sun::star::container::XIndexAccess;
80 /** allows creation of an enumeration for the column objects
82 interface com::sun::star::container::XEnumerationAccess;
84 /** is used to switch the operating modes of the control.
86 <p>Besides the normal operation mode (which is used to display the database form's data) the control may
87 for instance support a filter mode.</p>
89 [optional] interface com::sun::star::util::XModeSelector;
91 /** used to control the selection of rows in the grid control.
93 <p>The selection used with the methods com::sun::star::view::XSelectionSupplier::getSelection()
94 and com::sun::star::view::XSelectionSupplier::select() is a sequence of Any's.<br/>
95 Here the elements of the Sequence are the bookmarks (in the com::sun::star::sdb::RowSet)
96 of the (to-be-) selected rows.</p>
98 [optional] interface com::sun::star::view::XSelectionSupplier;
100 /** allows external components to register dispatchers for some common form actions.
102 <p>A grid control can contain own UI elements for traveling within the database form it belongs to (This
103 concept seems to make sense, as a grid control - in opposite to other data aware controls - displays
104 not only one record at a time, but a larger number of records of the database form.)<br/>
105 With the help of this interface, external components which wish to handle such travelings themselves can
106 register interceptors for the actions in question.</p>
108 <p>Usual URLs to use include
109 <dl>
110 <dt>.uno:FormSlots/moveToFirst</dt><dd> move the cursor to the first record</dd>
111 <dt>.uno:FormSlots/moveToPrev</dt><dd> move the cursor to the previous record</dd>
112 <dt>.uno:FormSlots/moveToNext</dt><dd> move the cursor to the next record</dd>
113 <dt>.uno:FormSlots/moveToLast</dt><dd> move the cursor to the last record</dd>
114 <dt>.uno:FormSlots/moveToNew</dt><dd> move the cursor to the (one and only) <em>new</em> record</dd>
115 <dt>.uno:FormSlots/undoRecord</dt><dd> undo the changes done so far in the current record</dd>
116 </dl>
117 </p>
119 <p>A concrete implementation of this service may offer more or less URLs, but if it offers some of the URLs
120 above, it must stick to the meanings defined above.</p>
122 [optional] interface com::sun::star::frame::XDispatchProviderInterception;
126 }; }; }; }; };
129 #endif
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */