2000-06-08 23:16:16 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
2000-06-08 23:16:16 +00:00
|
|
|
*
|
|
|
|
* ====================================================== */
|
|
|
|
|
2000-06-15 15:54:05 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2000-07-24 13:53:19 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2000-06-08 23:16:16 +00:00
|
|
|
#include "lyxcursor.h"
|
|
|
|
|
|
|
|
|
2001-08-06 19:12:46 +00:00
|
|
|
LyXCursor::LyXCursor()
|
|
|
|
: par_(0), pos_(0), boundary_(false),
|
|
|
|
x_(0), x_fix_(0), y_(0), row_(0)
|
|
|
|
{}
|
2001-01-08 14:19:29 +00:00
|
|
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void LyXCursor::par(Paragraph * p)
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
par_ = p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * LyXCursor::par() const
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
return par_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void LyXCursor::pos(Paragraph::size_type p)
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
pos_ = p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph::size_type LyXCursor::pos() const
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
return pos_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::boundary(bool b)
|
|
|
|
{
|
|
|
|
boundary_ = b;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool LyXCursor::boundary() const
|
|
|
|
{
|
|
|
|
return boundary_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::x(int n)
|
|
|
|
{
|
|
|
|
x_ = n;
|
|
|
|
}
|
|
|
|
|
|
|
|
int LyXCursor::x() const
|
|
|
|
{
|
|
|
|
return x_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::x_fix(int i)
|
|
|
|
{
|
|
|
|
x_fix_ = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LyXCursor::x_fix() const
|
|
|
|
{
|
|
|
|
return x_fix_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-09-29 18:44:07 +00:00
|
|
|
void LyXCursor::y(int i)
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
y_ = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-09-29 18:44:07 +00:00
|
|
|
int LyXCursor::y() const
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
return y_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::row(Row * r)
|
|
|
|
{
|
|
|
|
row_ = r;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Row * LyXCursor::row() const
|
|
|
|
{
|
|
|
|
return row_;
|
|
|
|
}
|