fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / vcl / mapmod.hxx
blobe6f30cf5089e518785f4f8142e93c2d37a533bd7
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 .
20 #ifndef _SV_MAPMOD_HXX
21 #define _SV_MAPMOD_HXX
23 #include <tools/gen.hxx>
24 #include <tools/fract.hxx>
25 #include <tools/solar.h>
26 #include <vcl/dllapi.h>
27 #include <tools/resid.hxx>
28 #include <tools/mapunit.hxx>
30 class SvStream;
32 // --------------
33 // - ImplMapMode -
34 // --------------
36 class OutputDevice;
38 class ImplMapMode
40 friend class MapMode;
41 friend class OutputDevice;
43 private:
44 sal_uLong mnRefCount;
45 MapUnit meUnit;
46 Point maOrigin;
47 Fraction maScaleX;
48 Fraction maScaleY;
49 sal_Bool mbSimple;
51 friend SvStream& operator>>( SvStream& rIStm, ImplMapMode& rMapMode );
52 friend SvStream& operator<<( SvStream& rOStm, const ImplMapMode& rMapMode );
54 static ImplMapMode* ImplGetStaticMapMode( MapUnit eUnit );
55 public:
56 ImplMapMode();
57 ImplMapMode( const ImplMapMode& rImpMapMode );
60 // -----------
61 // - MapMode -
62 // -----------
64 class VCL_DLLPUBLIC MapMode
66 friend class OutputDevice;
68 private:
69 ImplMapMode* mpImplMapMode;
71 SAL_DLLPRIVATE void ImplMakeUnique();
73 public:
74 MapMode();
75 MapMode( const MapMode& rMapMode );
76 MapMode( MapUnit eUnit );
77 MapMode( MapUnit eUnit, const Point& rLogicOrg,
78 const Fraction& rScaleX, const Fraction& rScaleY );
79 ~MapMode();
81 void SetMapUnit( MapUnit eUnit );
82 MapUnit GetMapUnit() const
83 { return mpImplMapMode->meUnit; }
85 void SetOrigin( const Point& rOrigin );
86 const Point& GetOrigin() const
87 { return mpImplMapMode->maOrigin; }
89 void SetScaleX( const Fraction& rScaleX );
90 const Fraction& GetScaleX() const
91 { return mpImplMapMode->maScaleX; }
92 void SetScaleY( const Fraction& rScaleY );
93 const Fraction& GetScaleY() const
94 { return mpImplMapMode->maScaleY; }
96 MapMode& operator=( const MapMode& rMapMode );
97 sal_Bool operator==( const MapMode& rMapMode ) const;
98 sal_Bool operator!=( const MapMode& rMapMode ) const
99 { return !(MapMode::operator==( rMapMode )); }
100 sal_Bool IsDefault() const;
101 sal_Bool IsSameInstance( const MapMode& rMapMode ) const
102 { return (mpImplMapMode == rMapMode.mpImplMapMode); }
104 friend VCL_DLLPUBLIC SvStream& operator>>( SvStream& rIStm, MapMode& rMapMode );
105 friend VCL_DLLPUBLIC SvStream& operator<<( SvStream& rOStm, const MapMode& rMapMode );
108 #endif // _SV_MAPMOD_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */