+2004-11-24 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * Most insets: rename priv_dispatch to doDispatch
+
2004-11-24 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insettabular.C (tabularFeatures): fix multicolumn handling
{
cur.needsUpdate();
cur.dispatched();
- priv_dispatch(cur, cmd);
+ doDispatch(cur, cmd);
}
-void InsetBase::priv_dispatch(LCursor & cur, FuncRequest &)
+void InsetBase::doDispatch(LCursor & cur, FuncRequest &)
{
cur.noUpdate();
cur.undispatched();
InsetBase();
InsetBase(InsetBase const &);
// the real dispatcher
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const = 0;
};
}
-void InsetBibitem::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetBibitem::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
}
default:
- InsetCommand::priv_dispatch(cur, cmd);
+ InsetCommand::doDispatch(cur, cmd);
break;
}
}
OutputParams const &) const;
protected:
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void InsetBibtex::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetBibtex::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
}
default:
- InsetCommand::priv_dispatch(cur, cmd);
+ InsetCommand::doDispatch(cur, cmd);
break;
}
}
///
void validate(LaTeXFeatures &) const;
protected:
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void InsetBox::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetBox::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
InsetBoxMailer(*this).showDialog(&cur.bv());
break;
}
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
};
protected:
InsetBox(InsetBox const &);
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
friend class InsetBoxParams;
}
-void InsetBranch::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetBranch::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
case LFUN_MOUSE_PRESS:
if (cmd.button() != mouse_button::button3)
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
else
cur.undispatched();
break;
if (cmd.button() == mouse_button::button3 && hitButton(cmd))
InsetBranchMailer(*this).showDialog(&cur.bv());
else
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
break;
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
protected:
InsetBranch(InsetBranch const &);
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
friend class InsetBranchParams;
}
-void InsetCharStyle::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetCharStyle::doDispatch(LCursor & cur, FuncRequest & cmd)
{
setStatus(Inlined);
switch (cmd.action) {
if (cmd.button() == mouse_button::button3)
has_label_ = !has_label_;
else
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
break;
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
protected:
InsetCharStyle(InsetCharStyle const &);
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
}
-void InsetCollapsable::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
{
-// lyxerr << "InsetCollapsable::priv_dispatch (begin): cmd: " << cmd
-// << " button y: " << button_dim.y2
-// << " coll/inline/open: " << status_ << endl;
+// lyxerr << "InsetCollapsable::doDispatch (begin): cmd: " << cmd
+// << " button y: " << button_dim.y2
+// << " coll/inline/open: " << status_ << endl;
- lyxerr << "InsetCollapsable::priv_dispatch (begin): cmd: " << cmd
+ lyxerr << "InsetCollapsable::doDispatch (begin): cmd: " << cmd
<< " cur: " << cur << " bvcur: " << cur.bv().cursor() << endl;
switch (cmd.action) {
case LFUN_MOUSE_PRESS:
if (status_ == Inlined)
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
else if (status_ == Open && !hitButton(cmd))
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
else
cur.noUpdate();
break;
case LFUN_MOUSE_MOTION:
if (status_ == Inlined)
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
else if (status_ == Open && !hitButton(cmd))
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
break;
case LFUN_MOUSE_RELEASE:
cur.bv().cursor() = cur;
} else {
lyxerr << "InsetCollapsable::lfunMouseRelease 3" << endl;
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
}
break;
}
case Inlined:
lyxerr << "InsetCollapsable::lfunMouseRelease 4" << endl;
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
break;
}
break;
break;
default:
- InsetText::priv_dispatch(cur, cmd);
+ InsetText::doDispatch(cur, cmd);
break;
}
}
///
void setStatus(CollapseStatus st);
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
///
void dimension_collapsed(Dimension &) const;
///
}
-void InsetCommand::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetCommand::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_REFRESH:
}
default:
- InsetOld::priv_dispatch(cur, cmd);
+ InsetOld::doDispatch(cur, cmd);
break;
}
protected:
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
///
std::string const getCommand() const { return p_.getCommand(); }
///
}
-void InsetERT::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetERT::doDispatch(LCursor & cur, FuncRequest & cmd)
{
- //lyxerr << "\nInsetERT::priv_dispatch (begin): cmd: " << cmd << endl;
+ //lyxerr << "\nInsetERT::doDispatch (begin): cmd: " << cmd << endl;
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
}
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
protected:
InsetERT(InsetERT const &);
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
private:
}
-void InsetExternal::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetExternal::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
break;
default:
- InsetOld::priv_dispatch(cur, cmd);
+ InsetOld::doDispatch(cur, cmd);
}
}
protected:
InsetExternal(InsetExternal const &);
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void InsetFloat::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetFloat::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
InsetFloatMailer(*this).showDialog(&cur.bv());
break;
}
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
///
InsetFloatParams const & params() const { return params_; }
protected:
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void InsetGraphics::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetGraphics::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_GRAPHICS_EDIT: {
break;
default:
- InsetOld::priv_dispatch(cur, cmd);
+ InsetOld::doDispatch(cur, cmd);
break;
}
}
protected:
InsetGraphics(InsetGraphics const &);
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
friend class InsetGraphicsMailer;
}
-void InsetInclude::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetInclude::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
break;
default:
- InsetOld::priv_dispatch(cur, cmd);
+ InsetOld::doDispatch(cur, cmd);
break;
}
}
protected:
InsetInclude(InsetInclude const &);
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
} // namespace anon
-void InsetLabel::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetLabel::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
}
default:
- InsetCommand::priv_dispatch(cur, cmd);
+ InsetCommand::doDispatch(cur, cmd);
break;
}
}
int docbook(Buffer const &, std::ostream &,
OutputParams const &) const;
protected:
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
};
}
-void InsetNote::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetNote::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
if (cmd.button() == mouse_button::button3 && hitButton(cmd))
InsetNoteMailer(*this).showDialog(&cur.bv());
else
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
protected:
InsetNote(InsetNote const &);
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
friend class InsetNoteParams;
{}
-void InsetRef::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetRef::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_MOUSE_PRESS:
return;
default:
- return InsetCommand::priv_dispatch(cur, cmd);
+ return InsetCommand::doDispatch(cur, cmd);
}
}
InsetRef(InsetRef const &);
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const {
return std::auto_ptr<InsetBase>(new InsetRef(*this));
}
-void InsetTabular::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
{
lyxerr << "# InsetTabular::dispatch: cmd: " << cmd << endl;
//lyxerr << " cur:\n" << cur << endl;
protected:
InsetTabular(InsetTabular const &);
- ///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
private:
}
-void InsetText::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd)
{
- //lyxerr << "InsetText::priv_dispatch: " << cmd.action << " " << endl;
+ //lyxerr << "InsetText::doDispatch: " << cmd.action << " " << endl;
setViewCache(&cur.bv());
bool was_empty = paragraphs().begin()->empty() && paragraphs().size() == 1;
#warning John, have a look here. (Lgb)
#endif
ParagraphList & pl = paragraphs();
-
+
ParagraphList::iterator pit = plist.begin();
ParagraphList::iterator ins = pl.insert(pl.end(), *pit);
++pit;
protected:
InsetText(InsetText const &);
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void InsetVSpace::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetVSpace::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
break;
default:
- InsetOld::priv_dispatch(cur, cmd);
+ InsetOld::doDispatch(cur, cmd);
break;
}
}
protected:
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
-
+
///
VSpace space_;
};
}
-void InsetWrap::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void InsetWrap::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
InsetWrapMailer(*this).showDialog(&cur.bv());
break;
}
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
default:
- InsetCollapsable::priv_dispatch(cur, cmd);
+ InsetCollapsable::doDispatch(cur, cmd);
break;
}
}
InsetWrapParams const & params() const { return params_; }
protected:
///
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
}
-void UpdatableInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void UpdatableInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
//case LFUN_MOUSE_RELEASE:
protected:
/// An updatable inset could handle lyx editing commands
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
/// scrolls to absolute position in bufferview-workwidth * sx units
void scroll(BufferView &, float sx) const;
/// scrolls offset pixels
* To add a new function:
* - add a new enum constant immediately before LFUN_LASTACTION
* - add an appropriate line in LyXAction.C
- * - add a branch to a suitable ::priv_dispatch() method
+ * - add a branch to a suitable ::doDispatch() method
* - add correct test to the corresponding ::getStatus() method
*/
* They are managed in LyXAction.C and handled in various
* ::dispatch() functions, starting with LyXFunc.C:dispatch(),
* BufferView_pimpl::dispatch(), LCursor::dispatch() and
- * Inset*::priv_dispatch();
+ * Inset*::doDispatch();
*/
enum kb_action {
LFUN_UNKNOWN_ACTION = -1,
+2004-11-24 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * Most insets: rename priv_dispatch to doDispatch
+
2004-11-24 Lars Gullik Bjonnes <larsbj@gullik.net>
* math_hullinset.C (operator): use common semantics
}
-void MathGridInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
//lyxerr << "*** MathGridInset: request: " << cmd << endl;
switch (cmd.action) {
// GridInsetMailer(*this).showDialog();
// return DispatchResult(true, true);
//}
- MathNestInset::priv_dispatch(cur, cmd);
+ MathNestInset::doDispatch(cur, cmd);
break;
case LFUN_INSET_DIALOG_UPDATE:
break;
default:
- MathNestInset::priv_dispatch(cur, cmd);
+ MathNestInset::doDispatch(cur, cmd);
}
}
//void octave(OctaveStream &) const;
protected:
- ///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
}
-void MathHullInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathHullInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_FINISHED_RIGHT:
case LFUN_FINISHED_UP:
case LFUN_FINISHED_DOWN:
- MathGridInset::priv_dispatch(cur, cmd);
+ MathGridInset::doDispatch(cur, cmd);
notifyCursorLeaves(cur);
break;
cur.idx() = 0;
cur.pos() = cur.lastpos();
}
- MathGridInset::priv_dispatch(cur, cmd);
+ MathGridInset::doDispatch(cur, cmd);
break;
case LFUN_MATH_NUMBER:
}
default:
- MathGridInset::priv_dispatch(cur, cmd);
+ MathGridInset::doDispatch(cur, cmd);
break;
}
}
protected:
MathHullInset(MathHullInset const &);
- virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
/// do we want to handle this event?
bool getStatus(LCursor & cur, FuncRequest const & cmd,
}
-void MathMBoxInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathMBoxInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
text_.dispatch(cur, cmd);
}
void metrics(MetricsInfo & mi, Dimension & dim) const;
/// draw according to cached metrics
void draw(PainterInfo &, int x, int y) const;
- ///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
-
///
bool inMathed() const { return false; }
///
///
void getCursorPos(LCursor const & cur, int & x, int & y) const;
protected:
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+
///
mutable LyXText text_;
///
}
-void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
//lyxerr << "MathNestInset: request: " << cmd << std::endl;
//CursorSlice sl = cur.current();
}
default:
- MathDimInset::priv_dispatch(cur, cmd);
+ MathDimInset::doDispatch(cur, cmd);
break;
}
}
protected:
///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
/// do we want to handle this event?
bool getStatus(LCursor & cur, FuncRequest const & cmd,
FuncStatus & status) const;
}
-void MathScriptInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathScriptInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
//lyxerr << "MathScriptInset: request: " << cmd << std::endl;
return;
}
- MathNestInset::priv_dispatch(cur, cmd);
+ MathNestInset::doDispatch(cur, cmd);
}
/// say whether we have displayed limits
void infoize2(std::ostream & os) const;
protected:
- ///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
/// returns x offset for main part
}
-void RefInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY:
break;
default:
- CommandInset::priv_dispatch(cur, cmd);
+ CommandInset::doDispatch(cur, cmd);
break;
}
}
{
if (cell(1).empty()) {
os << "<xref linkend=\"" << sgml::cleanID(buf, runparams, asString(cell(0)));
- if (runparams.flavor == OutputParams::XML)
+ if (runparams.flavor == OutputParams::XML)
os << "\"/>";
else
os << "\">";
///
static std::string const & getName(int type);
protected:
- ///
- void priv_dispatch(LCursor & cur, FuncRequest & cmd);
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
};
#endif