2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2001 The LyX Team.
9 * ======================================================
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
18 #pragma implementation
22 #include "ButtonControllerBase.h"
23 #include "ControlRef.h"
31 ControlRef::ControlRef(LyXView & lv, Dialogs & d)
32 : ControlCommand(lv, d, LFUN_REF_INSERT)
34 d_.showRef.connect(slot(this, &ControlRef::showInset));
35 d_.createRef.connect(slot(this, &ControlRef::createInset));
39 std::vector<string> const ControlRef::getLabelList() const
41 return lv_.buffer()->getLabelList();
45 void ControlRef::gotoRef(string const & ref) const
47 lv_.getLyXFunc()->Dispatch(LFUN_BOOKMARK_SAVE, "0");
48 lv_.getLyXFunc()->Dispatch(LFUN_REF_GOTO, ref);
52 void ControlRef::gotoBookmark() const
54 lv_.getLyXFunc()->Dispatch(LFUN_BOOKMARK_GOTO, "0");