#endif
#include "ControlSearch.h"
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "Dialogs.h"
#include "Liason.h"
#include "buffer.h"
#include "lyxfind.h"
-#include "debug.h"
#include "gettext.h"
#include "BufferView.h"
#include "support/lstrings.h"
-#include <boost/bind.hpp>
-
using Liason::setMinibuffer;
+
ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
: ControlDialogBD(lv, d)
-{
- d_.showSearch = boost::bind(&ControlSearch::show, this);
-
- // perhaps in the future we'd like a
- // "search again" button/keybinding
- // d_.searchAgain.connect(SigC::slot(this, &ControlSearch::FindNext));
-}
+{}
void ControlSearch::find(string const & search,
bool casesensitive, bool matchword, bool forward) const
{
- bool const found = LyXFind(lv_.view(), search,
- forward, false, casesensitive, matchword);
+ bool const found = lyxfind::LyXFind(lv_.view(), search,
+ forward, casesensitive,
+ matchword);
if (!found)
setMinibuffer(&lv_, _("String not found!"));
// move on to the next instance once the present instance has been
// changed
bool const once = !all;
- int const replace_count = LyXReplace(lv_.view(),
- search, replace, true, casesensitive,
- matchword, all, once);
+ int const replace_count =
+ lyxfind::LyXReplace(lv_.view(),
+ search, replace, true, casesensitive,
+ matchword, all, once);
if (replace_count == 0) {
setMinibuffer(&lv_, _("String not found!"));