2002-08-04 23:11:50 +00:00
|
|
|
/**
|
|
|
|
* \file lyxcursor.C
|
|
|
|
* Copyright 1995-2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2002-08-04 23:11:50 +00:00
|
|
|
* \author Matthias Ettrich
|
|
|
|
*/
|
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),
|
2002-04-12 15:59:03 +00:00
|
|
|
x_(0), ix_(0), x_fix_(0), y_(0), iy_(0), row_(0)
|
2001-08-06 19:12:46 +00:00
|
|
|
{}
|
2001-01-08 14:19:29 +00:00
|
|
|
|
|
|
|
|
2002-03-21 17:27:08 +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-11-27 10:34:16 +00:00
|
|
|
void LyXCursor::pos(lyx::pos_type p)
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
pos_ = p;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-11-27 10:34:16 +00:00
|
|
|
lyx::pos_type LyXCursor::pos() const
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
return pos_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-03-21 17:27:08 +00:00
|
|
|
void LyXCursor::boundary(bool b)
|
2000-06-08 23:16:16 +00:00
|
|
|
{
|
|
|
|
boundary_ = b;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool LyXCursor::boundary() const
|
|
|
|
{
|
|
|
|
return boundary_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::x(int n)
|
|
|
|
{
|
|
|
|
x_ = n;
|
|
|
|
}
|
|
|
|
|
|
|
|
int LyXCursor::x() const
|
|
|
|
{
|
|
|
|
return x_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-04-12 15:59:03 +00:00
|
|
|
void LyXCursor::ix(int n)
|
|
|
|
{
|
|
|
|
ix_ = n;
|
|
|
|
}
|
|
|
|
|
|
|
|
int LyXCursor::ix() const
|
|
|
|
{
|
|
|
|
return ix_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-06-08 23:16:16 +00:00
|
|
|
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_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-04-11 09:53:23 +00:00
|
|
|
void LyXCursor::iy(int i)
|
|
|
|
{
|
|
|
|
iy_ = i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int LyXCursor::iy() const
|
|
|
|
{
|
|
|
|
return iy_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-06-08 23:16:16 +00:00
|
|
|
void LyXCursor::row(Row * r)
|
|
|
|
{
|
|
|
|
row_ = r;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Row * LyXCursor::row() const
|
|
|
|
{
|
|
|
|
return row_;
|
|
|
|
}
|
2002-04-16 14:10:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
void LyXCursor::irow(Row * r)
|
|
|
|
{
|
|
|
|
irow_ = r;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Row * LyXCursor::irow() const
|
|
|
|
{
|
|
|
|
return irow_;
|
|
|
|
}
|