tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / offapi / com / sun / star / ui / dialogs / XFilePreview.idl
blobf648040f058acebef1561238ca49e9bcae499b8a
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 .
21 module com { module sun { module star { module ui { module dialogs {
23 /** FilePicker that support the preview of various file formats should implement
24 this interface.
27 published interface XFilePreview: com::sun::star::uno::XInterface
29 /** The method returns all image formats that the preview supports.
31 @returns
32 A sequence of all supported preview formats
34 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
36 sequence< short > getSupportedImageFormats( );
38 /** The method returns the supported color depth of the target device.
40 @deprecated - typically now just returns 0
42 @returns
43 The color depth in bit, e.g. 8 bit, 16 bit, 32 bit.
45 com::sun::star::util::Color getTargetColorDepth( );
47 /** The method returns the available width of the preview window
48 even if the window is invisible or could not be created.
49 If a service implementation doesn't support a file preview
50 0 will be returned.
52 @returns
53 The width of the preview window in pixel.
55 long getAvailableWidth( );
57 /** The method returns the available height of the preview window
58 even if the window is invisible or could not be created.
59 If a service implementation doesn't support a file preview
60 0 will be returned.
62 @returns
63 The height of the preview window in pixel.
65 long getAvailableHeight( );
67 /** Sets a new image. If the preview is currently hidden the
68 image will be ignored. An empty any will clear the preview window.
70 @param aImageFormat
71 Specifies the format of the data that will be delivered
73 @param aImage
74 The image data, the image format defines how
75 the image data have to be delivered
77 @throws com::sun::star::lang::IllegalArgumentException
78 If the specified image format is invalid or not
79 supported by the preview implementation
81 @see com::sun::star::ui::dialogs::FilePreviewImageFormats
83 void setImage( [in] short aImageFormat, [in] any aImage )
84 raises( ::com::sun::star::lang::IllegalArgumentException );
86 /** Optionally sets the current show state of the preview. It is possible
87 that the preview implementation doesn't support hiding the preview.
89 @param bShowState
90 A value of `TRUE` shows the preview window.
91 <p>A value of `FALSE` hides the preview window.</p>
93 @returns
94 A value of `TRUE` on success.
95 <p>A value of `FALSE` if the operation fails for any reason or the preview
96 implementation doesn't support hiding the preview.</p>
98 boolean setShowState( [in] boolean bShowState );
100 /** Returns the current show state of the preview.
102 @returns
103 A value of `TRUE` if the preview window is visible.
104 <p>A value of `FALSE` if the preview window is invisible.</p>
106 boolean getShowState( );
110 }; }; }; }; };
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */