int MathInset::workwidth;
-MathInset::MathInset(string const & name)
- : name_(name), width_(0), ascent_(0), descent_(0),
- size_(LM_ST_DISPLAY), code_(LM_TC_MIN), xo_(0), yo_(0)
+MathInset::MathInset()
+ : size_(LM_ST_DISPLAY), xo_(0), yo_(0)
{}
-int MathInset::ascent() const
-{
- return ascent_;
-}
-
-
-int MathInset::descent() const
-{
- return descent_;
-}
-
-
-int MathInset::width() const
-{
- return width_;
-}
-
-
int MathInset::height() const
{
- return ascent_ + descent_;
-}
-
-
-string const & MathInset::name() const
-{
- return name_;
-}
-
-
-void MathInset::setName(string const & n)
-{
- name_ = n;
+ return ascent() + descent();
}
}
-void MathInset::size(MathStyles s)
+void MathInset::size(MathStyles s) const
{
size_ = s;
}
}
-void MathInset::xo(int x)
+void MathInset::xo(int x) const
{
xo_ = x;
}
-void MathInset::yo(int y)
+void MathInset::yo(int y) const
{
yo_ = y;
}
void MathInset::writeNormal(std::ostream & os) const
{
- os << "[" << name_ << "] ";
+ os << "[unknown] ";
}
}
-void MathInset::push_back(MathInset * p)
+void MathInset::push_back(MathInset *)
{
lyxerr << "can't push without a cell\n";
}
{
return
x >= xo_ &&
- x <= xo_ + width_ &&
- y >= yo_ - ascent_ &&
- y <= yo_ + descent_;
+ x <= xo_ + width() &&
+ y >= yo_ - ascent() &&
+ y <= yo_ + descent();
}
}
-MathTextCodes MathInset::code() const
+void MathInset::metrics(MathStyles st) const
+{
+ lyxerr << "MathInset::metrics() called directly!\n";
+ size_ = st;
+}
+
+
+void MathInset::draw(Painter &, int, int) const
{
- return code_;
+ lyxerr << "MathInset::draw() called directly!\n";
}
-void MathInset::code(MathTextCodes t)
+void MathInset::write(std::ostream &, bool) const
{
- code_ = t;
+ lyxerr << "MathInset::write() called directly!\n";
}