moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kig / objects / text_type.h
blobef9bc280813a22afb29440c6028341c14b312def
1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
16 // 02111-1307, USA.
18 #ifndef KIG_OBJECTS_TEXT_TYPE_H
19 #define KIG_OBJECTS_TEXT_TYPE_H
21 #include "object_type.h"
23 class TextType
24 : public ObjectType
26 const ArgsParser mparser;
27 TextType();
28 ~TextType();
29 public:
30 static const TextType* instance();
32 const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
33 bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
34 const ObjectImpType* resultId() const;
36 ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
38 std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
39 Args sortArgs( const Args& args ) const;
41 bool canMove( const ObjectTypeCalcer& ourobj ) const;
42 bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
43 std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
44 const Coordinate moveReferencePoint( const ObjectTypeCalcer& ourobj ) const;
45 void move( ObjectTypeCalcer& ourobj, const Coordinate& to,
46 const KigDocument& ) const;
48 QStringList specialActions() const;
49 void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
50 KigPart& d, KigWidget& w, NormalMode& m ) const;
52 const ArgsParser& argParser() const;
55 #endif