2000-04-10 14:29:05 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
2002-03-21 17:27:08 +00:00
|
|
|
* ======================================================
|
|
|
|
*
|
2000-04-10 14:29:05 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 the LyX Team.
|
2000-04-10 14:29:05 +00:00
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
|
|
|
#ifndef CUTANDPASTE_H
|
|
|
|
#define CUTANDPASTE_H
|
|
|
|
|
2001-12-28 13:26:54 +00:00
|
|
|
#include "support/types.h"
|
2003-04-29 09:40:49 +00:00
|
|
|
#include "ParagraphList.h"
|
2000-04-10 14:29:05 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
class Paragraph;
|
2001-12-28 13:26:54 +00:00
|
|
|
class BufferParams;
|
2002-07-21 21:21:06 +00:00
|
|
|
class LyXTextClass;
|
2000-04-10 14:29:05 +00:00
|
|
|
|
|
|
|
///
|
2003-03-06 15:39:37 +00:00
|
|
|
namespace CutAndPaste {
|
2003-04-29 09:40:49 +00:00
|
|
|
///
|
|
|
|
std::pair<ParagraphList::iterator, int>
|
|
|
|
cutSelection(ParagraphList & pars,
|
|
|
|
ParagraphList::iterator startpit,
|
|
|
|
ParagraphList::iterator endpit,
|
|
|
|
int start, int end, lyx::textclass_type tc,
|
|
|
|
bool doclear = false);
|
|
|
|
///
|
|
|
|
std::pair<ParagraphList::iterator, int>
|
|
|
|
eraseSelection(ParagraphList & pars,
|
|
|
|
ParagraphList::iterator startpit,
|
|
|
|
ParagraphList::iterator endpit,
|
|
|
|
int start, int end, bool doclear = false);
|
2003-03-06 15:39:37 +00:00
|
|
|
///
|
|
|
|
bool copySelection(Paragraph * startpar, Paragraph * endpar,
|
2003-03-06 21:01:04 +00:00
|
|
|
int start, int end, lyx::textclass_type tc);
|
2003-03-06 15:39:37 +00:00
|
|
|
///
|
|
|
|
bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
|
2003-03-06 21:01:04 +00:00
|
|
|
int & pos, lyx::textclass_type tc);
|
2003-03-06 15:39:37 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
int nrOfParagraphs();
|
|
|
|
|
|
|
|
/** needed to switch between different classes this works
|
|
|
|
for a list of paragraphs beginning with the specified par
|
|
|
|
return value is the number of wrong conversions
|
|
|
|
*/
|
|
|
|
int SwitchLayoutsBetweenClasses(lyx::textclass_type c1,
|
|
|
|
lyx::textclass_type c2,
|
|
|
|
Paragraph * par,
|
|
|
|
BufferParams const & bparams);
|
|
|
|
///
|
2003-03-06 21:01:04 +00:00
|
|
|
bool checkPastePossible();
|
2003-03-06 15:39:37 +00:00
|
|
|
|
|
|
|
} // end of CutAndPaste
|
2000-04-10 14:29:05 +00:00
|
|
|
|
|
|
|
#endif
|