kword

defs.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>, Torben Weis <weis@kde.org>
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 defs_h
21#define defs_h
22
23#include <tqtextstream.h>
24#include <tqstring.h>
25#include <KoGlobal.h>
26#include "KWFactory.h"
27
28// Try to add new defines and enums in the most appropriate class
29// instead of in this file. Only very global things should be here.
30
31#define KWBarIcon( x ) BarIcon( x, KWFactory::instance() )
32
33#define DEBUGRECT(rc) (rc).x() << "," << (rc).y() << " " << (rc).width() << "x" << (rc).height()
34#define DEBUGREGION(reg) { TQMemArray<TQRect>rs=reg.rects(); for (int i=0;i<rs.size();++i) \
35 kdDebug()<<" "<<DEBUGRECT(rs[i] )<<endl; }
36
37const unsigned int s_minFrameWidth=4;
38const unsigned int s_minFrameHeight=11;
39
51enum FrameSetType { FT_BASE = 0, FT_TEXT = 1, FT_PICTURE = 2, FT_PART = 3,
52 FT_FORMULA = 4, FT_CLIPART = 5,
53 FT_TABLE = 10 };
54// This has to remain here because of KWDocument::refreshDocStructure()
55
56// This one has better remain here, otherwise kwdoc.cpp needs docstruct.h
57enum TypeStructDocItem {Arrangement=1, Tables=2, Pictures=4, TextFrames=16, Embedded=32, FormulaFrames=64};
58
59// This one has better remain here, otherwise kwtexframeset.h needs footnote.h
60// Yes, if gcc was faster we would choose more modular code over compilation speed...
61enum NoteType { FootNote, EndNote };
62
63enum SeparatorLinePos { SLP_LEFT = 0, SLP_CENTERED = 1, SLP_RIGHT = 2};
64enum SeparatorLineLineType { SLT_SOLID = 0, SLT_DASH = 1, SLT_DOT = 2, SLT_DASH_DOT = 3, SLT_DASH_DOT_DOT = 4};
65
66// Shared between sortdia.h and kwtextframeset.h
67enum SortType { KW_SORTINCREASE, KW_SORTDECREASE };
68
73enum MouseMeaning { MEANING_NONE = 0, MEANING_MOUSE_INSIDE, MEANING_MOUSE_INSIDE_TEXT,
74 MEANING_MOUSE_OVER_LINK, MEANING_MOUSE_OVER_FOOTNOTE,
75 MEANING_MOUSE_MOVE, MEANING_MOUSE_SELECT, MEANING_ACTIVATE_PART,
76 MEANING_TOPLEFT, MEANING_TOP, MEANING_TOPRIGHT, MEANING_RIGHT,
77 MEANING_BOTTOMRIGHT, MEANING_BOTTOM, MEANING_BOTTOMLEFT, MEANING_LEFT,
78 MEANING_RESIZE_COLUMN, MEANING_RESIZE_ROW, MEANING_SELECT_RANGE,
79 MEANING_SELECT_COLUMN, MEANING_SELECT_ROW, MEANING_FORBIDDEN };
80
81enum InsertPagePos { KW_INSERTPAGEAFTER=0 , KW_INSERTPAGEBEFORE=1 };
82
83
84#endif