Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / dbaccess / source / ui / inc / ConnectionLine.hxx
blob3e0590fcea4c131bcfca1d4a992141ab8503d549
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_DBACCESS_SOURCE_UI_INC_CONNECTIONLINE_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_CONNECTIONLINE_HXX
22 #include <tools/gen.hxx>
23 #include "ConnectionLineData.hxx"
24 #include <vcl/vclptr.hxx>
26 class OutputDevice;
27 namespace dbaui
30 // ConnData ---------->* ConnLineData
31 // ^1 ^1
32 // | |
33 // Conn ---------->* ConnLine
36 the class OConnectionLine represents the graphical line between the to two windows
37 **/
38 class OTableConnection;
39 class OConnectionLine
41 VclPtr<OTableConnection> m_pTabConn;
42 OConnectionLineDataRef m_pData;
44 Point m_aSourceConnPos,
45 m_aDestConnPos;
46 Point m_aSourceDescrLinePos,
47 m_aDestDescrLinePos;
48 public:
49 OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef pLineData );
50 OConnectionLine( const OConnectionLine& rLine );
51 virtual ~OConnectionLine();
53 OConnectionLine& operator=( const OConnectionLine& rLine );
55 Rectangle GetBoundingRect();
56 bool RecalcLine();
57 void Draw( OutputDevice* pOutDev );
58 bool CheckHit( const Point& rMousePos ) const;
60 bool IsValid() const;
62 Rectangle GetSourceTextPos() const;
63 Rectangle GetDestTextPos() const;
65 const OConnectionLineDataRef& GetData() const { return m_pData; }
67 Point getMidPoint() const;
71 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CONNECTIONLINE_HXX
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */