LibreOffice Module reportdesign (master)  1
dlgedfunc.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
20 #define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
21 
22 #include <tools/gen.hxx>
23 #include <vcl/event.hxx>
24 #include <vcl/timer.hxx>
25 #include <com/sun/star/uno/XInterface.hpp>
26 
27 class Timer;
28 class MouseEvent;
29 class Point;
30 class SdrTextObj;
31 class SdrObject;
32 namespace rptui
33 {
34 
35 class OReportSection;
36 class OSectionView;
37 
38 
39 // DlgEdFunc
40 
41 
42 class DlgEdFunc /* : public LinkHdl */
43 {
44  DlgEdFunc(const DlgEdFunc&) = delete;
45  void operator =(const DlgEdFunc&) = delete;
46 protected:
51  css::uno::Reference<css::uno::XInterface> m_xOverlappingObj;
58 
59  DECL_LINK( ScrollTimeout, Timer *, void );
60  void ForceScroll( const Point& rPos );
65  void checkMovementAllowed(const MouseEvent& rMEvt);
66 
72  bool setMovementPointer(const MouseEvent& rMEvt);
73 
74  bool isRectangleHit(const MouseEvent& rMEvt);
79  bool isOnlyCustomShapeMarked() const;
80 
83  void activateOle(SdrObject* _pObj);
84 
85  void checkTwoClicks(const MouseEvent& rMEvt);
86 
87 public:
88  DlgEdFunc( OReportSection* pParent );
89  virtual ~DlgEdFunc();
90 
91  virtual bool MouseButtonDown( const MouseEvent& rMEvt );
92  virtual bool MouseButtonUp( const MouseEvent& rMEvt );
93  virtual bool MouseMove( const MouseEvent& rMEvt );
94 
99  bool handleKeyEvent(const KeyEvent& _rEvent);
100 
106  bool isOverlapping(const MouseEvent& rMEvt);
107  void setOverlappedControlColor(Color _nColor);
108  void stopScrollTimer();
109 
112  void deactivateOle(bool _bSelect = false);
113 
114  bool isUiActive() const { return m_bUiActive; }
115 protected:
116  void colorizeOverlappedObject(SdrObject* _pOverlappedObj);
118 
119 
120 };
121 
122 
123 // DlgEdFuncInsert
124 
125 
127 {
128 public:
129  DlgEdFuncInsert( OReportSection* pParent );
130  virtual ~DlgEdFuncInsert() override;
131 
132  virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
133  virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
134  virtual bool MouseMove( const MouseEvent& rMEvt ) override;
135 };
136 
137 
138 // DlgEdFuncSelect
139 
140 
142 {
143 public:
144  DlgEdFuncSelect( OReportSection* pParent );
145  virtual ~DlgEdFuncSelect() override;
146 
147  virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
148  virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
149  virtual bool MouseMove( const MouseEvent& rMEvt ) override;
150 };
151 
152 }
153 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_DLGEDFUNC_HXX
154 
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~DlgEdFuncInsert() override
Definition: dlgedfunc.cxx:634
virtual ~DlgEdFunc()
Definition: dlgedfunc.cxx:152
virtual bool MouseButtonUp(const MouseEvent &rMEvt)
Definition: dlgedfunc.cxx:215
void ForceScroll(const Point &rPos)
Definition: dlgedfunc.cxx:65
void operator=(const DlgEdFunc &)=delete
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:779
void activateOle(SdrObject *_pObj)
activate object if it is of type OBJ_OLE2
Definition: dlgedfunc.cxx:373
DlgEdFunc(const DlgEdFunc &)=delete
DECL_LINK(ScrollTimeout, Timer *, void)
void colorizeOverlappedObject(SdrObject *_pOverlappedObj)
Definition: dlgedfunc.cxx:441
virtual bool MouseButtonDown(const MouseEvent &rMEvt)
Definition: dlgedfunc.cxx:159
void checkTwoClicks(const MouseEvent &rMEvt)
Definition: dlgedfunc.cxx:221
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:671
bool m_bShowPropertyBrowser
Definition: dlgedfunc.hxx:57
virtual bool MouseMove(const MouseEvent &rMEvt)
Definition: dlgedfunc.cxx:250
bool isRectangleHit(const MouseEvent &rMEvt)
Definition: dlgedfunc.cxx:550
bool isOnlyCustomShapeMarked() const
returns true, as long as only customshapes in the marked list, custom shapes can drop every where ...
Definition: dlgedfunc.cxx:532
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:733
virtual bool MouseButtonDown(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:640
DlgEdFuncSelect(OReportSection *pParent)
Definition: dlgedfunc.cxx:768
bool setMovementPointer(const MouseEvent &rMEvt)
sets the correct mouse pointer when moving an object
Definition: dlgedfunc.cxx:609
virtual bool MouseButtonUp(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:824
bool isOverlapping(const MouseEvent &rMEvt)
returns if the mouse event is over an existing object
Definition: dlgedfunc.cxx:476
OSectionView & m_rView
Definition: dlgedfunc.hxx:48
VclPtr< OReportSection > m_pParent
Definition: dlgedfunc.hxx:47
virtual ~DlgEdFuncSelect() override
Definition: dlgedfunc.cxx:774
void checkMovementAllowed(const MouseEvent &rMEvt)
checks that no other object is overlapped.
Definition: dlgedfunc.cxx:492
void setOverlappedControlColor(Color _nColor)
Definition: dlgedfunc.cxx:125
Color m_nOverlappedControlColor
Definition: dlgedfunc.hxx:53
DlgEdFuncInsert(OReportSection *pParent)
Definition: dlgedfunc.cxx:627
SdrObject * m_pOverlappingObj
Definition: dlgedfunc.hxx:52
bool isUiActive() const
Definition: dlgedfunc.hxx:114
void stopScrollTimer()
Definition: dlgedfunc.cxx:241
virtual bool MouseMove(const MouseEvent &rMEvt) override
Definition: dlgedfunc.cxx:847
bool handleKeyEvent(const KeyEvent &_rEvent)
checks if the keycode is known by the child windows
Definition: dlgedfunc.cxx:255
void unColorizeOverlappedObj()
Definition: dlgedfunc.cxx:462
void deactivateOle(bool _bSelect=false)
deactivate all ole object
Definition: dlgedfunc.cxx:411
css::uno::Reference< css::uno::XInterface > m_xOverlappingObj
Definition: dlgedfunc.hxx:51