2000-04-10 14:29:05 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
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
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2001-12-28 13:26:54 +00:00
|
|
|
#include "support/types.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;
|
2000-04-10 14:29:05 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
class CutAndPaste {
|
|
|
|
public:
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool cutSelection(Paragraph * startpar, Paragraph ** endpar,
|
2001-12-28 13:26:54 +00:00
|
|
|
int start, int & end, char tc, bool doclear = false,
|
|
|
|
bool realcut = true);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool copySelection(Paragraph * startpar, Paragraph * endpar,
|
2001-12-28 13:26:54 +00:00
|
|
|
int start, int end, char tc);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool pasteSelection(Paragraph ** par, Paragraph ** endpar,
|
2001-12-28 13:26:54 +00:00
|
|
|
int & pos, char tc);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
|
|
|
int nrOfParagraphs();
|
2000-04-11 22:55:29 +00:00
|
|
|
/** 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
|
2000-08-07 20:58:24 +00:00
|
|
|
*/
|
|
|
|
static
|
2001-11-29 17:12:21 +00:00
|
|
|
int SwitchLayoutsBetweenClasses(lyx::textclass_type class1,
|
|
|
|
lyx::textclass_type class2,
|
2001-12-15 14:34:17 +00:00
|
|
|
Paragraph * par,
|
|
|
|
BufferParams const & bparams);
|
2000-04-11 22:55:29 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
static
|
2001-06-25 00:06:33 +00:00
|
|
|
bool checkPastePossible(Paragraph *);
|
2000-04-10 14:29:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|