1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _SOLDEPTBOX_HXX
29 #define _SOLDEPTBOX_HXX
31 #include <vcl/toolbox.hxx>
32 #include <vcl/menu.hxx>
34 class SoldepToolBox
: public ToolBox
37 // USHORT nBuildServerToolBoxId;
54 Bitmap aUnpinedBitmap
;
56 void InitContextMenu();
59 SoldepToolBox( Window
* pParent
, const ResId
& aId
, BOOL bDAble
= TRUE
);
62 virtual void Command( const CommandEvent
& rCEvt
);
63 virtual void CallContextMenu( Window
*pWin
, Point aPos
);
64 virtual void Paint( const Rectangle
& rRect
);
65 virtual void MouseButtonDown(const MouseEvent
& rEvent
);
66 virtual void MouseButtonUp(const MouseEvent
& rEvent
);
67 virtual void MouseMove(const MouseEvent
& rEvent
);
69 virtual void ToggleFloatingMode();
70 // void SetFloatingWindow( FloatingWindow* pFW) { ToolBox::mpFloatWin = pFW; }
71 virtual void StartDocking();
72 virtual void EndDocking( const Rectangle
& rRect
, BOOL bFloatMode
);
74 virtual void CloseDockingMode();
76 //Called when toolbar droped
77 virtual void Tracking( const TrackingEvent
&rTEvt
) { Invalidate(); ToolBox::Tracking( rTEvt
);}
81 using DockingWindow::SetPosSizePixel
;
82 void SetPosSizePixel( const Point
& rNewPos
,
83 const Size
& rNewSize
);
85 void SetDockingRects( const Rectangle
& rOutRect
,
86 const Rectangle
& rInRect
);
88 void SetMouseDownHdl(const Link
& rLink
) { aMouseDownHdl
= rLink
; }
89 Link
GetMouseDownHdl() { return aMouseDownHdl
; }
90 void SetResizeHdl(const Link
& rLink
) { aResizeHdl
= rLink
; }
92 BOOL
IsBoxVisible() { return bBoxIsVisible
; }
94 void EnablePin( BOOL bEnable
= TRUE
) { bPinable
= bEnable
; Invalidate(); }
98 PopupMenu
*GetContextMenu();
99 DECL_LINK( MenuSelectHdl
, Menu
* );