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
|
|
|
|
|
|
|
|
#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
|
2002-03-21 17:27:08 +00:00
|
|
|
for a list of paragraphs beginning with the specified par
|
2000-04-11 22:55:29 +00:00
|
|
|
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,
|
2002-03-21 17:27:08 +00:00
|
|
|
lyx::textclass_type class2,
|
|
|
|
Paragraph * par,
|
2001-12-15 14:34:17 +00:00
|
|
|
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
|