- if (ed) {
- flags_ |= MMF_Edit;
- for (int i = 0; i < nargs_; ++i) {
- args_[i].setExpand(false);
- }
- }
- else {
- flags_ &= ~MMF_Edit;
- for (int i = 0; i < nargs_; ++i) {
- args_[i].setExpand(true);
- }
- }
-}
-
-
-void MathMacroTemplate::draw(Painter & pain, int x, int y)
-{
- int x2;
- int y2;
- bool expnd = (nargs_ > 0) ? args_[0].getExpand(): false;
- if (flags_ & MMF_Edit) {
- for (int i = 0; i < nargs_; ++i) {
- args_[i].setExpand(false);
- }
- x2 = x;
- y2 = y;
- } else {
- for (int i = 0; i < nargs_; ++i) {
- args_[i].setExpand(true);
- }
- x2 = xo();
- y2 = yo();
- }
- MathParInset::draw(pain, x, y);
- xo(x2);
- yo(y2);
-
- for (int i = 0; i < nargs_; ++i) {
- args_[i].setExpand(expnd);
- }
+ if (numargs_ > 9)
+ lyxerr << "MathMacroTemplate::MathMacroTemplate: wrong # of arguments: "
+ << numargs_ << std::endl;