1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: scrwnd.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <vcl/floatwin.hxx>
32 #include <vcl/bitmap.hxx>
33 #include <vcl/image.hxx>
39 #define WHEELMODE_NONE 0x00000000UL
40 #define WHEELMODE_VH 0x00000001UL
41 #define WHEELMODE_V 0x00000002UL
42 #define WHEELMODE_H 0x00000004UL
43 #define WHEELMODE_SCROLL_VH 0x00000008UL
44 #define WHEELMODE_SCROLL_V 0x00000010UL
45 #define WHEELMODE_SCROLL_H 0x00000020UL
47 // -------------------
48 // - ImplWheelWindow -
49 // -------------------
53 class ImplWheelWindow
: public FloatingWindow
59 CommandScrollData maCommandScrollData
;
72 void ImplCreateImageList();
73 void ImplSetRegion( const Bitmap
& rRegionBmp
);
74 using Window::ImplGetMousePointer
;
75 PointerStyle
ImplGetMousePointer( long nDistX
, long nDistY
);
77 void ImplRecalcScrollValues();
79 DECL_LINK( ImplScrollHdl
, Timer
* pTimer
);
83 virtual void Paint( const Rectangle
& rRect
);
84 virtual void MouseMove( const MouseEvent
& rMEvt
);
85 virtual void MouseButtonUp( const MouseEvent
& rMEvt
);
89 ImplWheelWindow( Window
* pParent
);
93 void ImplSetWheelMode( ULONG nWheelMode
);
94 ULONG
ImplGetWheelMode() const { return mnWheelMode
; }