+2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * remove same_id from function signatures, adjust.
+
2003-05-25 Lars Gullik Bjønnes <larsbj@gullik.net>
* undo_funcs.C (createUndo): use the id functions directly, adjust.
+2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * remove same_id from function signatures, adjust
+
2003-05-24 Lars Gullik Bjønnes <larsbj@gullik.net>
* insettext.C (InsetText): adjust
{}
-Inset::Inset(Inset const & in, bool same_id)
+Inset::Inset(Inset const & in)
: 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++;
+ id_ = inset_id++;
}
+// 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;
dimension(bv, font, dim);
return dim.width();
}
-
///
Inset();
///
- Inset(Inset const & in, bool same_id = false);
+ Inset(Inset const & in);
+ ///
+ //Inset(Inset const & in, bool same_id);
///
virtual void dimension(BufferView *, LyXFont const &, Dimension &) const = 0;
///
}
///
- virtual Inset * clone(Buffer const &, bool same_ids = false) const = 0;
+ 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 * InsetBibitem::clone(Buffer const &, bool) const
+Inset * InsetBibitem::clone(Buffer const &) const
{
InsetBibitem * b = new InsetBibitem(params());
b->setCounter(counter);
}
+// Inset * InsetBibitem::clone(Buffer const &, bool) const
+// {
+// InsetBibitem * b = new InsetBibitem(params());
+// b->setCounter(counter);
+// return b;
+// }
+
+
dispatch_result InsetBibitem::localDispatch(FuncRequest const & cmd)
{
switch (cmd.action) {
///
~InsetBibitem();
///
- Inset * clone(Buffer const &, bool same_id = false) 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,
using std::pair;
-InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
+InsetBibtex::InsetBibtex(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetBibtex::InsetBibtex(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetBibtex::~InsetBibtex()
{
InsetCommandMailer mailer("bibtex", *this);
class InsetBibtex : public InsetCommand {
public:
///
- InsetBibtex(InsetCommandParams const &, bool same_id = false);
+ InsetBibtex(InsetCommandParams const &);
+ ///
+ //InsetBibtex(InsetCommandParams const &, bool same_id);
///
~InsetBibtex();
///
- Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetBibtex(params(), same_id);
+ 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);
///
} // anon namespace
-InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
+InsetCitation::InsetCitation(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetCitation::InsetCitation(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetCitation::~InsetCitation()
{
InsetCommandMailer mailer("citation", *this);
class InsetCitation : public InsetCommand {
public:
///
- InsetCitation(InsetCommandParams const &, bool same_id = false);
+ InsetCitation(InsetCommandParams const &);
+ ///
+ //InsetCitation(InsetCommandParams const &, bool same_id);
///
~InsetCitation();
///
- Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetCitation(params(), same_id);
+ 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_),
+InsetCollapsable::InsetCollapsable(InsetCollapsable const & in)
+ : UpdatableInset(in), 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),
#endif
oldWidth(0), in_update(false), first_after_edit(false)
{
- inset.init(&(in.inset), same_id);
+ inset.init(&(in.inset));
inset.setOwner(this);
}
+// 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())) {
///
static int const TEXT_TO_BOTTOM_OFFSET = 2;
/// inset is initially collapsed if bool = true
- InsetCollapsable(BufferParams const &, bool = false);
+ InsetCollapsable(BufferParams const &, bool collapsed = false);
///
- InsetCollapsable(InsetCollapsable const & in, bool same_id = false);
+ InsetCollapsable(InsetCollapsable const & in);
+ ///
+ //InsetCollapsable(InsetCollapsable const & in, bool same_id);
///
void read(Buffer const *, LyXLex &);
///
void toggleSelection(BufferView * bv, bool kill_selection) {
inset.toggleSelection(bv, kill_selection);
}
-
+
void markErased();
-
+
bool nextChange(BufferView * bv, lyx::pos_type & length);
///
using std::ostream;
-InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
+InsetCommand::InsetCommand(InsetCommandParams const & p)
: p_(p.getCmdName(), p.getContents(), p.getOptions())
{}
+// InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
+// : p_(p.getCmdName(), p.getContents(), p.getOptions())
+// {}
+
+
void InsetCommand::setParams(InsetCommandParams const & p)
{
p_.setCmdName(p.getCmdName());
if (in.empty())
return;
-
+
istringstream data(STRCONV(in));
LyXLex lex(0,0);
lex.setStream(data);
public:
///
explicit
- InsetCommand(InsetCommandParams const &, bool same_id = false);
+ 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_)
+InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
+ : InsetText(in), layout_(in.layout_)
{}
-Inset * InsetEnvironment::clone(Buffer const &, bool same_id) const
+// 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, same_id);
+ 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(BufferParams const &, string const & name);
///
- InsetEnvironment(InsetEnvironment const &, bool same_id = false);
+ 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 &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
///
using std::ostream;
-InsetError::InsetError(string const & str, bool)
+InsetError::InsetError(string const & str)
: contents(str)
{}
+// InsetError::InsetError(string const & str, bool)
+// : contents(str)
+// {}
+
+
InsetError::~InsetError()
{
Dialogs::hide("error", this);
public:
///
explicit
- InsetError(string const &, bool same_id = false);
+ InsetError(string const &);
+ ///
+ //explicit
+ //InsetError(string const &, bool same_id);
///
~InsetError();
///
///
EDITABLE editable() const { return IS_EDITABLE; }
///
- Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetError(contents, same_id);
+ Inset * clone(Buffer const &) const {
+ 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_)
+InsetERT::InsetERT(InsetERT const & in)
+ : InsetCollapsable(in), status_(in.status_)
{
init();
}
-Inset * InsetERT::clone(Buffer const &, bool same_id) const
+// 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), same_id);
+ return new InsetERT(*const_cast<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(BufferParams const &, bool collapsed = false);
///
- InsetERT(InsetERT const &, bool same_id = false);
+ InsetERT(InsetERT const &);
///
- Inset * clone(Buffer const &, bool same_id = false) 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
+Inset * InsetExternal::clone(Buffer const &) const
{
InsetExternal * inset = new InsetExternal;
inset->params_ = params_;
inset->view_ = view_;
- if (same_id)
- inset->id_ = id_;
return inset;
}
+// 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 ~InsetExternal();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
/// what appears in the minibuffer when opening
virtual string const editMessage() const;
///
virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; }
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ 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(InsetFloat const & in)
+ : InsetCollapsable(in), params_(in.params_)
{}
+// 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 &, bool same_id) const
+Inset * InsetFloat::clone(Buffer const &) const
{
- return new InsetFloat(*const_cast<InsetFloat *>(this), same_id);
+ return new InsetFloat(*const_cast<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(BufferParams const &, string const &);
///
- InsetFloat(InsetFloat const &, bool same_id = false);
+ InsetFloat(InsetFloat const &);
+ ///
+ //InsetFloat(InsetFloat const &, bool same_id);
///
~InsetFloat();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
void write(Buffer const * buf, std::ostream & os) const;
///
///
void validate(LaTeXFeatures & features) const;
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::FLOAT_CODE; }
///
bool showInsetDialog(BufferView *) const;
///
InsetFloatParams const & params() const { return params_; }
-
+
private:
///
InsetFloatParams params_;
///
~InsetFloatList();
///
- Inset * clone(Buffer const &, bool = false) const {
+ Inset * clone(Buffer const &) const {
return new InsetFloatList(getCmdName());
}
///
+ //Inset * clone(Buffer const &, bool = false) const {
+ // return new InsetFloatList(getCmdName());
+ //}
+ ///
dispatch_result localDispatch(FuncRequest const & cmd);
///
string const getScreenLabel(Buffer const *) const;
}
-InsetFoot::InsetFoot(InsetFoot const & in, bool same_id)
- : InsetFootlike(in, same_id)
+InsetFoot::InsetFoot(InsetFoot const & in)
+ : InsetFootlike(in)
{
setLabel(_("foot"));
setInsetName("Foot");
}
-Inset * InsetFoot::clone(Buffer const &, bool same_id) const
+// 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), same_id);
+ return new InsetFoot(*const_cast<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(BufferParams const &);
///
- InsetFoot(InsetFoot const &, bool same_id = false);
+ InsetFoot(InsetFoot const &);
///
- Inset * clone(Buffer const &, bool same_id = false) 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; }
///
}
-InsetFootlike::InsetFootlike(InsetFootlike const & in, bool same_id)
- : InsetCollapsable(in, same_id)
+InsetFootlike::InsetFootlike(InsetFootlike const & in)
+ : InsetCollapsable(in)
{
LyXFont font(LyXFont::ALL_SANE);
font.decSize();
}
+// 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(BufferParams const &);
///
- InsetFootlike(InsetFootlike const &, bool same_id = false);
+ InsetFootlike(InsetFootlike const &);
+ ///
+ //InsetFootlike(InsetFootlike const &, bool same_id);
///
void write(Buffer const * buf, std::ostream & os) const;
///
InsetGraphics::InsetGraphics(InsetGraphics const & ig,
- string const & filepath,
- bool same_id)
- : Inset(ig, same_id),
+ string const & filepath)
+ : Inset(ig),
graphic_label(uniqueID()),
cache_(new Cache(*this))
{
}
-Inset * InsetGraphics::clone(Buffer const & buffer, bool same_id) 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(), same_id);
+ 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);
return DISPATCHED;
}
- case LFUN_INSET_DIALOG_UPDATE:
+ case LFUN_INSET_DIALOG_UPDATE:
InsetGraphicsMailer(*this).updateDialog(cmd.view());
return DISPATCHED;
///
InsetGraphics();
///
- InsetGraphics(InsetGraphics const &, string const & filepath,
- bool same_id = false);
+ InsetGraphics(InsetGraphics const &, string const & filepath);
+ ///
+ //InsetGraphics(InsetGraphics const &, string const & filepath,
+ // bool same_id);
///
~InsetGraphics();
///
Inset::Code lyxCode() const { return Inset::GRAPHICS_CODE; }
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ 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 &, bool = false) const {
+ virtual Inset * clone(Buffer const &) const {
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; }
return DISPATCHED;
}
- case LFUN_INSET_DIALOG_UPDATE:
+ case LFUN_INSET_DIALOG_UPDATE:
InsetIncludeMailer(*this).updateDialog(cmd.view());
return DISPATCHED;
}
-Inset * InsetInclude::clone(Buffer const & buffer, bool) const
+Inset * InsetInclude::clone(Buffer const & buffer) const
{
Params p(params_);
p.masterFilename_ = buffer.fileName();
}
+// Inset * InsetInclude::clone(Buffer const & buffer, bool) const
+// {
+// Params p(params_);
+// p.masterFilename_ = buffer.fileName();
+
+// return new InsetInclude(p);
+// }
+
+
void InsetInclude::write(Buffer const *, ostream & os) const
{
os << "Include " << params_.cparams.getCommand() << '\n'
if (in.empty())
return;
-
+
istringstream data(STRCONV(in));
LyXLex lex(0,0);
lex.setStream(data);
~InsetInclude();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
/// Override these InsetButton methods if Previewing
int ascent(BufferView *, LyXFont const &) const;
void set(Params const & params);
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ 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
using std::ostream;
-InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+InsetIndex::InsetIndex(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetIndex::~InsetIndex()
{
InsetCommandMailer mailer("index", *this);
case LFUN_INSET_EDIT:
InsetCommandMailer("index", *this).showDialog(cmd.view());
return DISPATCHED;
-
+
default:
return UNDISPATCHED;
}
-InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetPrintIndex::~InsetPrintIndex()
{}
class InsetIndex : public InsetCommand {
public:
///
- InsetIndex(InsetCommandParams const &, bool same_id = false);
+ InsetIndex(InsetCommandParams const &);
+ ///
+ //InsetIndex(InsetCommandParams const &, bool same_id);
///
~InsetIndex();
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetIndex(params(), same_id);
+ 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;
class InsetPrintIndex : public InsetCommand {
public:
///
- InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
+ InsetPrintIndex(InsetCommandParams const &);
+ ///
+ //InsetPrintIndex(InsetCommandParams const &, bool same_id);
///
~InsetPrintIndex();
///
- Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetPrintIndex(params(), same_id);
+ 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;
using std::pair;
-InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+InsetLabel::InsetLabel(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetLabel::InsetLabel(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetLabel::~InsetLabel()
{
InsetCommandMailer mailer("label", *this);
class InsetLabel : public InsetCommand {
public:
///
- InsetLabel(InsetCommandParams const &, bool same_id = false);
+ InsetLabel(InsetCommandParams const &);
+ ///
+ //InsetLabel(InsetCommandParams const &, bool same_id);
///
~InsetLabel();
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetLabel(params(), same_id);
+ 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(); }
}
-Inset * InsetLatexAccent::clone(Buffer const &, bool) const
+Inset * InsetLatexAccent::clone(Buffer const &) const
{
return new InsetLatexAccent(contents);
}
+// Inset * InsetLatexAccent::clone(Buffer const &, bool) const
+// {
+// return new InsetLatexAccent(contents);
+// }
+
+
Inset::Code InsetLatexAccent::lyxCode() const
{
return Inset::ACCENT_CODE;
///
bool directWrite() const;
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ virtual Inset * clone(Buffer const &) const;
+ ///
+ //virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode()const;
///
}
-InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
- : InsetFootlike(in, same_id)
+InsetMarginal::InsetMarginal(InsetMarginal const & in)
+ : InsetFootlike(in)
{
setLabel(_("margin"));
setInsetName("Marginal");
}
-Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
+// 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), same_id);
+ return new InsetMarginal(*const_cast<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(BufferParams const &);
///
- InsetMarginal(InsetMarginal const &, bool same_id = false);
+ InsetMarginal(InsetMarginal const &);
///
- Inset * clone(Buffer const &, bool same_id = false) 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; }
///
}
-InsetMinipage::InsetMinipage(InsetMinipage const & in, bool same_id)
- : InsetCollapsable(in, same_id), params_(in.params_)
+InsetMinipage::InsetMinipage(InsetMinipage const & in)
+ : InsetCollapsable(in), params_(in.params_)
{}
-Inset * InsetMinipage::clone(Buffer const &, bool same_id) const
+// 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), same_id);
+ return new InsetMinipage(*const_cast<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);
return DISPATCHED;
}
- case LFUN_INSET_DIALOG_UPDATE:
+ case LFUN_INSET_DIALOG_UPDATE:
InsetMinipageMailer(*this).updateDialog(cmd.view());
return DISPATCHED;
if (in.empty())
return;
-
+
istringstream data(STRCONV(in));
LyXLex lex(0,0);
lex.setStream(data);
///
InsetMinipage(BufferParams const &);
///
- InsetMinipage(InsetMinipage const &, bool same_id = false);
+ InsetMinipage(InsetMinipage const &);
+ ///
+ //InsetMinipage(InsetMinipage const &, bool same_id);
///
~InsetMinipage();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
void write(Buffer const * buf, std::ostream & os) const;
///
void read(Buffer const * buf, LyXLex & lex);
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
///
InsetNewline() {}
- virtual Inset * clone(Buffer const &, bool = false) const {
+ virtual Inset * clone(Buffer const &) const {
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)
+InsetNote::InsetNote(InsetNote const & in)
+ : InsetCollapsable(in)
{
init();
}
-Inset * InsetNote::clone(Buffer const &, bool same_id) 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), same_id);
+ return new InsetNote(*const_cast<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(BufferParams const &);
///
- InsetNote(InsetNote const &, bool same_id = false);
+ InsetNote(InsetNote const &);
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ //InsetNote(InsetNote const &, bool same_id);
+ ///
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
string const editMessage() const;
///
}
-InsetOptArg::InsetOptArg(InsetOptArg const & in, bool same_id)
- : InsetCollapsable(in, same_id)
+InsetOptArg::InsetOptArg(InsetOptArg const & in)
+ : InsetCollapsable(in)
{
LyXFont font(LyXFont::ALL_SANE);
font.setColor(LColor::collapsable);
}
-Inset * InsetOptArg::clone(Buffer const &, bool same_id) const
+// 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, same_id);
+ 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");
public:
InsetOptArg(BufferParams const &);
- InsetOptArg(InsetOptArg const &, bool same_id = false);
+ InsetOptArg(InsetOptArg const &);
+ //InsetOptArg(InsetOptArg const &, bool same_id);
/// make a duplicate of this inset
- Inset * clone(Buffer const &, bool same_id = false) const;
+ 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; }
using std::ostream;
-InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
+InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf)
: InsetCommand(p)
{
string const fn = p.getContents();
}
+// InsetParent::InsetParent(InsetCommandParams const & p, Buffer const & bf, bool)
+// : InsetCommand(p, false)
+// {
+// string const fn = p.getContents();
+// setContents(MakeAbsPath(fn, bf.filePath()));
+// }
+
+
string const InsetParent::getScreenLabel(Buffer const *) const
{
return bformat(_("Parent: %1$s"), getContents());
class InsetParent : public InsetCommand {
public:
///
- InsetParent(InsetCommandParams const &, Buffer const &, bool same_id = false);
+ InsetParent(InsetCommandParams const &, Buffer const &);
///
- virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
- return new InsetParent(params(), buffer, same_id);
+ //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;
&& lyxrc.fontenc != "T1") {
if (times_ == SingleQ)
switch (type) {
- case ',': features.require("quotesinglbase"); break;
+ case ',': features.require("quotesinglbase"); break;
case '<': features.require("guilsinglleft"); break;
case '>': features.require("guilsinglright"); break;
default: break;
}
-Inset * InsetQuotes::clone(Buffer const &, bool) const
+Inset * InsetQuotes::clone(Buffer const &) const
{
- return new InsetQuotes(language_, side_, times_);
+ return new InsetQuotes(language_, side_, times_);
}
+// Inset * InsetQuotes::clone(Buffer const &, bool) const
+// {
+// return new InsetQuotes(language_, side_, times_);
+// }
+
+
Inset::Code InsetQuotes::lyxCode() const
{
return Inset::QUOTE_CODE;
/// Create the right quote inset after character c
InsetQuotes(char c, BufferParams const & params);
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
void dimension(BufferView *, LyXFont const &, Dimension &) const;
using std::ostream;
-InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
+InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf)
: InsetCommand(p), isLatex(buf.isLatex())
{}
+// InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
+// : InsetCommand(p, false), isLatex(buf.isLatex())
+// {}
+
+
InsetRef::~InsetRef()
{
InsetCommandMailer("ref", *this).hideDialog();
dispatch_result InsetRef::localDispatch(FuncRequest const & cmd)
{
switch (cmd.action) {
- case LFUN_INSET_EDIT:
+ case LFUN_INSET_EDIT:
// Eventually trigger dialog with button 3 not 1
if (cmd.button() == mouse_button::button3)
cmd.view()->owner()->
if (cmd.button() == mouse_button::button1)
InsetCommandMailer("ref", *this).showDialog(cmd.view());
return DISPATCHED;
-
+
default:
return UNDISPATCHED;
}
static string const & getName(int type);
///
- InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
+ InsetRef(InsetCommandParams const &, Buffer const &);
+ ///
+ //InsetRef(InsetCommandParams const &, Buffer const &, bool same_id);
///
~InsetRef();
///
- virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
- return new InsetRef(params(), buffer, same_id);
+ 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;
}
-Inset * InsetSpace::clone(Buffer const &, bool) const
+Inset * InsetSpace::clone(Buffer const &) const
{
return new InsetSpace(kind_);
}
+// Inset * InsetSpace::clone(Buffer const &, bool) const
+// {
+// return new InsetSpace(kind_);
+// }
+
+
bool InsetSpace::isChar() const
{
return true;
///
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
- virtual Inset * clone(Buffer const &, bool same_id = false) 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
}
-Inset * InsetSpecialChar::clone(Buffer const &, bool) const
+Inset * InsetSpecialChar::clone(Buffer const &) const
{
return new InsetSpecialChar(kind_);
}
+// Inset * InsetSpecialChar::clone(Buffer const &, bool) const
+// {
+// return new InsetSpecialChar(kind_);
+// }
+
+
void InsetSpecialChar::validate(LaTeXFeatures & features) const
{
if (kind_ == MENU_SEPARATOR) {
///
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ 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
}
-InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf,
- bool same_id)
- : UpdatableInset(tab, same_id), buffer(&buf)
+InsetTabular::InsetTabular(InsetTabular const & tab, Buffer const & buf)
+ : UpdatableInset(tab), buffer(&buf)
{
tabular.reset(new LyXTabular(buf.params,
- this, *(tab.tabular), same_id));
+ this, *(tab.tabular)));
the_locking_inset = 0;
old_locking_inset = 0;
locked = false;
}
+// 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
+Inset * InsetTabular::clone(Buffer const & buf) const
{
- return new InsetTabular(*this, buf, same_id);
+ return new InsetTabular(*this, buf);
}
+// 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(Buffer const &, int rows = 1, int columns = 1);
///
- InsetTabular(InsetTabular const &, Buffer const &, bool same_id = false);
+ InsetTabular(InsetTabular const &, Buffer const &);
+ ///
+ //InsetTabular(InsetTabular const &, Buffer const &, bool same_id);
///
~InsetTabular();
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
void read(Buffer const *, LyXLex &);
///
paragraphs.begin()->layout(bp.getLyXTextClass().defaultLayout());
if (bp.tracking_changes)
paragraphs.begin()->trackChanges();
- init();
+ init(0);
}
-InsetText::InsetText(InsetText const & in, bool same_id)
- : UpdatableInset(in, same_id), lt(0), in_update(false), do_resize(0),
+InsetText::InsetText(InsetText const & in)
+ : UpdatableInset(in), lt(0), in_update(false), do_resize(0),
do_reinit(false)
{
- init(&in, same_id);
+ init(&in);
}
+// 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)
+void InsetText::init(InsetText const * ins)
{
if (ins) {
- setParagraphData(ins->paragraphs, same_id);
+ setParagraphData(ins->paragraphs);
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));
}
+// 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
+Inset * InsetText::clone(Buffer const &) const
{
- return new InsetText(*this, same_id);
+ return new InsetText(*this);
}
+// 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)
+void InsetText::setParagraphData(ParagraphList const & plist)
{
// 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();
+ // 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);
- }
+ 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();
}
+// 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();
InsetText(BufferParams const &);
///
explicit
- InsetText(InsetText const &, bool same_id = false);
+ InsetText(InsetText const &);
+ ///
+ //explicit
+ //InsetText(InsetText const &, bool same_id);
///
~InsetText();
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ 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
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
- void init(InsetText const * ins = 0, bool same_id = false);
+ void init(InsetText const * ins);
+ ///
+ //void init(InsetText const * ins, bool same_id);
///
void writeParagraphData(Buffer const *, std::ostream &) const;
///
- void setParagraphData(ParagraphList const &, bool same_id = false);
+ void setParagraphData(ParagraphList const &);
+ ///
+ //void setParagraphData(ParagraphList const &, bool same_id);
///
void setText(string const &, LyXFont const &);
///
///
void write(Buffer const * buf, std::ostream & os) const;
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const;
+ virtual Inset * clone(Buffer const &) const;
+ ///
+ //virtual Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
///
using std::ostream;
-InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
- : InsetCommand(p, same_id)
+InsetTOC::InsetTOC(InsetCommandParams const & p)
+ : InsetCommand(p)
{}
+// InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
+// : InsetCommand(p, same_id)
+// {}
+
+
InsetTOC::~InsetTOC()
{
InsetCommandMailer mailer("toc", *this);
class InsetTOC : public InsetCommand {
public:
///
- InsetTOC(InsetCommandParams const &, bool same_id = false);
+ InsetTOC(InsetCommandParams const &);
+ ///
+ //InsetTOC(InsetCommandParams const &, bool same_id);
///
~InsetTOC();
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetTOC(params(), same_id);
+ 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;
using std::ostream;
-InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+InsetUrl::InsetUrl(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetUrl::~InsetUrl()
{
InsetCommandMailer("url", *this).hideDialog();
public:
///
explicit
- InsetUrl(InsetCommandParams const &, bool same_id = false);
+ InsetUrl(InsetCommandParams const &);
+ ///
+ //explicit
+ //InsetUrl(InsetCommandParams const &, bool same_id);
///
~InsetUrl();
///
- virtual Inset * clone(Buffer const &, bool same_id = false) const {
- return new InsetUrl(params(), same_id);
+ 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(InsetWrap const & in)
+ : InsetCollapsable(in), params_(in.params_)
{}
+// 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 &, bool same_id) const
+Inset * InsetWrap::clone(Buffer const &) const
{
- return new InsetWrap(*const_cast<InsetWrap *>(this), same_id);
+ return new InsetWrap(*const_cast<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");
if (in.empty())
return;
-
+
istringstream data(STRCONV(in));
LyXLex lex(0,0);
lex.setStream(data);
void write(std::ostream &) const;
///
void read(LyXLex &);
-
+
///
string type;
///
///
InsetWrap(BufferParams const &, string const &);
///
- InsetWrap(InsetWrap const &, bool same_id = false);
+ InsetWrap(InsetWrap const &);
+ ///
+ //InsetWrap(InsetWrap const &, bool same_id);
///
~InsetWrap();
///
- virtual dispatch_result localDispatch(FuncRequest const & cmd);
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
void write(Buffer const * buf, std::ostream & os) const;
///
///
void validate(LaTeXFeatures & features) const;
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const { return Inset::WRAP_CODE; }
///
{}
-UpdatableInset::UpdatableInset(UpdatableInset const & in, bool same_id)
- : Inset(in, same_id), block_drawing_(false)
+UpdatableInset::UpdatableInset(UpdatableInset const & in)
+ : Inset(in), block_drawing_(false)
{}
+// 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, bool same_id = false);
+ 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.
/// find the next change in the inset
virtual bool nextChange(BufferView * bv, lyx::pos_type & length);
-
+
///
// needed for search/replace functionality
///
+2003-05-26 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * remove same_id from function signatures, adjust
2003-05-19 André Pönitz <poenitz@gmx.net>
* math_cursor.C: boost::format -> bformat all over the place
2003-05-06 Ling Li <ling@caltech.edu>
-
- * Makefile, math_makeboxinset.[Ch]:
- * math_factory.C (createMathInset):
- * math_parser.C (parse1): New support for \makebox.
-
- * math_nestinset.C (drawMarkers, drawMarkers2):
- * math_boxinset.C, math_frameboxinset.C (draw):
- Fix spacing and marker length.
-
+
+ * Makefile, math_makeboxinset.[Ch]:
+ * math_factory.C (createMathInset):
+ * math_parser.C (parse1): New support for \makebox.
+
+ * math_nestinset.C (drawMarkers, drawMarkers2):
+ * math_boxinset.C, math_frameboxinset.C (draw):
+ Fix spacing and marker length.
+
2003-05-03 John Levon <levon@movementarian.org>
* formula.C:
2003-03-05 Ling Li <ling@caltech.edu>
* math_casesinset.[Ch] (validate): request feature "amsmath"
-
+
2003-03-04 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
-
- * math_braceinset.C (metrics): fix computation of descent
+
+ * math_braceinset.C (metrics): fix computation of descent
2003-03-04 Angus Leeming <leeming@lyx.org>
{}
-Inset * InsetFormula::clone(Buffer const &, bool) const
+Inset * InsetFormula::clone(Buffer const &) const
{
return new InsetFormula(*this);
}
+// Inset * InsetFormula::clone(Buffer const &, bool) const
+// {
+// return new InsetFormula(*this);
+// }
+
+
void InsetFormula::write(Buffer const *, ostream & os) const
{
WriteStream wi(os, false, false);
lyxerr << "this is size 1\n";
if (par_->cell(0)[0]->asFontInset()) {
lyxerr << "this is a font inset \n";
- lyxerr << "replacing " << par_.nucleus()->cell(0) <<
+ lyxerr << "replacing " << par_.nucleus()->cell(0) <<
" with " << par_->cell(0)[0]->cell(0) << "\n";
}
}
parent().par_->write(wi);
return STRCONV(ls.str());
}
-
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
void validate(LaTeXFeatures & features) const;
///
///
InsetFormulaBase();
///
- Inset * clone(Buffer const &, bool same_id = false) const = 0;
+ 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
}
-Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
+Inset * InsetFormulaMacro::clone(Buffer const &) const
{
return new InsetFormulaMacro(*this);
}
+// Inset * InsetFormulaMacro::clone(Buffer const &, bool) const
+// {
+// return new InsetFormulaMacro(*this);
+// }
+
+
void InsetFormulaMacro::write(Buffer const *, ostream & os) const
{
os << "FormulaMacro ";
int docbook(Buffer const *, std::ostream &, bool mixcont) const;
///
- Inset * clone(Buffer const &, bool same_id = false) const;
+ Inset * clone(Buffer const &) const;
+ ///
+ //Inset * clone(Buffer const &, bool same_id) const;
///
Inset::Code lyxCode() const;
///
InsetList::iterator it = insetlist.begin();
InsetList::iterator end = insetlist.end();
for (; it != end; ++it) {
- it.setInset(it.getInset()->clone(**buffer_, false));
+ it.setInset(it.getInset()->clone(**buffer_));
// tell the new inset who is the boss now
it.getInset()->parOwner(this);
}
LyXTabular::LyXTabular(BufferParams const & bp,
- InsetTabular * inset, LyXTabular const & lt,
- bool same_id)
+ InsetTabular * inset, LyXTabular const & lt)
{
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)
}
+// 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)
+ InsetTabular * inset)
{
- LyXTabular * result = new LyXTabular(bp, inset, *this, same_id);
+ LyXTabular * result = new LyXTabular(bp, inset, *this);
#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!
}
+// 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)
InsetTabular *, int columns_arg, int rows_arg);
///
LyXTabular(BufferParams const &,
- InsetTabular *, LyXTabular const &, bool same_id = false);
+ 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 *, bool same_id = false);
+ 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;