LibreOffice Module sw (master) 1
cshtyp.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_SW_INC_CSHTYP_HXX
20#define INCLUDED_SW_INC_CSHTYP_HXX
21
22#include "swdllapi.h"
24
25class SwPaM;
26class SwContentFrame;
27class SwLayoutFrame;
28
29// Structure for SwPaM. Contains the method-pointers for cursor movement.
31
32// Type definition for CursorShell.
33// Direction-parameter for MovePage.
34typedef SwLayoutFrame * (*SwWhichPage)( const SwLayoutFrame * );
38typedef SwContentFrame * (*SwPosPage)( const SwLayoutFrame * );
40SwContentFrame *GetLastSub( const SwLayoutFrame *pLayout );
41
42// Direction-parameter for MovePara.
43typedef bool (*SwWhichPara)( SwPaM&, SwMoveFnCollection const & );
44bool GoPrevPara( SwPaM&, SwMoveFnCollection const &);
46bool GoNextPara( SwPaM&, SwMoveFnCollection const &);
49
50// Direction-parameter for MoveSection.
51typedef bool (*SwWhichSection)( SwPaM&, SwMoveFnCollection const & );
53extern SwMoveFnCollection const & fnSectionEnd;
54
56
57// Direction-parameter for MoveTable
58typedef bool (*SwWhichTable)( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
59SW_DLLPUBLIC bool GotoPrevTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
60SW_DLLPUBLIC bool GotoCurrTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
61bool GotoNextTable( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
64
65// Direction-parameter for MoveColumn
66typedef SwLayoutFrame * (*SwWhichColumn)( const SwLayoutFrame * );
67typedef SwContentFrame * (*SwPosColumn)( const SwLayoutFrame * );
68SwLayoutFrame* GetPrevColumn( const SwLayoutFrame* pLayFrame );
69SwLayoutFrame* GetCurrColumn( const SwLayoutFrame* pLayFrame );
70SwLayoutFrame* GetNextColumn( const SwLayoutFrame* pLayFrame );
71SwContentFrame* GetColumnStt( const SwLayoutFrame* pColFrame );
72SwContentFrame* GetColumnEnd( const SwLayoutFrame* pColFrame );
73
74// Direction-parameter for MoveRegion (ranges!)
75typedef bool (*SwWhichRegion)( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
76bool GotoPrevRegion( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
77bool GotoNextRegion( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
78bool GotoCurrRegionAndSkip( SwPaM&, SwMoveFnCollection const &, bool bInReadOnly );
80extern SwMoveFnCollection const & fnRegionEnd;
81
82/*
83 * The following combinations are allowed:
84 * - find one in body -> FindRanges::InBody
85 * - find all in body: -> FindRanges::InBodyOnly | FindRanges::InSelAll
86 * - find in selections: one/all -> FindRanges::InSel [ | FindRanges::InSelAll ]
87 * - find not in body: one/all -> FindRanges::InOther [ | FindRanges::InSelAll ]
88 * - find all everywhere -> FindRanges::InSelAll
89 */
90enum class FindRanges
91{
92 InBody = 0x00,
93 InSelAll = 0x01,
94 InOther = 0x02,
95 InSel = 0x04,
96 InBodyOnly = 0x08,
97};
98namespace o3tl
99{
100 template<> struct typed_flags<FindRanges> : is_typed_flags<FindRanges, 0x0f> {};
101}
102
104{
105 Start,
106 Curr,
107 End,
110};
111
112#endif // INCLUDED_SW_INC_CSHTYP_HXX
113
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
Definition: layfrm.hxx:36
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:187
SW_DLLPUBLIC SwMoveFnCollection const & fnTableEnd
Definition: paminit.cxx:55
SwMoveFnCollection const & fnRegionEnd
Definition: paminit.cxx:58
bool(* SwWhichTable)(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: cshtyp.hxx:58
SwContentFrame * GetLastSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1053
SwContentFrame * GetColumnEnd(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:51
SW_DLLPUBLIC bool GoCurrPara(SwPaM &, SwMoveFnCollection const &)
Definition: pam.cxx:1224
SW_DLLPUBLIC SwMoveFnCollection const & fnParaStart
Definition: paminit.cxx:48
bool GotoCurrRegionAndSkip(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvlreg.cxx:181
SwContentFrame * GetFirstSub(const SwLayoutFrame *pLayout)
Definition: trvlfrm.cxx:1048
SW_DLLPUBLIC bool GotoCurrTable(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvltbl.cxx:631
bool GoCurrSection(SwPaM &, SwMoveFnCollection const &)
Definition: pam.cxx:1264
SwMoveFnCollection const & fnSectionEnd
Definition: paminit.cxx:52
bool(* SwWhichPara)(SwPaM &, SwMoveFnCollection const &)
Definition: cshtyp.hxx:43
bool GotoNextRegion(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvlreg.cxx:106
SwLayoutFrame * GetPrevFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1075
SwLayoutFrame * GetPrevColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:40
SwDocPositions
Definition: cshtyp.hxx:104
SwLayoutFrame * GetThisFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1070
FindRanges
Definition: cshtyp.hxx:91
@ InSel
Find in selections.
@ InBodyOnly
Find only in body - only in combination with FindRanges::InSelAll !!!
@ InSelAll
All (only in non-body and selections).
@ InOther
Find "all" in Footer/Header/Fly...
@ InBody
Find "one" only in body text.
SwLayoutFrame * GetNextFrame(const SwLayoutFrame *pFrame)
Definition: trvlfrm.cxx:1058
bool GoPrevPara(SwPaM &, SwMoveFnCollection const &)
Definition: pam.cxx:1211
SwLayoutFrame * GetCurrColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:27
bool(* SwWhichRegion)(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: cshtyp.hxx:75
bool GotoPrevRegion(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvlreg.cxx:31
SW_DLLPUBLIC bool GotoPrevTable(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvltbl.cxx:481
SwMoveFnCollection const & fnRegionStart
Definition: paminit.cxx:57
SW_DLLPUBLIC SwMoveFnCollection const & fnTableStart
Definition: paminit.cxx:54
SwLayoutFrame * GetNextColumn(const SwLayoutFrame *pLayFrame)
Definition: trvlcol.cxx:34
SwContentFrame * GetColumnStt(const SwLayoutFrame *pColFrame)
Definition: trvlcol.cxx:46
bool GoNextPara(SwPaM &, SwMoveFnCollection const &)
Definition: pam.cxx:1251
bool GotoNextTable(SwPaM &, SwMoveFnCollection const &, bool bInReadOnly)
Definition: trvltbl.cxx:560
bool(* SwWhichSection)(SwPaM &, SwMoveFnCollection const &)
Definition: cshtyp.hxx:51
SW_DLLPUBLIC SwMoveFnCollection const & fnParaEnd
Definition: paminit.cxx:49
SwMoveFnCollection const & fnSectionStart
Definition: paminit.cxx:51
#define SW_DLLPUBLIC
Definition: swdllapi.h:28