LibreOffice Module vcl (master)  1
windowstate.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_WINDOWSTATE_HXX
21 #define INCLUDED_VCL_WINDOWSTATE_HXX
22 
23 #include <vcl/dllapi.h>
24 #include <vcl/vclenum.hxx>
25 
27 {
28 private:
30  int mnX;
31  int mnY;
32  unsigned int mnWidth;
33  unsigned int mnHeight;
36  unsigned int mnMaximizedWidth;
37  unsigned int mnMaximizedHeight;
39 
40 public:
42  : mnValidMask(WindowStateMask::NONE)
43  , mnX(0)
44  , mnY(0)
45  , mnWidth(0)
46  , mnHeight(0)
47  , mnMaximizedX(0)
48  , mnMaximizedY(0)
49  , mnMaximizedWidth(0)
50  , mnMaximizedHeight(0)
51  , mnState(WindowStateState::NONE)
52  {
53  }
54 
55  void SetMask(WindowStateMask nValidMask) { mnValidMask = nValidMask; }
56  WindowStateMask GetMask() const { return mnValidMask; }
57 
58  void SetX(int nX) { mnX = nX; }
59  int GetX() const { return mnX; }
60  void SetY(int nY) { mnY = nY; }
61  int GetY() const { return mnY; }
62  void SetWidth(unsigned int nWidth) { mnWidth = nWidth; }
63  unsigned int GetWidth() const { return mnWidth; }
64  void SetHeight(unsigned int nHeight) { mnHeight = nHeight; }
65  unsigned int GetHeight() const { return mnHeight; }
66  void SetState(WindowStateState nState) { mnState = nState; }
67  WindowStateState GetState() const { return mnState; }
68  void SetMaximizedX(int nRX) { mnMaximizedX = nRX; }
69  int GetMaximizedX() const { return mnMaximizedX; }
70  void SetMaximizedY(int nRY) { mnMaximizedY = nRY; }
71  int GetMaximizedY() const { return mnMaximizedY; }
72  void SetMaximizedWidth(unsigned int nRWidth) { mnMaximizedWidth = nRWidth; }
73  unsigned int GetMaximizedWidth() const { return mnMaximizedWidth; }
74  void SetMaximizedHeight(unsigned int nRHeight) { mnMaximizedHeight = nRHeight; }
75  unsigned int GetMaximizedHeight() const { return mnMaximizedHeight; }
76 
77  OString ToStr() const;
78 };
79 
80 #endif // INCLUDED_VCL_WINDOWSTATE_HXX
81 
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned int GetMaximizedHeight() const
Definition: windowstate.hxx:75
WindowStateState mnState
Definition: windowstate.hxx:38
void SetState(WindowStateState nState)
Definition: windowstate.hxx:66
int GetY() const
Definition: windowstate.hxx:61
int GetX() const
Definition: windowstate.hxx:59
WindowStateState GetState() const
Definition: windowstate.hxx:67
unsigned int GetHeight() const
Definition: windowstate.hxx:65
void SetMaximizedWidth(unsigned int nRWidth)
Definition: windowstate.hxx:72
unsigned int GetMaximizedWidth() const
Definition: windowstate.hxx:73
NONE
void SetMaximizedHeight(unsigned int nRHeight)
Definition: windowstate.hxx:74
void SetMaximizedX(int nRX)
Definition: windowstate.hxx:68
unsigned int GetWidth() const
Definition: windowstate.hxx:63
WindowStateMask
Definition: vclenum.hxx:123
unsigned int mnWidth
Definition: windowstate.hxx:32
int GetMaximizedY() const
Definition: windowstate.hxx:71
int GetMaximizedX() const
Definition: windowstate.hxx:69
unsigned int mnHeight
Definition: windowstate.hxx:33
void SetX(int nX)
Definition: windowstate.hxx:58
unsigned int mnMaximizedWidth
Definition: windowstate.hxx:36
void SetMask(WindowStateMask nValidMask)
Definition: windowstate.hxx:55
#define VCL_PLUGIN_PUBLIC
Definition: dllapi.h:40
void SetWidth(unsigned int nWidth)
Definition: windowstate.hxx:62
void SetY(int nY)
Definition: windowstate.hxx:60
void SetMaximizedY(int nRY)
Definition: windowstate.hxx:70
unsigned int mnMaximizedHeight
Definition: windowstate.hxx:37
WindowStateMask GetMask() const
Definition: windowstate.hxx:56
void SetHeight(unsigned int nHeight)
Definition: windowstate.hxx:64
WindowStateState
Definition: vclenum.hxx:301
WindowStateMask mnValidMask
Definition: windowstate.hxx:29