xref: /aoo4110/main/vcl/inc/vcl/graph.h (revision b1cdbd2c)
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 _SV_GRAPH_H
25 #define _SV_GRAPH_H
26 
27 #include <vcl/dllapi.h>
28 #include <tools/string.hxx>
29 #include <vcl/sv.h>
30 
31 // ---------------
32 // - GraphicType -
33 // ---------------
34 
35 enum GraphicType
36 {
37     GRAPHIC_NONE,
38     GRAPHIC_BITMAP,
39     GRAPHIC_GDIMETAFILE,
40     GRAPHIC_DEFAULT
41 };
42 
43 // -----------------
44 // - GraphicReader -
45 // -----------------
46 
47 class ReaderData;
48 
49 class VCL_DLLPUBLIC GraphicReader
50 {
51 protected:
52 
53     String          maUpperName;
54     ReaderData*     mpReaderData;
55     sal_Bool            mbIsReading;
56 
GraphicReader()57                     GraphicReader() :
58                         mpReaderData( NULL ),
59                         mbIsReading( sal_False ) {}
60 
61 public:
62 
63     virtual         ~GraphicReader();
64 
GetUpperFilterName() const65     const String&   GetUpperFilterName() const { return maUpperName; }
GetReaderData() const66     ReaderData*     GetReaderData() const { return mpReaderData; }
IsReading() const67     sal_Bool            IsReading() const { return mbIsReading; }
68 
69     // TODO: when incompatible changes are possible again
70     // the preview size hint should be redone
71     sal_Bool            IsPreviewModeEnabled() const;
72     void            DisablePreviewMode();
73     void            SetPreviewSize( const Size& );
74     Size            GetPreviewSize() const;
75 };
76 
77 #endif // _SV_GRAPH_H
78