#include "InsetRef.h"
#include "Buffer.h"
-#include "buffer_funcs.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
{}
-void InsetRef::initView()
-{
- // We need an update of the Buffer reference cache. This is achieved by
- // updateLabel().
- lyx::updateLabels(buffer());
-}
-
-
bool InsetRef::isCompatibleCommand(string const & s) {
//FIXME This is likely not the best way to handle this.
//But this stuff is hardcoded elsewhere already.
}
-void InsetRef::doDispatch(Cursor & cur, FuncRequest & cmd)
-{
- switch (cmd.action) {
- case LFUN_MOUSE_RELEASE:
- // Eventually trigger dialog with button 3 not 1
- if (cmd.button() == mouse_button::button3)
- lyx::dispatch(FuncRequest(LFUN_LABEL_GOTO,
- getParam("reference")));
- else
- InsetCommand::doDispatch(cur, cmd);
- break;
-
- default:
- InsetCommand::doDispatch(cur, cmd);
- }
-}
-
-
docstring InsetRef::screenLabel() const
{
return screen_label_;
}
-void InsetRef::addToToc(ParConstIterator const & cpit) const
+void InsetRef::addToToc(DocIterator const & cpit)
{
docstring const & label = getParam("reference");
if (buffer().insetLabel(label))