kivio_common.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef KIVIO_COMMON_H
20#define KIVIO_COMMON_H
21
22#include <tqdom.h>
23#include <tqcolor.h>
24
25class KivioConnectorPoint;
26class KoPoint;
27class KoRect;
28
29extern "C" {
30
31 KoRect XmlReadRect( const TQDomElement &, const TQString &, const KoRect & );
32 void XmlWriteRect( TQDomElement &, const TQString &, const KoRect & );
33
34 TQColor XmlReadColor( const TQDomElement &, const TQString &, const TQColor & );
35 void XmlWriteColor( TQDomElement &, const TQString &, const TQColor & );
36
37 int XmlReadInt( const TQDomElement &, const TQString &, const int & );
38 void XmlWriteInt( TQDomElement &, const TQString &, const int & );
39
40 uint XmlReadUInt( const TQDomElement &, const TQString &, const uint & );
41 void XmlWriteUInt( TQDomElement &, const TQString &, const uint & );
42
43 double XmlReadDouble( const TQDomElement &, const TQString &, const double & );
44 void XmlWriteDouble( TQDomElement &, const TQString &, const double & );
45
46 float XmlReadFloat( const TQDomElement &, const TQString &, const float & );
47 void XmlWriteFloat( TQDomElement &, const TQString &, const float & );
48
49 TQString XmlReadString( const TQDomElement &, const TQString &, const TQString & );
50 void XmlWriteString( TQDomElement &, const TQString &, const TQString & );
51
52 bool PointInPoly( KoPoint *points, int numPoints, KoPoint *hitPos );
53
54 float shortestDistance( KivioConnectorPoint *pStart, KivioConnectorPoint *pEnd, KivioConnectorPoint *q );
55
56}
57
58#endif
59
60