xref: /aoo42x/main/vcl/inc/vcl/dockwin.hxx (revision 0d63794c)
1*0d63794cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*0d63794cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*0d63794cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*0d63794cSAndrew Rist  * distributed with this work for additional information
6*0d63794cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*0d63794cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*0d63794cSAndrew Rist  * "License"); you may not use this file except in compliance
9*0d63794cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*0d63794cSAndrew Rist  *
11*0d63794cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*0d63794cSAndrew Rist  *
13*0d63794cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*0d63794cSAndrew Rist  * software distributed under the License is distributed on an
15*0d63794cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0d63794cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*0d63794cSAndrew Rist  * specific language governing permissions and limitations
18*0d63794cSAndrew Rist  * under the License.
19*0d63794cSAndrew Rist  *
20*0d63794cSAndrew Rist  *************************************************************/
21*0d63794cSAndrew Rist 
22*0d63794cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_DOCKWIN_HXX
25cdf0e10cSrcweir #define _SV_DOCKWIN_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <vcl/sv.h>
28cdf0e10cSrcweir #include <vcl/dllapi.h>
29cdf0e10cSrcweir #include <vcl/floatwin.hxx>
30cdf0e10cSrcweir #include <vector>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir // data to be sent with docking events
33cdf0e10cSrcweir struct DockingData
34cdf0e10cSrcweir {
35cdf0e10cSrcweir     Point       maMousePos;     // in
36cdf0e10cSrcweir     Rectangle   maTrackRect;    // in/out
37cdf0e10cSrcweir     sal_Bool        mbFloating;     // out
38cdf0e10cSrcweir     sal_Bool        mbLivemode;     // in
39cdf0e10cSrcweir     sal_Bool        mbInteractive;  // in
40cdf0e10cSrcweir 
DockingDataDockingData41cdf0e10cSrcweir     DockingData() {};
DockingDataDockingData42cdf0e10cSrcweir     DockingData( const Point& rPt, const Rectangle& rRect, sal_Bool b) :
43cdf0e10cSrcweir         maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ), mbLivemode( sal_False ), mbInteractive( sal_True )
44cdf0e10cSrcweir         {};
45cdf0e10cSrcweir };
46cdf0e10cSrcweir 
47cdf0e10cSrcweir struct EndDockingData
48cdf0e10cSrcweir {
49cdf0e10cSrcweir     Rectangle   maWindowRect;    // in
50cdf0e10cSrcweir     sal_Bool        mbFloating;      // in
51cdf0e10cSrcweir     sal_Bool        mbCancelled;     // in
52cdf0e10cSrcweir 
EndDockingDataEndDockingData53cdf0e10cSrcweir     EndDockingData() {};
EndDockingDataEndDockingData54cdf0e10cSrcweir     EndDockingData( const Rectangle& rRect, sal_Bool b, sal_Bool bCancelled ) :
55cdf0e10cSrcweir         maWindowRect( rRect ), mbFloating( b ), mbCancelled( bCancelled )
56cdf0e10cSrcweir         {};
57cdf0e10cSrcweir };
58cdf0e10cSrcweir 
59cdf0e10cSrcweir struct EndPopupModeData
60cdf0e10cSrcweir {
61cdf0e10cSrcweir     Point       maFloatingPos;    // in
62cdf0e10cSrcweir     sal_Bool        mbTearoff;        // in
63cdf0e10cSrcweir 
EndPopupModeDataEndPopupModeData64cdf0e10cSrcweir     EndPopupModeData() {};
EndPopupModeDataEndPopupModeData65cdf0e10cSrcweir     EndPopupModeData( const Point& rPos, sal_Bool bTearoff ) :
66cdf0e10cSrcweir         maFloatingPos( rPos ), mbTearoff( bTearoff )
67cdf0e10cSrcweir         {};
68cdf0e10cSrcweir };
69cdf0e10cSrcweir 
70cdf0e10cSrcweir /** ImplDockingWindowWrapper
71cdf0e10cSrcweir  *
72cdf0e10cSrcweir  *  ImplDockingWindowWrapper obsoletes the DockingWindow class.
73cdf0e10cSrcweir  *  It is better because it can make a "normal window" dockable.
74cdf0e10cSrcweir  *  All DockingWindows should be converted the new class.
75cdf0e10cSrcweir  */
76cdf0e10cSrcweir 
77cdf0e10cSrcweir class ImplDockingWindowWrapper
78cdf0e10cSrcweir {
79cdf0e10cSrcweir     friend class Window;
80cdf0e10cSrcweir     friend class DockingManager;
81cdf0e10cSrcweir     friend class DockingWindow;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir private:
84cdf0e10cSrcweir 
85cdf0e10cSrcweir     // the original 'Docking'window
86cdf0e10cSrcweir     Window *mpDockingWindow;
87cdf0e10cSrcweir 
88cdf0e10cSrcweir     // the original DockingWindow members
89cdf0e10cSrcweir 	FloatingWindow* mpFloatWin;
90cdf0e10cSrcweir 	Window* 		mpOldBorderWin;
91cdf0e10cSrcweir 	Window* 		mpParent;
92cdf0e10cSrcweir 	Point			maFloatPos;
93cdf0e10cSrcweir 	Point			maDockPos;
94cdf0e10cSrcweir 	Point			maMouseOff;
95cdf0e10cSrcweir 	Point			maMouseStart;
96cdf0e10cSrcweir 	Size			maRollUpOutSize;
97cdf0e10cSrcweir 	Size			maMinOutSize;
98cdf0e10cSrcweir 	Size			maMaxOutSize;
99cdf0e10cSrcweir     Rectangle       maDragArea;
100cdf0e10cSrcweir 	long			mnTrackX;
101cdf0e10cSrcweir 	long			mnTrackY;
102cdf0e10cSrcweir 	long			mnTrackWidth;
103cdf0e10cSrcweir 	long			mnTrackHeight;
104cdf0e10cSrcweir 	sal_Int32		mnDockLeft;
105cdf0e10cSrcweir 	sal_Int32		mnDockTop;
106cdf0e10cSrcweir 	sal_Int32		mnDockRight;
107cdf0e10cSrcweir 	sal_Int32		mnDockBottom;
108cdf0e10cSrcweir 	WinBits 		mnFloatBits;
109cdf0e10cSrcweir 	sal_Bool			mbDockCanceled:1,
110cdf0e10cSrcweir 					mbFloatPrevented:1,
111cdf0e10cSrcweir 					mbDockable:1,
112cdf0e10cSrcweir 					mbDocking:1,
113cdf0e10cSrcweir 					mbDragFull:1,
114cdf0e10cSrcweir 					mbLastFloatMode:1,
115cdf0e10cSrcweir 					mbStartFloat:1,
116cdf0e10cSrcweir 					mbTrackDock:1,
117cdf0e10cSrcweir 					mbPined:1,
118cdf0e10cSrcweir 					mbRollUp:1,
119cdf0e10cSrcweir 					mbDockBtn:1,
120cdf0e10cSrcweir 					mbHideBtn:1,
121cdf0e10cSrcweir                     mbStartDockingEnabled:1,
122cdf0e10cSrcweir                     mbLocked:1;
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	void			ImplInitData();
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 					DECL_LINK( PopupModeEnd, void* );
ImplEnableStartDocking(sal_Bool bEnable=sal_True)127cdf0e10cSrcweir     void            ImplEnableStartDocking( sal_Bool bEnable = sal_True )  { mbStartDockingEnabled = bEnable; }
ImplStartDockingEnabled()128cdf0e10cSrcweir     sal_Bool            ImplStartDockingEnabled()               { return mbStartDockingEnabled; }
129cdf0e10cSrcweir 
130cdf0e10cSrcweir public:
131cdf0e10cSrcweir     ImplDockingWindowWrapper( const Window *pWindow );
132cdf0e10cSrcweir     virtual ~ImplDockingWindowWrapper();
133cdf0e10cSrcweir 
GetWindow()134cdf0e10cSrcweir     Window*         GetWindow()     { return mpDockingWindow; }
135cdf0e10cSrcweir 	sal_Bool            ImplStartDocking( const Point& rPos );
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     // those methods actually call the corresponding handlers
138cdf0e10cSrcweir 	void	        StartDocking( const Point& rPos, Rectangle& rRect );
139cdf0e10cSrcweir 	sal_Bool	        Docking( const Point& rPos, Rectangle& rRect );
140cdf0e10cSrcweir 	void	        EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
141cdf0e10cSrcweir 	sal_Bool	        PrepareToggleFloatingMode();
142cdf0e10cSrcweir 	void	        ToggleFloatingMode();
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     void            SetDragArea( const Rectangle& rRect );
145cdf0e10cSrcweir     Rectangle       GetDragArea() const;
146cdf0e10cSrcweir 
147cdf0e10cSrcweir     void            Lock();
148cdf0e10cSrcweir     void            Unlock();
149cdf0e10cSrcweir     sal_Bool            IsLocked() const;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     void            StartPopupMode( ToolBox* pParentToolBox, sal_uLong nPopupModeFlags );
152cdf0e10cSrcweir     sal_Bool            IsInPopupMode() const;
153cdf0e10cSrcweir 
154cdf0e10cSrcweir 	void	        TitleButtonClick( sal_uInt16 nButton );
155cdf0e10cSrcweir 	void	        Pin();
156cdf0e10cSrcweir 	void	        Roll();
157cdf0e10cSrcweir 	void	        PopupModeEnd();
158cdf0e10cSrcweir 	void	        Resizing( Size& rSize );
159cdf0e10cSrcweir 	sal_Bool	        Close();
160cdf0e10cSrcweir 	void	        Tracking( const TrackingEvent& rTEvt );
161cdf0e10cSrcweir 	long	        Notify( NotifyEvent& rNEvt );
162cdf0e10cSrcweir 
163cdf0e10cSrcweir 	void			ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
164cdf0e10cSrcweir 	sal_Bool			IsTitleButtonVisible( sal_uInt16 nButton ) const;
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 	void			SetPin( sal_Bool bPin );
167cdf0e10cSrcweir 	sal_Bool			IsPined() const;
168cdf0e10cSrcweir 
169cdf0e10cSrcweir 	void			RollUp();
170cdf0e10cSrcweir 	void			RollDown();
171cdf0e10cSrcweir 	sal_Bool			IsRollUp() const;
172cdf0e10cSrcweir 
173cdf0e10cSrcweir 	void			SetRollUpOutputSizePixel( const Size& rSize );
174cdf0e10cSrcweir 	Size			GetRollUpOutputSizePixel() const;
175cdf0e10cSrcweir 
176cdf0e10cSrcweir 	void			SetMinOutputSizePixel( const Size& rSize );
177cdf0e10cSrcweir 	const Size& 	GetMinOutputSizePixel() const;
178cdf0e10cSrcweir 
179cdf0e10cSrcweir 	void			SetMaxOutputSizePixel( const Size& rSize );
180cdf0e10cSrcweir 	const Size& 	GetMaxOutputSizePixel() const;
181cdf0e10cSrcweir 
IsDocking() const182cdf0e10cSrcweir     sal_Bool			IsDocking() const { return mbDocking; }
IsDockable() const183cdf0e10cSrcweir     sal_Bool			IsDockable() const { return mbDockable; }
IsDockingCanceled() const184cdf0e10cSrcweir 	sal_Bool			IsDockingCanceled() const { return mbDockCanceled; }
IsFloatingPrevented() const185cdf0e10cSrcweir 	sal_Bool			IsFloatingPrevented() const { return mbFloatPrevented; }
186cdf0e10cSrcweir 
187cdf0e10cSrcweir 	void			SetFloatingMode( sal_Bool bFloatMode = sal_False );
188cdf0e10cSrcweir 	sal_Bool			IsFloatingMode() const;
GetFloatingWindow() const189cdf0e10cSrcweir 	FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
190cdf0e10cSrcweir 
191cdf0e10cSrcweir 	void			SetFloatingPos( const Point& rNewPos );
192cdf0e10cSrcweir 	Point			GetFloatingPos() const;
193cdf0e10cSrcweir 
194cdf0e10cSrcweir 	void			SetFloatStyle( WinBits nWinStyle );
195cdf0e10cSrcweir 	WinBits 		GetFloatStyle() const;
196cdf0e10cSrcweir 	void			SetTabStop();
197cdf0e10cSrcweir 
198cdf0e10cSrcweir 	virtual void	SetPosSizePixel( long nX, long nY,
199cdf0e10cSrcweir 									 long nWidth, long nHeight,
200cdf0e10cSrcweir 									 sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
SetPosSizePixel(const Point & rNewPos,const Size & rNewSize)201cdf0e10cSrcweir 	void			SetPosSizePixel( const Point& rNewPos,
202cdf0e10cSrcweir 									 const Size& rNewSize )
203cdf0e10cSrcweir 						{ mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); }
204cdf0e10cSrcweir 	Point			GetPosPixel() const;
205cdf0e10cSrcweir 	Size			GetSizePixel() const;
206cdf0e10cSrcweir 	void			SetOutputSizePixel( const Size& rNewSize );
207cdf0e10cSrcweir 	Size			GetOutputSizePixel() const;
208cdf0e10cSrcweir };
209cdf0e10cSrcweir 
210cdf0e10cSrcweir class VCL_DLLPUBLIC DockingManager
211cdf0e10cSrcweir {
212cdf0e10cSrcweir protected:
213cdf0e10cSrcweir 	::std::vector<ImplDockingWindowWrapper *> mDockingWindows;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir public:
216cdf0e10cSrcweir     DockingManager();
217cdf0e10cSrcweir     ~DockingManager();
218cdf0e10cSrcweir 
219cdf0e10cSrcweir     void AddWindow( const Window *pWin );
220cdf0e10cSrcweir     void RemoveWindow( const Window *pWin );
221cdf0e10cSrcweir 
222cdf0e10cSrcweir     ImplDockingWindowWrapper*  GetDockingWindowWrapper( const Window *pWin );
223cdf0e10cSrcweir     sal_Bool IsDockable( const Window *pWin );
224cdf0e10cSrcweir 
225cdf0e10cSrcweir     sal_Bool IsFloating( const Window *pWin );
226cdf0e10cSrcweir     void SetFloatingMode( const Window *pWin, sal_Bool bFloating );
227cdf0e10cSrcweir 
228cdf0e10cSrcweir     void Lock( const Window *pWin );
229cdf0e10cSrcweir     void Unlock( const Window *pWin );
230cdf0e10cSrcweir     sal_Bool IsLocked( const Window *pWin );
231cdf0e10cSrcweir 
232cdf0e10cSrcweir     void    StartPopupMode( ToolBox *pParentToolBox, const Window *pWin );
233cdf0e10cSrcweir     void    StartPopupMode( ToolBox *pParentToolBox, const Window *pWin, sal_uLong nPopupModeFlags );
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	sal_Bool    IsInPopupMode( const Window *pWin );
236cdf0e10cSrcweir 	void	EndPopupMode( const Window *pWin );
237cdf0e10cSrcweir 
238cdf0e10cSrcweir     // required because those methods are not virtual in Window (!!!) and must
239cdf0e10cSrcweir     // be availbale from the toolkit
240cdf0e10cSrcweir 	void	    SetPosSizePixel( Window *pWin, long nX, long nY,
241cdf0e10cSrcweir 	                            long nWidth, long nHeight,
242cdf0e10cSrcweir 							    sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
243cdf0e10cSrcweir 	Rectangle   GetPosSizePixel( const Window *pWin );
244cdf0e10cSrcweir };
245cdf0e10cSrcweir 
246cdf0e10cSrcweir // -----------------
247cdf0e10cSrcweir // - DockingWindow -
248cdf0e10cSrcweir // -----------------
249cdf0e10cSrcweir 
250cdf0e10cSrcweir class VCL_DLLPUBLIC DockingWindow : public Window
251cdf0e10cSrcweir {
252cdf0e10cSrcweir     class   ImplData;
253cdf0e10cSrcweir private:
254cdf0e10cSrcweir 	FloatingWindow* mpFloatWin;
255cdf0e10cSrcweir 	Window* 		mpOldBorderWin;
256cdf0e10cSrcweir     ImplData*       mpImplData;
257cdf0e10cSrcweir 	Point			maFloatPos;
258cdf0e10cSrcweir 	Point			maDockPos;
259cdf0e10cSrcweir 	Point			maMouseOff;
260cdf0e10cSrcweir 	Point			maMouseStart;
261cdf0e10cSrcweir 	Size			maRollUpOutSize;
262cdf0e10cSrcweir 	Size			maMinOutSize;
263cdf0e10cSrcweir 	long			mnTrackX;
264cdf0e10cSrcweir 	long			mnTrackY;
265cdf0e10cSrcweir 	long			mnTrackWidth;
266cdf0e10cSrcweir 	long			mnTrackHeight;
267cdf0e10cSrcweir 	sal_Int32			mnDockLeft;
268cdf0e10cSrcweir 	sal_Int32			mnDockTop;
269cdf0e10cSrcweir 	sal_Int32			mnDockRight;
270cdf0e10cSrcweir 	sal_Int32			mnDockBottom;
271cdf0e10cSrcweir 	WinBits 		mnFloatBits;
272cdf0e10cSrcweir 	sal_Bool			mbDockCanceled:1,
273cdf0e10cSrcweir 					mbDockPrevented:1,
274cdf0e10cSrcweir 					mbFloatPrevented:1,
275cdf0e10cSrcweir 					mbDockable:1,
276cdf0e10cSrcweir 					mbDocking:1,
277cdf0e10cSrcweir 					mbDragFull:1,
278cdf0e10cSrcweir 					mbLastFloatMode:1,
279cdf0e10cSrcweir 					mbStartFloat:1,
280cdf0e10cSrcweir 					mbTrackDock:1,
281cdf0e10cSrcweir 					mbPined:1,
282cdf0e10cSrcweir 					mbRollUp:1,
283cdf0e10cSrcweir 					mbDockBtn:1,
284cdf0e10cSrcweir 					mbHideBtn:1;
285cdf0e10cSrcweir 
286cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE
287cdf0e10cSrcweir 	SAL_DLLPRIVATE void    ImplInitDockingWindowData();
288cdf0e10cSrcweir 
289cdf0e10cSrcweir     // Copy assignment is forbidden and not implemented.
290cdf0e10cSrcweir 	SAL_DLLPRIVATE         DockingWindow (const DockingWindow &);
291cdf0e10cSrcweir 	SAL_DLLPRIVATE         DockingWindow & operator= (const DockingWindow &);
292cdf0e10cSrcweir 
293cdf0e10cSrcweir protected:
294cdf0e10cSrcweir     using Window::ImplInit;
295cdf0e10cSrcweir 	SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
296cdf0e10cSrcweir 	SAL_DLLPRIVATE void    ImplInitSettings();
297cdf0e10cSrcweir 	SAL_DLLPRIVATE void    ImplLoadRes( const ResId& rResId );
298cdf0e10cSrcweir 
299cdf0e10cSrcweir public:
300cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool    ImplStartDocking( const Point& rPos );
301cdf0e10cSrcweir //#endif
302cdf0e10cSrcweir 
303cdf0e10cSrcweir protected:
304cdf0e10cSrcweir 					DockingWindow( WindowType nType );
305cdf0e10cSrcweir 
306cdf0e10cSrcweir public:
307cdf0e10cSrcweir 					DockingWindow( Window* pParent, WinBits nStyle = WB_STDDOCKWIN );
308cdf0e10cSrcweir 					DockingWindow( Window* pParent, const ResId& rResId );
309cdf0e10cSrcweir 					~DockingWindow();
310cdf0e10cSrcweir 
311cdf0e10cSrcweir 	virtual void	StartDocking();
312cdf0e10cSrcweir 	virtual sal_Bool	Docking( const Point& rPos, Rectangle& rRect );
313cdf0e10cSrcweir 	virtual void	EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
314cdf0e10cSrcweir 	virtual sal_Bool	PrepareToggleFloatingMode();
315cdf0e10cSrcweir 	virtual void	ToggleFloatingMode();
316cdf0e10cSrcweir 
317cdf0e10cSrcweir 	virtual void	TitleButtonClick( sal_uInt16 nButton );
318cdf0e10cSrcweir 	virtual void	Pin();
319cdf0e10cSrcweir 	virtual void	Roll();
320cdf0e10cSrcweir 	virtual void	PopupModeEnd();
321cdf0e10cSrcweir 	virtual void	Resizing( Size& rSize );
322cdf0e10cSrcweir 	virtual sal_Bool	Close();
323cdf0e10cSrcweir 	virtual void	Tracking( const TrackingEvent& rTEvt );
324cdf0e10cSrcweir 	virtual long	Notify( NotifyEvent& rNEvt );
325cdf0e10cSrcweir 	virtual void	StateChanged( StateChangedType nType );
326cdf0e10cSrcweir 	virtual void	DataChanged( const DataChangedEvent& rDCEvt );
327cdf0e10cSrcweir 
328cdf0e10cSrcweir 	void			ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True );
329cdf0e10cSrcweir 	sal_Bool			IsTitleButtonVisible( sal_uInt16 nButton ) const;
330cdf0e10cSrcweir 
331cdf0e10cSrcweir 	void			SetPin( sal_Bool bPin );
332cdf0e10cSrcweir 	sal_Bool			IsPined() const;
333cdf0e10cSrcweir 
334cdf0e10cSrcweir 	void			RollUp();
335cdf0e10cSrcweir 	void			RollDown();
336cdf0e10cSrcweir 	sal_Bool			IsRollUp() const;
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	void			SetRollUpOutputSizePixel( const Size& rSize );
339cdf0e10cSrcweir 	Size			GetRollUpOutputSizePixel() const;
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 	void			SetMinOutputSizePixel( const Size& rSize );
342cdf0e10cSrcweir 	const Size& 	GetMinOutputSizePixel() const;
343cdf0e10cSrcweir 
344cdf0e10cSrcweir 	void			SetMaxOutputSizePixel( const Size& rSize );
345cdf0e10cSrcweir 	const Size& 	GetMaxOutputSizePixel() const;
346cdf0e10cSrcweir 
IsDocking() const347cdf0e10cSrcweir     sal_Bool			IsDocking() const { return mbDocking; }
IsDockable() const348cdf0e10cSrcweir     sal_Bool			IsDockable() const { return mbDockable; }
IsDockingCanceled() const349cdf0e10cSrcweir 	sal_Bool			IsDockingCanceled() const { return mbDockCanceled; }
IsDockingPrevented() const350cdf0e10cSrcweir 	sal_Bool			IsDockingPrevented() const { return mbDockPrevented; }
IsFloatingPrevented() const351cdf0e10cSrcweir 	sal_Bool			IsFloatingPrevented() const { return mbFloatPrevented; }
352cdf0e10cSrcweir 
353cdf0e10cSrcweir 	void			SetFloatingMode( sal_Bool bFloatMode = sal_False );
354cdf0e10cSrcweir 	sal_Bool			IsFloatingMode() const;
GetFloatingWindow() const355cdf0e10cSrcweir 	FloatingWindow* GetFloatingWindow() const { return mpFloatWin; }
356cdf0e10cSrcweir 
357cdf0e10cSrcweir 	void			SetFloatingPos( const Point& rNewPos );
358cdf0e10cSrcweir 	Point			GetFloatingPos() const;
359cdf0e10cSrcweir 
360cdf0e10cSrcweir 	void			SetFloatStyle( WinBits nWinStyle );
361cdf0e10cSrcweir 	WinBits 		GetFloatStyle() const;
362cdf0e10cSrcweir 	void			SetTabStop();
363cdf0e10cSrcweir 
364cdf0e10cSrcweir 	virtual void	SetPosSizePixel( long nX, long nY,
365cdf0e10cSrcweir 									 long nWidth, long nHeight,
366cdf0e10cSrcweir 									 sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
SetPosSizePixel(const Point & rNewPos,const Size & rNewSize)367cdf0e10cSrcweir 	void			SetPosSizePixel( const Point& rNewPos,
368cdf0e10cSrcweir 									 const Size& rNewSize )
369cdf0e10cSrcweir 						{ Window::SetPosSizePixel( rNewPos, rNewSize ); }
370cdf0e10cSrcweir 	Point			GetPosPixel() const;
371cdf0e10cSrcweir 	Size			GetSizePixel() const;
372cdf0e10cSrcweir 	void			SetOutputSizePixel( const Size& rNewSize );
373cdf0e10cSrcweir 	Size			GetOutputSizePixel() const;
374cdf0e10cSrcweir };
375cdf0e10cSrcweir 
SetPin(sal_Bool bPin)376cdf0e10cSrcweir inline void DockingWindow::SetPin( sal_Bool bPin )
377cdf0e10cSrcweir {
378cdf0e10cSrcweir 	if ( mpFloatWin )
379cdf0e10cSrcweir 		mpFloatWin->SetPin( bPin );
380cdf0e10cSrcweir 	mbPined = bPin;
381cdf0e10cSrcweir }
382cdf0e10cSrcweir 
IsPined() const383cdf0e10cSrcweir inline sal_Bool DockingWindow::IsPined() const
384cdf0e10cSrcweir {
385cdf0e10cSrcweir 	if ( mpFloatWin )
386cdf0e10cSrcweir 		return mpFloatWin->IsPined();
387cdf0e10cSrcweir 	return mbPined;
388cdf0e10cSrcweir }
389cdf0e10cSrcweir 
RollUp()390cdf0e10cSrcweir inline void DockingWindow::RollUp()
391cdf0e10cSrcweir {
392cdf0e10cSrcweir 	if ( mpFloatWin )
393cdf0e10cSrcweir 		mpFloatWin->RollUp();
394cdf0e10cSrcweir 	mbRollUp = sal_True;
395cdf0e10cSrcweir }
396cdf0e10cSrcweir 
RollDown()397cdf0e10cSrcweir inline void DockingWindow::RollDown()
398cdf0e10cSrcweir {
399cdf0e10cSrcweir 	if ( mpFloatWin )
400cdf0e10cSrcweir 		mpFloatWin->RollDown();
401cdf0e10cSrcweir 	mbRollUp = sal_False;
402cdf0e10cSrcweir }
403cdf0e10cSrcweir 
IsRollUp() const404cdf0e10cSrcweir inline sal_Bool DockingWindow::IsRollUp() const
405cdf0e10cSrcweir {
406cdf0e10cSrcweir 	if ( mpFloatWin )
407cdf0e10cSrcweir 		return mpFloatWin->IsRollUp();
408cdf0e10cSrcweir 	return mbRollUp;
409cdf0e10cSrcweir }
410cdf0e10cSrcweir 
SetRollUpOutputSizePixel(const Size & rSize)411cdf0e10cSrcweir inline void DockingWindow::SetRollUpOutputSizePixel( const Size& rSize )
412cdf0e10cSrcweir {
413cdf0e10cSrcweir 	if ( mpFloatWin )
414cdf0e10cSrcweir 		mpFloatWin->SetRollUpOutputSizePixel( rSize );
415cdf0e10cSrcweir 	maRollUpOutSize = rSize;
416cdf0e10cSrcweir }
417cdf0e10cSrcweir 
GetRollUpOutputSizePixel() const418cdf0e10cSrcweir inline Size DockingWindow::GetRollUpOutputSizePixel() const
419cdf0e10cSrcweir {
420cdf0e10cSrcweir 	if ( mpFloatWin )
421cdf0e10cSrcweir 		return mpFloatWin->GetRollUpOutputSizePixel();
422cdf0e10cSrcweir 	return maRollUpOutSize;
423cdf0e10cSrcweir }
424cdf0e10cSrcweir 
SetMinOutputSizePixel(const Size & rSize)425cdf0e10cSrcweir inline void DockingWindow::SetMinOutputSizePixel( const Size& rSize )
426cdf0e10cSrcweir {
427cdf0e10cSrcweir 	if ( mpFloatWin )
428cdf0e10cSrcweir 		mpFloatWin->SetMinOutputSizePixel( rSize );
429cdf0e10cSrcweir 	maMinOutSize = rSize;
430cdf0e10cSrcweir }
431cdf0e10cSrcweir 
GetMinOutputSizePixel() const432cdf0e10cSrcweir inline const Size& DockingWindow::GetMinOutputSizePixel() const
433cdf0e10cSrcweir {
434cdf0e10cSrcweir 	if ( mpFloatWin )
435cdf0e10cSrcweir 		return mpFloatWin->GetMinOutputSizePixel();
436cdf0e10cSrcweir 	return maMinOutSize;
437cdf0e10cSrcweir }
438cdf0e10cSrcweir 
SetFloatingPos(const Point & rNewPos)439cdf0e10cSrcweir inline void DockingWindow::SetFloatingPos( const Point& rNewPos )
440cdf0e10cSrcweir {
441cdf0e10cSrcweir 	if ( mpFloatWin )
442cdf0e10cSrcweir 		mpFloatWin->SetPosPixel( rNewPos );
443cdf0e10cSrcweir 	else
444cdf0e10cSrcweir 		maFloatPos = rNewPos;
445cdf0e10cSrcweir }
446cdf0e10cSrcweir 
447cdf0e10cSrcweir 
448cdf0e10cSrcweir #endif	// _SV_DOCKWIN_HXX
449