kpresenter

KPrTextObjectIface.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, 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 KPRESENTER_TEXTOBJECT_IFACE_H
21#define KPRESENTER_TEXTOBJECT_IFACE_H
22
23#include <KoDocumentIface.h>
24#include <dcopref.h>
25#include "KPrObject2DIface.h"
26#include <tqstring.h>
27#include <tqcolor.h>
28#include <tqfont.h>
29class KPrTextObject;
30
31class KPrTextObjectIface : public KPrObject2DIface
32{
33 K_DCOP
34public:
35 KPrTextObjectIface( KPrTextObject *_textobject );
36
37k_dcop:
38 DCOPRef startEditing();
39 bool hasSelection() const;
40 TQString selectedText() const;
41 void selectAll( bool select );
42 void recalcPageNum( );
43
44 void setBoldText( bool b );
45 void setItalicText( bool b );
46 void setUnderlineText( bool b );
47 void setStrikeOutText( bool b );
48 void setTextColor( const TQColor &col );
49 void setTextPointSize( int s );
50 void setTextSubScript( bool b );
51 void setTextSuperScript( bool b );
52 void setTextDefaultFormat();
53 void setTextBackgroundColor(const TQColor & col);
54 void setTextFamilyFont(const TQString &font);
55 void changeCaseOfText( const TQString & caseType);
56 void setDoubleUnderlineText(bool on);
57 void setUnderlineColor( const TQColor & color );
58
59 TQColor textColor() const;
60 TQFont textFont() const;
61 TQString textFontFamily()const;
62 TQColor textBackgroundColor()const;
63 TQColor textUnderlineColor() const;
64
65 bool textItalic() const;
66 bool textBold() const;
67 bool textUnderline()const;
68 bool textStrikeOut()const;
69 bool textSubScript() const;
70 bool textSuperScript() const;
71
72 void extendTextContentsToHeight();
73 void extendTextObjectToContents();
74 void setProtectContent ( bool _protect );
75 bool isProtectContent() const;
76 bool textDoubleUnderline()const;
77
78 double ptMarginLeft()const;
79 double ptMarginRight()const;
80 double ptMarginTop()const;
81 double ptMarginBottom()const;
82
83 void setPtMarginLeft(double val);
84 void setPtMarginRight(double val);
85 void setPtMarginTop(double val);
86 void setPtMarginBottom(double val);
87
88 void setVerticalAligment( const TQString & type);
89 TQString verticalAlignment() const;
90
91 //bool textShadow() const;
92 //void setTextShadow( bool b );
93
94 double relativeTextSize() const;
95 void setRelativeTextSize( double _size );
96
97 bool wordByWord() const;
98 void setWordByWord( bool _b );
99
100 TQString fontAttribute()const;
101 TQString underlineLineStyle() const;
102 TQString strikeOutLineStyle()const;
103
104
105private:
106 KPrTextObject *m_textobject;
107};
108
109#endif