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#ifndef _EXTENSIONS_FONTEST_IDL
24#define _EXTENSIONS_FONTEST_IDL
25
26
27#include <uno/intrface.idl>
28#include <stardiv/uno/beans/propset.idl>
29#include <stardiv/uno/lang/ulexcp.idl>
30
31module stardiv
32{
33
34    module extensions
35    {
36
37        module fontest
38        {
39
40/** a flag called "surpressed" changes the action of check and checkWithDialog
41 @author      Berndt Reinhold
42 @see         stardiv::uno::XInterface
43 */
44            [ uik(BF6D5A72-B53B-11d2-A17B00A0-243D2A0B), ident("FonTest", 1.0) ]
45            interface XFonTest: stardiv::uno::XInterface
46            {
47                /** Checks if "StarMath" and "StarBats" fonts are installed.
48                 <P>
49                 @param bForce: If TRUE check the fonts even if surpressed.
50                 Otherwise check the fonts only if not surpressed.
51                 @see resetSurpressed
52                 @returns TRUE if the fonts are available. Also TRUE if surpressed
53                 is TRUE and bForce is FALSE. Otherwise return FALSE.
54                 </P>
55                 */
56                boolean check([in] boolean bForce);
57
58                /** Same as check but additional shows a dialog if result is FALSE.
59                 <P>
60                 @param bForce: same as in check
61                 @see check
62                 @see resetSurpressed
63                 </P>
64                 */
65                boolean checkWithDialog([in] boolean bForce);
66
67                /** Shows a dialog if the font "StarBats" or "StarMath" is missing.
68                 <P>
69                 The dialog shows which font(s) is/are missing and have a checkbox,
70                 that represents the state of the flag surpressed. This dialog is
71                 the only way to set the flag surpressed to TRUE. This method is
72                 not affected by the value of the flag surpressed.
73                 @see resetSurpressed
74                 </P>
75                 */
76                boolean executeDialog();
77
78                /** Set flag surpressed to FALSE
79                 <P>
80                 The flag surpressed is stored in the registry. If surpressed is
81                 FALSE the methods check and checkWithDialog ignores the parameter
82                 bForce. if surpressed is TRUE check and checkWithDialog only
83                 perform any action if their parameter bForce is TRUE. otherwise
84                 they simply return TRUE.
85                 </P>
86                 */
87                void resetSurpressed();
88            };
89
90/*-------------- services -------------------------------------------
91 This service is the implementation of the interface XFonTest.
92 @version 1.0
93 @author Berndt Reinhold
94 */
95
96          service FonTestService
97          {
98              interface XFonTest;
99          };
100
101//-------------------------------------------------------------------
102
103        }; // fontest
104    }; // extensions
105}; // stardiv
106
107#endif
108