xref: /trunk/main/fpicker/source/win32/filepicker/previewbase.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 _PREVIEWBASE_HXX_
25 #define _PREVIEWBASE_HXX_
26 
27 #include <sal/types.h>
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <com/sun/star/uno/RuntimeException.hpp>
30 #include <com/sun/star/lang/IllegalArgumentException.hpp>
31 #include <com/sun/star/uno/Any.hxx>
32 
33 #if defined _MSC_VER
34 #pragma warning(push, 1)
35 #endif
36 #include <windows.h>
37 #if defined _MSC_VER
38 #pragma warning(pop)
39 #endif
40 
41 //---------------------------------------------
42 // Common interface for previews
43 //---------------------------------------------
44 
45 class PreviewBase
46 {
47 public:
48     PreviewBase();
49 
50     // dtor
51     virtual ~PreviewBase();
52 
53     virtual sal_Int32 SAL_CALL getTargetColorDepth();
54 
55     virtual sal_Int32 SAL_CALL getAvailableWidth();
56 
57     virtual sal_Int32 SAL_CALL getAvailableHeight();
58 
59     virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage );
60 
61     virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState );
62 
63     virtual sal_Bool SAL_CALL getShowState();
64 
65     virtual void SAL_CALL getImage(sal_Int16& aImageFormat,com::sun::star::uno::Any& aImage);
66 
67     sal_Bool SAL_CALL getImaginaryShowState() const;
68 
69     virtual HWND SAL_CALL getWindowHandle() const;
70 
71 protected:
72     ::com::sun::star::uno::Any m_ImageData;
73     sal_Int16                  m_ImageFormat;
74     sal_Bool                   m_bShowState;
75 };
76 
77 
78 #endif
79