kivio

KIvioStencilIface.h
1/* This file is part of the KDE project
2 Copyright (C) 2001, Laurent MONTEL <lmontel@mandrakesoft.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KIVIO_STENCIL_IFACE_H
21#define KIVIO_STENCIL_IFACE_H
22
23#include <dcopref.h>
24#include <dcopobject.h>
25#include <tqstring.h>
26#include <tqfont.h>
27#include <tqcolor.h>
28#include <tqrect.h>
29
30class KivioStencil;
31
32class KivioStencilIface : virtual public DCOPObject
33{
34 K_DCOP
35public:
36 KivioStencilIface( KivioStencil *s );
37
38k_dcop:
39 virtual DCOPRef ref();
40 //virtual DCOPRef duplicate();
41
42 virtual bool connected();
43 virtual void setConnected(bool c);
44
45 virtual double x();
46 virtual void setX( double f );
47
48 virtual double y();
49 virtual void setY( double f );
50
51 virtual double w();
52 virtual void setW( double f );
53
54 virtual double h();
55 virtual void setH( double f );
56
57 virtual TQRect rect();
58
59 virtual void setPosition( double f1, double f2 );
60 virtual void setDimensions( double f1, double f2 );
61
62 virtual TQColor fgColor();
63 virtual void setFGColor( TQColor );
64
65 virtual void setBGColor( TQColor );
66 virtual TQColor bgColor();
67
68 virtual void setLineWidth( double );
69 virtual double lineWidth();
70
71 // FOnt stuff
72 virtual TQColor textColor();
73 virtual void setTextColor( TQColor );
74
75 virtual TQFont textFont();
76 virtual void setTextFont( const TQFont & );
77
78 virtual int hTextAlign();
79 virtual int vTextAlign();
80
81 virtual void setHTextAlign(int);
82 virtual void setVTextAlign(int);
83
84 virtual void setText( const TQString & );
85 virtual TQString text();
86
87 virtual bool isSelected();
88 virtual void select();
89 virtual void unselect();
90 virtual void subSelect( const double &, const double & );
91
92 //virtual KivioConnectorTarget *connectToTarget( KivioConnectorPoint *, int );
93
94private:
95 KivioStencil *stencil;
96
97};
98
99#endif