LibreOffice Module vcl (master)  1
impldockingwrapper.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 #pragma once
21 
22 #include <vcl/dockwin.hxx>
23 #include <memory>
24 #include <vector>
25 
34 {
35  friend class ::vcl::Window;
36  friend class DockingManager;
37  friend class DockingWindow;
38 
39 private:
40 
41  // the original 'Docking'window
43 
44  // the original DockingWindow members
59  sal_Int32 mnDockLeft;
60  sal_Int32 mnDockTop;
61  sal_Int32 mnDockRight;
62  sal_Int32 mnDockBottom;
65  mbDocking:1,
67  mbDockBtn:1,
68  mbHideBtn:1,
70  mbLocked:1;
71 
72  DECL_LINK( PopupModeEnd, FloatingWindow*, void );
75  void ImplPreparePopupMode();
76 
77 public:
78  ImplDockingWindowWrapper( const vcl::Window *pWindow );
80 
82  void ImplStartDocking( const Point& rPos );
83 
84  // those methods actually call the corresponding handlers
85  void StartDocking( const Point& rPos, tools::Rectangle const & rRect );
86  bool Docking( const Point& rPos, tools::Rectangle& rRect );
87  void EndDocking( const tools::Rectangle& rRect, bool bFloatMode );
89  void ToggleFloatingMode();
90 
91  void SetDragArea( const tools::Rectangle& rRect );
92  const tools::Rectangle& GetDragArea() const { return maDragArea;}
93 
94  void Lock();
95  void Unlock();
96  bool IsLocked() const { return mbLocked;}
97 
98  void StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags );
99  void StartPopupMode( ToolBox* pParentToolBox, FloatWinPopupFlags nPopupModeFlags );
100  bool IsInPopupMode() const;
101 
102  void SetPopupModeEndHdl( const Link<FloatingWindow*,void>& rLink ) { maPopupModeEndHdl = rLink; }
103 
104  void TitleButtonClick( TitleButton nButton );
105  void Resizing( Size& rSize );
106  void Tracking( const TrackingEvent& rTEvt );
107 
108  void ShowMenuTitleButton( bool bVisible );
109 
110  void SetMinOutputSizePixel( const Size& rSize );
111 
112  void SetMaxOutputSizePixel( const Size& rSize );
113 
114  bool IsDocking() const { return mbDocking; }
115  bool IsDockingCanceled() const { return mbDockCanceled; }
116 
117  void SetFloatingMode( bool bFloatMode );
118  bool IsFloatingMode() const;
120 
121  void SetFloatStyle( WinBits nWinStyle );
122  WinBits GetFloatStyle() const { return mnFloatBits;}
123 
125  tools::Long nWidth, tools::Long nHeight,
126  PosSizeFlags nFlags );
127  Point GetPosPixel() const;
128  Size GetSizePixel() const;
129 };
130 
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< vcl::Window > mpOldBorderWin
void SetPopupModeEndHdl(const Link< FloatingWindow *, void > &rLink)
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:836
bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockmgr.cxx:657
VclPtr< vcl::Window > mpDockingWindow
long Long
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:511
Point GetPosPixel() const
Definition: dockmgr.cxx:1010
PosSizeFlags
Definition: window.hxx:125
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1028
FloatWinPopupFlags
Definition: vclenum.hxx:367
Size GetSizePixel() const
Definition: dockmgr.cxx:1018
bool IsFloatingMode() const
Definition: dockmgr.cxx:1042
void Tracking(const TrackingEvent &rTEvt)
Definition: dockmgr.cxx:562
sal_Int64 WinBits
ImplDockingWindowWrapper(const vcl::Window *pWindow)
Definition: dockmgr.cxx:472
VclPtr< vcl::Window > mpParent
void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockmgr.cxx:666
SystemWindow * GetFloatingWindow() const
Definition: dockmgr.cxx:1071
void SetDragArea(const tools::Rectangle &rRect)
Definition: dockmgr.cxx:1047
ImplDockingWindowWrapper.
void TitleButtonClick(TitleButton nButton)
Definition: dockmgr.cxx:733
VclPtr< FloatingWindow > mpFloatWin
DECL_LINK(PopupModeEnd, FloatingWindow *, void)
bool IsInPopupMode() const
Definition: dockmgr.cxx:879
Link< FloatingWindow *, void > maPopupModeEndHdl
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:887
bool PrepareToggleFloatingMode()
Definition: dockmgr.cxx:711
void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:1000
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1035
void ShowMenuTitleButton(bool bVisible)
Definition: dockmgr.cxx:757
void StartDocking(const Point &rPos, tools::Rectangle const &rRect)
Definition: dockmgr.cxx:649
const tools::Rectangle & GetDragArea() const
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:994
void Resizing(Size &rSize)
Definition: dockmgr.cxx:749
TitleButton
Definition: syswin.hxx:54