1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
20 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
22 #include <vcl/timer.hxx>
39 class DlgEdFunc
/* : public LinkHdl */
41 DlgEdFunc(const DlgEdFunc
&) = delete;
42 void operator =(const DlgEdFunc
&) = delete;
44 VclPtr
<OReportSection
> m_pParent
;
45 OSectionView
& m_rView
;
48 css::uno::Reference
<css::uno::XInterface
> m_xOverlappingObj
;
49 SdrObject
* m_pOverlappingObj
;
50 Color m_nOverlappedControlColor
;
52 bool m_bSelectionMode
;
54 bool m_bShowPropertyBrowser
;
56 DECL_LINK( ScrollTimeout
, Timer
*, void );
57 void ForceScroll( const Point
& rPos
);
58 /** checks that no other object is overlapped.
62 void checkMovementAllowed(const MouseEvent
& rMEvt
);
64 /** sets the correct mouse pointer when moving a object
67 * \return <TRUE/> when the pointer was already set.
69 bool setMovementPointer(const MouseEvent
& rMEvt
);
71 bool isRectangleHit(const MouseEvent
& rMEvt
);
73 returns true, as long as only customshapes in the marked list,
74 custom shapes can drop every where
76 bool isOnlyCustomShapeMarked();
78 /** activate object if it is of type OBJ_OLE2
80 void activateOle(SdrObject
* _pObj
);
82 void checkTwoCklicks(const MouseEvent
& rMEvt
);
85 DlgEdFunc( OReportSection
* pParent
);
88 virtual bool MouseButtonDown( const MouseEvent
& rMEvt
);
89 virtual bool MouseButtonUp( const MouseEvent
& rMEvt
);
90 virtual bool MouseMove( const MouseEvent
& rMEvt
);
92 /** checks if the keycode is known by the child windows
93 @param _rCode the keycode
94 @return <TRUE/> if the keycode is handled otherwise <FALSE/>
96 bool handleKeyEvent(const KeyEvent
& _rEvent
);
98 /** returns <TRUE/> if the mouse event is over an existing object
101 * \return <TRUE/> if overlapping, otherwise <FALSE/>
103 bool isOverlapping(const MouseEvent
& rMEvt
);
104 void setOverlappedControlColor(Color _nColor
);
105 void stopScrollTimer();
107 /** deactivate all ole object
109 void deactivateOle(bool _bSelect
= false);
111 bool isUiActive() const { return m_bUiActive
; }
113 void colorizeOverlappedObject(SdrObject
* _pOverlappedObj
);
114 void unColorizeOverlappedObj();
123 class DlgEdFuncInsert
: public DlgEdFunc
126 DlgEdFuncInsert( OReportSection
* pParent
);
127 virtual ~DlgEdFuncInsert() override
;
129 virtual bool MouseButtonDown( const MouseEvent
& rMEvt
) override
;
130 virtual bool MouseButtonUp( const MouseEvent
& rMEvt
) override
;
131 virtual bool MouseMove( const MouseEvent
& rMEvt
) override
;
138 class DlgEdFuncSelect
: public DlgEdFunc
141 DlgEdFuncSelect( OReportSection
* pParent
);
142 virtual ~DlgEdFuncSelect() override
;
144 virtual bool MouseButtonDown( const MouseEvent
& rMEvt
) override
;
145 virtual bool MouseButtonUp( const MouseEvent
& rMEvt
) override
;
146 virtual bool MouseMove( const MouseEvent
& rMEvt
) override
;
150 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */