1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_form_runtime_FormFeature_idl__
25#define __com_sun_star_form_runtime_FormFeature_idl__
26
27//=============================================================================
28
29module com { module sun { module star { module form { module runtime {
30
31//=============================================================================
32
33/** specifies the operations on a user interface form, as supported by the
34    <type>XFormOperations</type> interface.
35
36    @since OpenOffice 2.2
37*/
38constants FormFeature
39{
40    /** moves the form to a record given by absolute position.
41
42        <p>This operation cannot be executed without arguments. When executing it (i.e.
43        when calling <member scope="com::sun::star::form::runtime">XFormOperations::executeWithArguments</member>),
44        you need to specify a parameter named <em>Position</em> of type <code>long</code>, which
45        denotes the position to move the form to.</p>
46    */
47    const short MoveAbsolute        = 1;
48
49    /** determines the number of total records in the form,
50        including the potentially active insertion row.
51
52        <p>This is not strictly an operation you can do on a form, but rather a
53        state you can retrieve (and display to the user) using the <type>XFormOperations</type>'
54        respective methods.</p>
55
56        <p>The state obtained here is a string, not a number. This is because in an UI
57        form, the fact that the current record count is not yet known (since not all
58        records have been visited, yet) is indicated by an asterik (<code>*</code>) besides
59        the record count.</p>
60    */
61    const short TotalRecords        = 2;
62
63    /// moves the form to the first record
64    const short MoveToFirst         = 3;
65
66    /// moves the form to the record before the current record, if there is any
67    const short MoveToPrevious      = 4;
68
69    /// moves the form to the record after the current record, if there is any
70    const short MoveToNext          = 5;
71
72    /// moves the form to the last record
73    const short MoveToLast          = 6;
74
75    /// moves the form to the insertion row, if privileges allow
76    const short MoveToInsertRow     = 7;
77
78    /** saves all changes in the form's current record, including changes in the current
79        control which had not yet been committed to the form
80    */
81    const short SaveRecordChanges   = 8;
82
83    /** revertsall changes in the form's current record, including changes in the current
84        control which had not yet been committed to the form
85    */
86    const short UndoRecordChanges   = 9;
87
88    /** deletes the current record, while honoring any registered
89        <type scope="com::sun::star::form">XConfirmDeleteListener</type>s
90    */
91    const short DeleteRecord        = 10;
92
93    /// reloads the form content
94    const short ReloadForm          = 11;
95
96    /// sorts the form ascending by the field which the active form control is bound to.
97    const short SortAscending       = 12;
98
99    /// sorts the form descending by the field which the active form control is bound to.
100    const short SortDescending      = 13;
101
102    /// opens a dialog which allows the user to interactively specify a form sorting order
103    const short InteractiveSort     = 14;
104
105    /** adds a filter to the form, which is defined by the active form control and its
106        current value
107
108        <p>For instance, if the currently active form control is bound to a table field
109        named <code>Price</code>, and currently has a value of <code>100</code>, then invoking
110        the <code>AutoFilter</code> operation will put an additional filter <code>Price = 100</code>
111        on the form.</p>
112    */
113    const short AutoFilter          = 15;
114
115    /// opens a dialog which allows the user to interactively specify a form filter
116    const short InteractiveFilter   = 16;
117
118    /** toggles the <member scope="com::sun::star::sdb">RowSet::ApplyFilter</member> property
119        of a the form.
120    */
121    const short ToggleApplyFilter   = 17;
122
123    /** removes all filter and sort criterions put on the form.
124
125        <p>Note that this does not apply to criterios which are part of the form's
126        data source. That is, if you bind the form to the SQL command <code>SELECT * FROM
127        Articles WHERE Price &gt; 100</code>, then the <code>Price &gt; 100</code> filter
128        will not be removed.</p>
129
130        <p>Effectively, this operation resets the <member scope="com::sun::star::sdb">RowSet::Filter</member>
131        and <member scope="com::sun::star::sdb">RowSet::Order</member> properties of the form.</p>
132    */
133    const short RemoveFilterAndSort = 18;
134
135    /** refreshs the current control
136
137        <p>Basically, this means calling XRefreshable::refresh on the current control, if it supports
138        this interface.</p>
139
140        @since OpenOffice 3.1
141    */
142    const short RefreshCurrentControl = 19;
143};
144
145//=============================================================================
146
147}; }; }; }; };
148
149//=============================================================================
150
151#endif
152