+2003-05-29 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * tabular.[Ch]: delete commented same_id functions
+
2003-05-28 John Levon <levon@movementarian.org>
* lyxfunc.C: fix LFUN_ESCAPE (bug 1055)
+2003-05-29 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * insetwrap.C (clone): remove const_cast
+
+ * insetnote.C (clone): remove const_cast
+
+ * insetminipage.C (clone): remove const_cast
+
+ * insetmarginal.C (clone): remove const_cast
+
+ * insetfoot.C (clone): remove const_cast
+
+ * insetfloat.C (clone): remove const_cast
+
+ * insetert.C (clone): remove const_cast
+
+ * delete commented same_id functions from a lot of files.
+
2003-05-28 John Levon <levon@movementarian.org>
* insetcite.C:
}
-// Inset::Inset(Inset const & in, bool same_id)
-// : InsetBase(),
-// top_x(0), top_baseline(0), scx(0), owner_(0),
-// name_(in.name_), background_color_(in.background_color_)
-// {
-// if (same_id)
-// id_ = in.id();
-// else
-// id_ = inset_id++;
-// }
-
-
bool Inset::directWrite() const
{
return false;
///
Inset(Inset const & in);
///
- //Inset(Inset const & in, bool same_id);
- ///
virtual void dimension(BufferView *, LyXFont const &, Dimension &) const = 0;
///
int ascent(BufferView *, LyXFont const &) const;
///
virtual Inset * clone(Buffer const &) const = 0;
- ///
- //virtual Inset * clone(Buffer const &, bool same_ids) const = 0;
/// returns true to override begin and end inset in file
virtual bool directWrite() const;
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
/** Currently \bibitem is used as a LyX2.x command,
so we need this method.
///
InsetBibtex(InsetCommandParams const &);
///
- //InsetBibtex(InsetCommandParams const &, bool same_id);
- ///
~InsetBibtex();
///
Inset * clone(Buffer const &) const {
return new InsetBibtex(params());
}
- ///
- //Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetBibtex(params(), same_id);
- //}
/// small wrapper for the time being
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
///
InsetCitation(InsetCommandParams const &);
///
- //InsetCitation(InsetCommandParams const &, bool same_id);
- ///
~InsetCitation();
///
Inset * clone(Buffer const &) const {
return new InsetCitation(params());
}
///
- //Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetCitation(params(), same_id);
- //}
- ///
string const getScreenLabel(Buffer const *) const;
///
EDITABLE editable() const { return IS_EDITABLE; }
}
-// InsetCollapsable::InsetCollapsable(InsetCollapsable const & in, bool same_id)
-// : UpdatableInset(in, same_id), collapsed_(in.collapsed_),
-// framecolor(in.framecolor), labelfont(in.labelfont), inset(in.inset),
-// button_length(0), button_top_y(0), button_bottom_y(0),
-// label(in.label),
-// #if 0
-// autocollapse(in.autocollapse),
-// #endif
-// oldWidth(0), in_update(false), first_after_edit(false)
-// {
-// inset.init(&(in.inset), same_id);
-// inset.setOwner(this);
-// }
-
-
bool InsetCollapsable::insertInset(BufferView * bv, Inset * in)
{
if (!insetAllowed(in->lyxCode())) {
///
InsetCollapsable(InsetCollapsable const & in);
///
- //InsetCollapsable(InsetCollapsable const & in, bool same_id);
- ///
void read(Buffer const *, LyXLex &);
///
void write(Buffer const *, std::ostream &) const;
explicit
InsetCommand(InsetCommandParams const &);
///
- //explicit
- //InsetCommand(InsetCommandParams const &, bool same_id);
- ///
void write(Buffer const *, std::ostream & os) const
{ p_.write(os); }
///
{}
-// InsetEnvironment::InsetEnvironment(InsetEnvironment const & in, bool same_id)
-// : InsetText(in, same_id), layout_(in.layout_)
-// {}
-
-
Inset * InsetEnvironment::clone(Buffer const &) const
{
return new InsetEnvironment(*this);
}
-// Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetEnvironment(*this, same_id);
-// }
-
-
void InsetEnvironment::write(Buffer const * buf, ostream & os) const
{
os << "Environment " << getInsetName() << "\n";
///
InsetEnvironment(InsetEnvironment const &);
///
- //InsetEnvironment(InsetEnvironment const &, bool same_id);
- ///
void write(Buffer const * buf, std::ostream & os) const;
///
void read(Buffer const * buf, LyXLex & lex);
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
///
int latex(Buffer const *, std::ostream &,
explicit
InsetError(string const &);
///
- //explicit
- //InsetError(string const &, bool same_id);
- ///
~InsetError();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
return new InsetError(contents);
}
///
- //Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetError(contents, same_id);
- //}
- ///
Inset::Code lyxCode() const { return Inset::ERROR_CODE; }
/// We don't want "begin" and "end inset" in lyx-file
bool directWrite() const { return true; };
}
-// InsetERT::InsetERT(InsetERT const & in, bool same_id)
-// : InsetCollapsable(in, same_id), status_(in.status_)
-// {
-// init();
-// }
-
-
Inset * InsetERT::clone(Buffer const &) const
{
- return new InsetERT(*const_cast<InsetERT *>(this));
+ return new InsetERT(*this);
}
-// Inset * InsetERT::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetERT(*const_cast<InsetERT *>(this), same_id);
-// }
-
-
InsetERT::InsetERT(BufferParams const & bp,
Language const * l, string const & contents, bool collapsed)
: InsetCollapsable(bp, collapsed)
///
InsetERT(InsetERT const &);
///
- //InsetERT(InsetERT const &, bool same_id);
- ///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
InsetERT(BufferParams const &,
Language const *, string const & contents, bool collapsed);
///
}
-// Inset * InsetExternal::clone(Buffer const &, bool same_id) const
-// {
-// InsetExternal * inset = new InsetExternal;
-// inset->params_ = params_;
-// inset->view_ = view_;
-// if (same_id)
-// inset->id_ = id_;
-// return inset;
-// }
-
-
string const InsetExternal::getScreenLabel(Buffer const *) const
{
ExternalTemplate const & et = params_.templ;
///
virtual Inset * clone(Buffer const &) const;
- ///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
/// returns the text of the button
virtual string const getScreenLabel(Buffer const *) const;
{}
-// InsetFloat::InsetFloat(InsetFloat const & in, bool same_id)
-// : InsetCollapsable(in, same_id), params_(in.params_)
-// {}
-
-
InsetFloat::~InsetFloat()
{
InsetFloatMailer mailer(*this);
Inset * InsetFloat::clone(Buffer const &) const
{
- return new InsetFloat(*const_cast<InsetFloat *>(this));
+ return new InsetFloat(*this);
}
-// Inset * InsetFloat::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
-// }
-
-
string const InsetFloat::editMessage() const
{
return _("Opened Float Inset");
///
InsetFloat(InsetFloat const &);
///
- //InsetFloat(InsetFloat const &, bool same_id);
- ///
~InsetFloat();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
///
int latex(Buffer const *, std::ostream &,
}
-// InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
-// : InsetFootlike(in, same_id)
-// {
-// setLabel(_("foot"));
-// setInsetName("Foot");
-// }
-
-
Inset * InsetFoot::clone(Buffer const &) const
{
- return new InsetFoot(*const_cast<InsetFoot *>(this));
+ return new InsetFoot(*this);
}
-// Inset * InsetFoot::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetFoot(*const_cast<InsetFoot *>(this), same_id);
-// }
-
-
string const InsetFoot::editMessage() const
{
return _("Opened Footnote Inset");
///
InsetFoot(InsetFoot const &);
///
- //InsetFoot(InsetFoot const &, bool same_id);
- ///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::FOOT_CODE; }
///
int latex(Buffer const *, std::ostream &,
}
-// InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
-// : InsetCollapsable(in, same_id)
-// {
-// LyXFont font(LyXFont::ALL_SANE);
-// font.decSize();
-// font.decSize();
-// font.setColor(LColor::collapsable);
-// setLabelFont(font);
-// }
-
-
void InsetFootlike::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";
///
InsetFootlike(InsetFootlike const &);
///
- //InsetFootlike(InsetFootlike const &, bool same_id);
- ///
void write(Buffer const * buf, std::ostream & os) const;
///
bool insetAllowed(Inset::Code) const;
}
-// InsetGraphics::InsetGraphics(InsetGraphics const & ig,
-// string const & filepath,
-// bool same_id)
-// : Inset(ig, same_id),
-// graphic_label(uniqueID()),
-// cache_(new Cache(*this))
-// {
-// setParams(ig.params(), filepath);
-// }
-
-
Inset * InsetGraphics::clone(Buffer const & buffer) const
{
return new InsetGraphics(*this, buffer.filePath());
}
-// Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) const
-// {
-// return new InsetGraphics(*this, buffer.filePath(), same_id);
-// }
-
-
InsetGraphics::~InsetGraphics()
{
InsetGraphicsMailer mailer(*this);
///
InsetGraphics(InsetGraphics const &, string const & filepath);
///
- //InsetGraphics(InsetGraphics const &, string const & filepath,
- // bool same_id);
- ///
~InsetGraphics();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
virtual Inset * clone(Buffer const &) const;
- ///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
/** Set the inset parameters, used by the GUIndependent dialog.
Return true of new params are different from what was so far.
InsetHFill();
///
virtual Inset * clone(Buffer const &) const {
- return new InsetHFill();
+ return new InsetHFill;
}
///
- //virtual Inset * clone(Buffer const &, bool /*same_id*/) const {
- // return new InsetHFill();
- //}
- ///
string const getScreenLabel(Buffer const *) const { return getContents(); }
///
Inset::Code lyxCode() const { return Inset::HFILL_CODE; }
///
virtual Inset * clone(Buffer const &) const;
///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; }
/// This returns the list of labels on the child buffer
std::vector<string> const getLabelList() const;
///
InsetIndex(InsetCommandParams const &);
///
- //InsetIndex(InsetCommandParams const &, bool same_id);
- ///
~InsetIndex();
///
virtual Inset * clone(Buffer const &) const {
return new InsetIndex(params());
}
///
- //virtual Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetIndex(params(), same_id);
- //}
- ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
///
InsetPrintIndex(InsetCommandParams const &);
///
- //InsetPrintIndex(InsetCommandParams const &, bool same_id);
- ///
~InsetPrintIndex();
///
Inset * clone(Buffer const &) const {
return new InsetPrintIndex(params());
}
///
- //Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetPrintIndex(params(), same_id);
- //}
- ///
//dispatch_result localDispatch(FuncRequest const & cmd);
/// Updates needed features for this inset.
void validate(LaTeXFeatures & features) const;
///
InsetLabel(InsetCommandParams const &);
///
- //InsetLabel(InsetCommandParams const &, bool same_id);
- ///
~InsetLabel();
///
virtual Inset * clone(Buffer const &) const {
return new InsetLabel(params());
}
///
- //virtual Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetLabel(params(), same_id);
- //}
- ///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const { return getContents(); }
///
virtual Inset * clone(Buffer const &) const;
///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode()const;
///
inline bool canDisplay();
}
-// InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
-// : InsetFootlike(in, same_id)
-// {
-// setLabel(_("margin"));
-// setInsetName("Marginal");
-// }
-
-
Inset * InsetMarginal::clone(Buffer const &) const
{
- return new InsetMarginal(*const_cast<InsetMarginal *>(this));
+ return new InsetMarginal(*this);
}
-// Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
-// }
-
-
string const InsetMarginal::editMessage() const
{
return _("Opened Marginal Note Inset");
///
InsetMarginal(InsetMarginal const &);
///
- //InsetMarginal(InsetMarginal const &, bool same_id);
- ///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::MARGIN_CODE; }
///
int latex(Buffer const *, std::ostream &,
{}
-// InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
-// : InsetCollapsable(in, same_id), params_(in.params_)
-// {}
-
-
Inset * InsetMinipage::clone(Buffer const &) const
{
- return new InsetMinipage(*const_cast<InsetMinipage *>(this));
+ return new InsetMinipage(*this);
}
-// Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetMinipage(*const_cast<InsetMinipage *>(this), same_id);
-// }
-
-
InsetMinipage::~InsetMinipage()
{
InsetMinipageMailer mailer(*this);
///
InsetMinipage(InsetMinipage const &);
///
- //InsetMinipage(InsetMinipage const &, bool same_id);
- ///
~InsetMinipage();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
///
Inset::Code lyxCode() const { return Inset::MINIPAGE_CODE; }
return new InsetNewline;
}
-
- //virtual Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetNewline;
- //}
-
Inset::Code lyxCode() const { return Inset::NEWLINE_CODE; }
void dimension(BufferView *, LyXFont const &, Dimension &) const;
}
-// InsetNote::InsetNote(InsetNote const & in, bool same_id)
-// : InsetCollapsable(in, same_id)
-// {
-// init();
-// }
-
-
Inset * InsetNote::clone(Buffer const &) const
{
- return new InsetNote(*const_cast<InsetNote *>(this));
+ return new InsetNote(*this);
}
-// Inset * InsetNote::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetNote(*const_cast<InsetNote *>(this), same_id);
-// }
-
-
string const InsetNote::editMessage() const
{
return _("Opened Note Inset");
///
InsetNote(InsetNote const &);
///
- //InsetNote(InsetNote const &, bool same_id);
- ///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
string const editMessage() const;
///
Inset::Code lyxCode() const { return Inset::NOTE_CODE; }
}
-// InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
-// : InsetCollapsable(in, same_id)
-// {
-// LyXFont font(LyXFont::ALL_SANE);
-// font.setColor(LColor::collapsable);
-// setLabelFont(font);
-// setLabel(_("opt"));
-// }
-
-
Inset * InsetOptArg::clone(Buffer const &) const
{
return new InsetOptArg(*this);
}
-// Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetOptArg(*this, same_id);
-// }
-
-
string const InsetOptArg::editMessage() const
{
return _("Opened Optional Argument Inset");
InsetOptArg(BufferParams const &);
InsetOptArg(InsetOptArg const &);
- //InsetOptArg(InsetOptArg const &, bool same_id);
-
/// make a duplicate of this inset
Inset * clone(Buffer const &) const;
- /// make a duplicate of this inset
- //Inset * clone(Buffer const &, bool same_id) const;
-
/// this inset is editable
EDITABLE editable() const { return IS_EDITABLE; }
/// code of the inset
///
InsetParent(InsetCommandParams const &, Buffer const &);
///
- //InsetParent(InsetCommandParams const &, Buffer const &, bool same_id);
- ///
virtual Inset * clone(Buffer const & buffer) const {
return new InsetParent(params(), buffer);
}
///
- //virtual Inset * clone(Buffer const & buffer, bool same_id) const {
- // return new InsetParent(params(), buffer, same_id);
- //}
- ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
InsetQuotes(char c, BufferParams const & params);
///
Inset * clone(Buffer const &) const;
- ///
- //Inset * clone(Buffer const &, bool same_id) const;
-
///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
///
///
InsetRef(InsetCommandParams const &, Buffer const &);
///
- //InsetRef(InsetCommandParams const &, Buffer const &, bool same_id);
- ///
~InsetRef();
///
virtual Inset * clone(Buffer const & buffer) const {
return new InsetRef(params(), buffer);
}
///
- //virtual Inset * clone(Buffer const & buffer, bool same_id) const {
- // return new InsetRef(params(), buffer, same_id);
- //}
- ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
///
virtual Inset * clone(Buffer const &) const;
///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::SPACE_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }
///
virtual Inset * clone(Buffer const &) const;
///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::SPECIALCHAR_CODE; }
/// We don't need \begin_inset and \end_inset
bool directWrite() const { return true; }
}
-// InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
-// bool same_id)
-// : UpdatableInset(tab, same_id), buffer(&buf)
-// {
-// tabular.reset(new LyXTabular(buf.params,
-// this, *(tab.tabular), same_id));
-// the_locking_inset = 0;
-// old_locking_inset = 0;
-// locked = false;
-// oldcell = -1;
-// actrow = actcell = 0;
-// clearSelection();
-// need_update = INIT;
-// in_update = false;
-// in_reset_pos = 0;
-// inset_x = 0;
-// inset_y = 0;
-// }
-
-
InsetTabular::~InsetTabular()
{
InsetTabularMailer mailer(*this);
}
-// Inset * InsetTabular::clone(Buffer const & buf, bool same_id) const
-// {
-// return new InsetTabular(*this, buf, same_id);
-// }
-
-
BufferView * InsetTabular::view() const
{
return buffer->getUser();
///
InsetTabular(InsetTabular const &, Buffer const &);
///
- //InsetTabular(InsetTabular const &, Buffer const &, bool same_id);
- ///
~InsetTabular();
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
void read(Buffer const *, LyXLex &);
///
void write(Buffer const *, std::ostream &) const;
}
-// InsetText::InsetText(InsetText const & in, bool same_id)
-// : UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
-// do_reinit(false)
-// {
-// init(&in, same_id);
-// }
-
-
InsetText & InsetText::operator=(InsetText const & it)
{
init(&it);
}
-// void InsetText::init(InsetText const * ins, bool same_id)
-// {
-// if (ins) {
-// setParagraphData(ins->paragraphs, same_id);
-// autoBreakRows = ins->autoBreakRows;
-// drawFrame_ = ins->drawFrame_;
-// frame_color = ins->frame_color;
-// if (same_id)
-// id_ = ins->id_;
-// } else {
-// for_each(paragraphs.begin(), paragraphs.end(),
-// boost::bind(&Paragraph::setInsetOwner, _1, this));
-
-// the_locking_inset = 0;
-// drawFrame_ = NEVER;
-// frame_color = LColor::insetframe;
-// autoBreakRows = false;
-// }
-// top_y = 0;
-// old_max_width = 0;
-// no_selection = true;
-// need_update = FULL;
-// drawTextXOffset = 0;
-// drawTextYOffset = 0;
-// locked = false;
-// old_par = 0;
-// last_drawn_width = -1;
-// cached_bview = 0;
-// sstate.lpar = 0;
-// in_insetAllowed = false;
-// }
-
-
InsetText::~InsetText()
{
paragraphs.clear();
}
-// Inset * InsetText::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetText(*this, same_id);
-// }
-
-
void InsetText::write(Buffer const * buf, ostream & os) const
{
os << "Text\n";
}
-// void InsetText::setParagraphData(ParagraphList const & plist, bool same_id)
-// {
-// // we have to unlock any locked inset otherwise we're in troubles
-// the_locking_inset = 0;
-
-// #warning CHECK not adhering to same_id here might wreck havoc (Lgb)
-// // But it it makes no difference that is a lot better.
-// if (same_id) {
-// lyxerr << "Same_id called with 'true'" << endl;
-// lyxerr << "Please report this to the list." << endl;
-
-// paragraphs.clear();
-// ParagraphList::iterator it = plist.begin();
-// ParagraphList::iterator end = plist.end();
-// for (; it != end; ++it) {
-// int const id = it->id();
-// paragraphs.push_back(*it);
-// Paragraph & tmp = paragraphs.back();
-// tmp.setInsetOwner(this);
-// tmp.id(id);
-// }
-// } else {
-// #warning FIXME.
-// // See if this can be simplified when std::list is in effect.
-// paragraphs.clear();
-
-// ParagraphList::iterator it = plist.begin();
-// ParagraphList::iterator end = plist.end();
-// for (; it != end; ++it) {
-// paragraphs.push_back(*it);
-// Paragraph & tmp = paragraphs.back();
-// tmp.setInsetOwner(this);
-// }
-// }
-
-// reinitLyXText();
-// need_update = INIT;
-// }
-
-
void InsetText::markNew(bool track_changes)
{
ParagraphList::iterator pit = paragraphs.begin();
explicit
InsetText(InsetText const &);
///
- //explicit
- //InsetText(InsetText const &, bool same_id);
- ///
~InsetText();
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
InsetText & operator=(InsetText const & it);
/// empty inset to empty par, or just mark as erased
void clear(bool just_mark_erased);
///
void init(InsetText const * ins);
///
- //void init(InsetText const * ins, bool same_id);
- ///
void writeParagraphData(Buffer const *, std::ostream &) const;
///
void setParagraphData(ParagraphList const &);
///
- //void setParagraphData(ParagraphList const &, bool same_id);
- ///
void setText(string const &, LyXFont const &);
///
void setAutoBreakRows(bool);
///
virtual Inset * clone(Buffer const &) const;
///
- //virtual Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
///
bool display() const { return true; }
{}
-// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
-// : InsetCommand(p, same_id)
-// {}
-
-
InsetTOC::~InsetTOC()
{
InsetCommandMailer mailer("toc", *this);
///
InsetTOC(InsetCommandParams const &);
///
- //InsetTOC(InsetCommandParams const &, bool same_id);
- ///
~InsetTOC();
///
virtual Inset * clone(Buffer const &) const {
return new InsetTOC(params());
}
///
- //virtual Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetTOC(params(), same_id);
- //}
- ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
explicit
InsetUrl(InsetCommandParams const &);
///
- //explicit
- //InsetUrl(InsetCommandParams const &, bool same_id);
- ///
~InsetUrl();
///
virtual Inset * clone(Buffer const &) const {
return new InsetUrl(params());
}
///
- //virtual Inset * clone(Buffer const &, bool same_id) const {
- // return new InsetUrl(params(), same_id);
- //}
- ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
Inset::Code lyxCode() const { return Inset::URL_CODE; }
{}
-// InsetWrap::InsetWrap(InsetWrap const & in, bool same_id)
-// : InsetCollapsable(in, same_id), params_(in.params_)
-// {}
-
-
InsetWrap::~InsetWrap()
{
InsetWrapMailer mailer(*this);
Inset * InsetWrap::clone(Buffer const &) const
{
- return new InsetWrap(*const_cast<InsetWrap *>(this));
+ return new InsetWrap(*this);
}
-// Inset * InsetWrap::clone(Buffer const &, bool same_id) const
-// {
-// return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
-// }
-
-
string const InsetWrap::editMessage() const
{
return _("Opened Wrap Inset");
///
InsetWrap(InsetWrap const &);
///
- //InsetWrap(InsetWrap const &, bool same_id);
- ///
~InsetWrap();
///
virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
///
int latex(Buffer const *, std::ostream &,
{}
-// UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
-// : Inset(in, same_id), block_drawing_(false)
-// {}
-
-
void UpdatableInset::insetUnlock(BufferView *)
{
lyxerr[Debug::INFO] << "Inset Unlock" << std::endl;
UpdatableInset();
///
UpdatableInset(UpdatableInset const & in);
- ///
- //UpdatableInset(UpdatableInset const & in, bool same_id);
/// check if the font of the char we want inserting is correct
/// and modify it if it is not.
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
void validate(LaTeXFeatures & features) const;
///
Inset::Code lyxCode() const;
///
Inset * clone(Buffer const &) const = 0;
///
- //Inset * clone(Buffer const &, bool same_id) const = 0;
- ///
virtual void draw(BufferView *,LyXFont const &, int, float &) const = 0;
/// lowest x coordinate
virtual int xlow() const;
///
Inset * clone(Buffer const &) const;
///
- //Inset * clone(Buffer const &, bool same_id) const;
- ///
Inset::Code lyxCode() const;
///
MathAtom const & par() const;
}
-// LyXTabular::LyXTabular(BufferParams const & bp,
-// InsetTabular * inset, LyXTabular const & lt,
-// bool same_id)
-// {
-// owner_ = inset;
-// cur_cell = -1;
-// Init(bp, lt.rows_, lt.columns_, <);
-// // we really should change again to have InsetText as a pointer
-// // and allocate it then we would not have to do this stuff all
-// // double!
-// if (same_id) {
-// for (int i = 0; i < rows_; ++i) {
-// for (int j = 0; j < columns_; ++j) {
-// cell_info[i][j].inset.id(lt.cell_info[i][j].inset.id());
-// cell_info[i][j].inset.setParagraphData(lt.cell_info[i][j].inset.paragraphs, true);
-// }
-// }
-// }
-// #if 0
-// #ifdef WITH_WARNINGS
-// #warning Jürgen, can you make it the other way round. So that copy assignment depends on the copy constructor and not the other way. (Lgb)
-// #endif
-// operator=(lt);
-// #endif
-// }
-
-
LyXTabular::LyXTabular(Buffer const * buf, InsetTabular * inset, LyXLex & lex)
{
owner_ = inset;
}
-// LyXTabular * LyXTabular::clone(BufferParams const & bp,
-// InsetTabular * inset, bool same_id)
-// {
-// LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
-// #if 0
-// // don't know if this is good but I need to Clone also
-// // the text-insets here, this is for the Undo-facility!
-// for (int i = 0; i < rows_; ++i) {
-// for (int j = 0; j < columns_; ++j) {
-// result->cell_info[i][j].inset = cell_info[i][j].inset;
-// result->cell_info[i][j].inset.setOwner(inset);
-// }
-// }
-// #endif
-// return result;
-// }
-
-
/* activates all lines and sets all widths to 0 */
void LyXTabular::Init(BufferParams const & bp,
int rows_arg, int columns_arg, LyXTabular const * lt)
LyXTabular(BufferParams const &,
InsetTabular *, LyXTabular const &);
///
- //LyXTabular(BufferParams const &,
- // InsetTabular *, LyXTabular const &, bool same_id = false);
- ///
explicit
LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
///
LyXTabular & operator=(LyXTabular const &);
///
LyXTabular * clone(BufferParams const &, InsetTabular *);
- ///
- //LyXTabular * clone(BufferParams const &,
- // InsetTabular *, bool same_id = false);
/// Returns true if there is a topline, returns false if not
bool TopLine(int cell, bool onlycolumn = false) const;