LibreOffice Module svx (master)  1
tablehandles.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 
20 #ifndef INCLUDED_SVX_SOURCE_TABLE_TABLEHANDLES_HXX
21 #define INCLUDED_SVX_SOURCE_TABLE_TABLEHANDLES_HXX
22 
23 #include <svx/svdhdl.hxx>
24 
25 
26 namespace sdr::table {
27 
29 
30 struct TableEdge
31 {
32  sal_Int32 mnStart;
33  sal_Int32 mnEnd;
35 
36  TableEdge() : mnStart(0), mnEnd(0), meState(Empty) {}
37 };
38 
39 class TableEdgeHdl : public SdrHdl
40 {
41 public:
42  TableEdgeHdl( const Point& rPnt, bool bHorizontal, sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nEdges );
43 
44  sal_Int32 GetValidDragOffset( const SdrDragStat& rDrag ) const;
45 
46  virtual PointerStyle GetPointer() const override;
47 
48  void SetEdge( sal_Int32 nEdge, sal_Int32 nStart, sal_Int32 nEnd, TableEdgeState nState );
49 
50  bool IsHorizontalEdge() const { return mbHorizontal; }
51 
53  void getPolyPolygon(basegfx::B2DPolyPolygon& rVisible, basegfx::B2DPolyPolygon& rInvisible, const SdrDragStat* pDrag) const;
54 
55 protected:
56  // create marker for this kind
57  virtual void CreateB2dIAObject() override;
58 
59 private:
61  sal_Int32 mnMin, mnMax;
62  std::vector< TableEdge > maEdges;
63 };
64 
65 class TableBorderHdl : public SdrHdl
66 {
67 public:
69  const tools::Rectangle& rRect,
70  bool bAnimate);
71 
72  virtual PointerStyle GetPointer() const override;
73 
74 protected:
75  // create marker for this kind
76  virtual void CreateB2dIAObject() override;
77 
78 private:
80 
81  bool mbAnimate : 1;
82 };
83 
84 } // end of namespace sdr::table
85 
86 
87 #endif
88 
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void CreateB2dIAObject() override
virtual PointerStyle GetPointer() const override
virtual void CreateB2dIAObject() override
basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat &rDrag) const
void SetEdge(sal_Int32 nEdge, sal_Int32 nStart, sal_Int32 nEnd, TableEdgeState nState)
TableEdgeState meState
virtual PointerStyle GetPointer() const override
tools::Rectangle maRectangle
std::vector< TableEdge > maEdges
void getPolyPolygon(basegfx::B2DPolyPolygon &rVisible, basegfx::B2DPolyPolygon &rInvisible, const SdrDragStat *pDrag) const
sal_Int32 GetValidDragOffset(const SdrDragStat &rDrag) const
bool IsHorizontalEdge() const
TableEdgeHdl(const Point &rPnt, bool bHorizontal, sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nEdges)
PointerStyle
TableBorderHdl(const tools::Rectangle &rRect, bool bAnimate)
sal_Int32 nState