bump product version to 6.3.0.0.beta1
[LibreOffice.git] / reportdesign / source / ui / inc / dlgedfunc.hxx
blob4350ed4bff7703844493f56c7d9d850a5421a42b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
24 class Timer;
25 class MouseEvent;
26 class Point;
27 class SdrTextObj;
28 class SdrObject;
29 namespace rptui
32 class OReportSection;
33 class OSectionView;
36 // DlgEdFunc
39 class DlgEdFunc /* : public LinkHdl */
41 DlgEdFunc(const DlgEdFunc&) = delete;
42 void operator =(const DlgEdFunc&) = delete;
43 protected:
44 VclPtr<OReportSection> m_pParent;
45 OSectionView& m_rView;
46 Timer aScrollTimer;
47 Point m_aMDPos;
48 css::uno::Reference<css::uno::XInterface> m_xOverlappingObj;
49 SdrObject * m_pOverlappingObj;
50 Color m_nOverlappedControlColor;
51 Color m_nOldColor;
52 bool m_bSelectionMode;
53 bool m_bUiActive;
54 bool m_bShowPropertyBrowser;
56 DECL_LINK( ScrollTimeout, Timer *, void );
57 void ForceScroll( const Point& rPos );
58 /** checks that no other object is overlapped.
60 * \param rMEvt
62 void checkMovementAllowed(const MouseEvent& rMEvt);
64 /** sets the correct mouse pointer when moving a object
66 * \param rMEvt
67 * \return <TRUE/> when the pointer was already set.
69 bool setMovementPointer(const MouseEvent& rMEvt);
71 bool isRectangleHit(const MouseEvent& rMEvt);
72 /**
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);
84 public:
85 DlgEdFunc( OReportSection* pParent );
86 virtual ~DlgEdFunc();
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
100 * \param rMEvt
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; }
112 protected:
113 void colorizeOverlappedObject(SdrObject* _pOverlappedObj);
114 void unColorizeOverlappedObj();
120 // DlgEdFuncInsert
123 class DlgEdFuncInsert : public DlgEdFunc
125 public:
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;
135 // DlgEdFuncSelect
138 class DlgEdFuncSelect : public DlgEdFunc
140 public:
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: */