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