LibreOffice Module vcl (master)  1
salgeom.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_SALGEOM_HXX
21 #define INCLUDED_VCL_INC_SALGEOM_HXX
22 
23 #include <iostream>
24 
25 #include <vcl/dllapi.h>
26 #include <tools/long.hxx>
27 
29  // screen position of upper left corner of drawable area in pixel
31  // dimensions of the drawable area in pixel
32  unsigned long nWidth, nHeight;
33  // thickness of the decoration in pixel
34  unsigned long nLeftDecoration,
38  unsigned int nDisplayScreenNumber;
39 
41  nX( 0 ),
42  nY( 0 ),
43  nWidth( 1 ),
44  nHeight( 1 ),
45  nLeftDecoration( 0 ),
46  nTopDecoration( 0 ),
47  nRightDecoration( 0 ),
48  nBottomDecoration( 0 ),
49  nDisplayScreenNumber( 0 )
50  {}
51 };
52 
53 inline std::ostream &operator <<(std::ostream& s, const SalFrameGeometry& rGeom)
54 {
55  s << rGeom.nWidth << "x" << rGeom.nHeight << "@(" << rGeom.nX << "," << rGeom.nY << "):{"
56  << rGeom.nLeftDecoration << "," << rGeom.nTopDecoration << "," << rGeom.nRightDecoration << "," << rGeom.nBottomDecoration << "}";
57 
58  return s;
59 }
60 
64 public:
65  virtual ~SalGeometryProvider() {}
66  virtual tools::Long GetWidth() const = 0;
67  virtual tools::Long GetHeight() const = 0;
68  virtual bool IsOffScreen() const = 0;
69 };
70 
71 #endif // INCLUDED_VCL_INC_SALGEOM_HXX
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface used to share logic on sizing between SalVirtualDevices and SalFrames.
Definition: salgeom.hxx:63
unsigned long nWidth
Definition: salgeom.hxx:32
unsigned long nLeftDecoration
Definition: salgeom.hxx:34
long Long
unsigned long nRightDecoration
Definition: salgeom.hxx:34
unsigned long nBottomDecoration
Definition: salgeom.hxx:34
tools::Long nY
Definition: salgeom.hxx:30
std::ostream & operator<<(std::ostream &s, const SalFrameGeometry &rGeom)
Definition: salgeom.hxx:53
unsigned long nTopDecoration
Definition: salgeom.hxx:34
tools::Long nX
Definition: salgeom.hxx:30
virtual ~SalGeometryProvider()
Definition: salgeom.hxx:65
#define VCL_PLUGIN_PUBLIC
Definition: dllapi.h:40
unsigned long nHeight
Definition: salgeom.hxx:32
unsigned int nDisplayScreenNumber
Definition: salgeom.hxx:38