summaryrefslogtreecommitdiff
path: root/vcl/inc/win/salframe.h
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-06-02 22:42:20 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-06-08 18:17:17 +0200
commitea5a0918c8c32309821ab239c4b95f4d6a3b5c12 (patch)
tree04ff84b7c076a2f178e90d0eb32eb1731b10fd3c /vcl/inc/win/salframe.h
parentd4123356c61db269651e950a0a2cc93e6d801c90 (diff)
VCL add vcl::WindowPosSize abstract class
... and use it to remove a duplicate and simplify code. Should mostly be a refactoring, which was mainly done by some larger sed calls, except for the new API calls, which helped shrinking some LOC. All data is also now private. Originally two of the "replaced" "classes" had unsigned width and height and one had signed. Noel pointed out, that during calculations, the value might get negative temporarly, so this now settles with signed values. Still the set size should never be negative and this is enforced this way. Not sure that is what Noel had in mind. This also includes: - rename WindowState => WindowData - rename WindowStateMask => WindowDataMask - rename WindowStateState => WindowState - move WindowState and WindowDataMask to vcl/windowstate.hxx - move WindowData(Mask) and WindowState into vcl namespace - readability: replace or'ed WindowState enums with "meta" enums + add "meta" WindowState enums PosSize and PosSizeState Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/win/salframe.h')
-rw-r--r--vcl/inc/win/salframe.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index e3d8b685a229..c37fb5b98915 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -25,12 +25,12 @@
#include <string_view>
#include <vcl/sysdata.hxx>
+#include <vcl/windowstate.hxx>
#include <salframe.hxx>
#include <svsys.h>
class WinSalGraphics;
-
class WinSalFrame final: public SalFrame
{
public:
@@ -43,7 +43,7 @@ public:
HMENU mSelectedhMenu; // the menu where highlighting is currently going on
HMENU mLastActivatedhMenu; // the menu that was most recently opened
SystemEnvData maSysData; // system data
- SalFrameState maState = {}; // frame state
+ vcl::WindowData maState; ///< frame state
int mnShowState; // show state
LONG mnWidth; // client width in pixeln
LONG mnHeight; // client height in pixeln
@@ -112,8 +112,8 @@ public:
virtual void GetClientSize( tools::Long& rWidth, tools::Long& rHeight ) override;
virtual void GetWorkArea( tools::Rectangle& rRect ) override;
virtual SalFrame* GetParent() const override;
- virtual void SetWindowState( const SalFrameState* pState ) override;
- virtual bool GetWindowState( SalFrameState* pState ) override;
+ virtual void SetWindowState(const vcl::WindowData*) override;
+ virtual bool GetWindowState(vcl::WindowData*) override;
virtual void ShowFullScreen( bool bFullScreen, sal_Int32 nDisplay ) override;
virtual void StartPresentation( bool bStart ) override;
virtual void SetAlwaysOnTop( bool bOnTop ) override;