2003-08-19 13:00:56 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
|
* \file MathGridInfo.h
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
|
|
|
|
|
2003-04-25 15:54:29 +00:00
|
|
|
|
#ifndef MATH_GRIDINFO_H
|
|
|
|
|
#define MATH_GRIDINFO_H
|
|
|
|
|
|
2003-10-07 08:16:04 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2003-09-05 14:09:58 +00:00
|
|
|
|
|
2005-01-19 15:03:31 +00:00
|
|
|
|
class ColInfo
|
2003-04-25 15:54:29 +00:00
|
|
|
|
{
|
2005-01-19 15:03:31 +00:00
|
|
|
|
public:
|
2003-05-02 07:43:23 +00:00
|
|
|
|
ColInfo() : align('c'), rightline(0), leftline(false) {}
|
2003-04-25 15:54:29 +00:00
|
|
|
|
char align; // column alignment
|
2003-10-07 08:16:04 +00:00
|
|
|
|
std::string width; // column width
|
|
|
|
|
std::string special; // special column alignment
|
2003-04-25 15:54:29 +00:00
|
|
|
|
int rightline; // a line on the right?
|
|
|
|
|
bool leftline;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2005-01-19 15:03:31 +00:00
|
|
|
|
class RowInfo
|
2003-04-25 15:54:29 +00:00
|
|
|
|
{
|
2005-01-19 15:03:31 +00:00
|
|
|
|
public:
|
2003-09-09 18:27:24 +00:00
|
|
|
|
RowInfo() : topline(false), bottomline(false) {}
|
2003-04-25 15:54:29 +00:00
|
|
|
|
bool topline; // horizontal line above
|
|
|
|
|
int bottomline; // horizontal line below
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2005-01-19 15:03:31 +00:00
|
|
|
|
class CellInfo
|
2003-04-25 15:54:29 +00:00
|
|
|
|
{
|
2005-01-19 15:03:31 +00:00
|
|
|
|
public:
|
2003-04-25 15:54:29 +00:00
|
|
|
|
CellInfo()
|
|
|
|
|
: multi(0), leftline(false), rightline(false),
|
|
|
|
|
topline(false), bottomline(false)
|
|
|
|
|
{}
|
|
|
|
|
|
2003-10-07 08:16:04 +00:00
|
|
|
|
std::string content; // cell content
|
2003-04-25 15:54:29 +00:00
|
|
|
|
int multi; // multicolumn flag
|
|
|
|
|
char align; // cell alignment
|
|
|
|
|
bool leftline; // do we have a line on the left?
|
|
|
|
|
bool rightline; // do we have a line on the right?
|
|
|
|
|
bool topline; // do we have a line above?
|
|
|
|
|
bool bottomline; // do we have a line below?
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline char const * verbose_align(char c)
|
|
|
|
|
{
|
|
|
|
|
return c == 'c' ? "center" : c == 'r' ? "right" : c == 'l' ? "left" : "none";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|