Branch libreoffice-5-0-4
[LibreOffice.git] / sw / inc / cshtyp.hxx
blob2ba43ffef9479e2158e22bf09feaeecf2ea71a3f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SW_INC_CSHTYP_HXX
20 #define INCLUDED_SW_INC_CSHTYP_HXX
22 #include <tools/solar.h>
23 #include "swdllapi.h"
25 class SwPaM;
26 class SwContentFrm;
27 class SwLayoutFrm;
29 // Structure for SwPaM. Contains the method-pointers for cursor movement.
30 struct SwMoveFnCollection;
31 typedef SwMoveFnCollection* SwMoveFn;
33 // Type definition for CrsrShell.
34 // Direction-parameter for MovePage (initialized in SwContentFrm).
35 typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
36 typedef SwContentFrm * (*SwPosPage)( const SwLayoutFrm * );
37 extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
38 extern SwPosPage fnPageStart, fnPageEnd;
40 // Direction-parameter for MovePara (initialized in SwContentFrm).
41 typedef SwMoveFnCollection* SwPosPara;
42 typedef bool (*SwWhichPara)( SwPaM&, SwPosPara );
43 extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
44 extern SwPosPara fnParaStart, fnParaEnd;
46 // Direction-parameter for MoveSection.
47 typedef SwMoveFnCollection* SwPosSection;
48 typedef bool (*SwWhichSection)( SwPaM&, SwPosSection );
49 extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
50 extern SwPosSection fnSectionStart, fnSectionEnd;
52 // Direction-parameter for MoveTable
53 typedef SwMoveFnCollection* SwPosTable;
54 typedef bool (*SwWhichTable)( SwPaM&, SwPosTable, bool bInReadOnly );
55 extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
56 extern SwPosTable fnTableStart, fnTableEnd;
58 // Direction-parameter for MoveColumn
59 typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
60 typedef SwContentFrm * (*SwPosColumn)( const SwLayoutFrm * );
61 extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
62 extern SwPosColumn fnColumnStart, fnColumnEnd;
64 // Direction-parameter for MoveRegion (ranges!)
65 typedef SwMoveFnCollection* SwPosRegion;
66 typedef bool (*SwWhichRegion)( SwPaM&, SwPosRegion, bool bInReadOnly );
67 extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
68 extern SwPosRegion fnRegionStart, fnRegionEnd;
71 * The following combinations are allowed:
72 * - find one in body -> FND_IN_BODY
73 * - find all in body: -> FND_IN_BODYONLY | FND_IN_SELALL
74 * - find in selections: one/all -> FND_IN_SEL [ | FND_IN_SELALL ]
75 * - find not in body: one/all -> FND_IN_OTHER [ | FND_IN_SELALL ]
76 * - find all everywhere -> FND_IN_SELALL
78 enum FindRanges
80 FND_IN_BODY = 0x00, ///< Find "one" only in body text.
81 FND_IN_OTHER = 0x02, ///< Find "all" in Footer/Header/Fly...
82 FND_IN_SEL = 0x04, ///< Find in selections.
83 FND_IN_BODYONLY = 0x08, ///< Find only in body - only in combination with FND_IN_SELALL !!!
84 FND_IN_SELALL = 0x01 ///< All (only in non-body and selections).
87 enum SwDocPositions
89 DOCPOS_START,
90 DOCPOS_CURR,
91 DOCPOS_END,
92 DOCPOS_OTHERSTART,
93 DOCPOS_OTHEREND
96 SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
97 SW_DLLPUBLIC SwPosPara GetfnParaStart();
98 SW_DLLPUBLIC SwPosPara GetfnParaEnd();
100 SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
101 SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
102 SW_DLLPUBLIC SwPosTable GetfnTableStart();
103 SW_DLLPUBLIC SwPosTable GetfnTableEnd();
105 #endif // INCLUDED_SW_INC_CSHTYP_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */