2001-07-29 10:42:11 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ControlThesaurus.h
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CONTROLTHESAURUS_H
|
|
|
|
#define CONTROLTHESAURUS_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "LString.h"
|
|
|
|
#include "Thesaurus.h"
|
2002-01-16 14:47:58 +00:00
|
|
|
#include "ControlDialog_impl.h"
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
/** A controller for Thesaurus dialogs.
|
|
|
|
*/
|
2002-01-16 14:47:58 +00:00
|
|
|
class ControlThesaurus : public ControlDialogBD {
|
2001-07-29 10:42:11 +00:00
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlThesaurus(LyXView &, Dialogs &);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-07-29 10:42:11 +00:00
|
|
|
/// replace the particular string
|
|
|
|
void replace(string const & newstr);
|
|
|
|
|
|
|
|
/// show dialog
|
|
|
|
virtual void showEntry(string const & str);
|
|
|
|
|
2002-01-13 01:46:33 +00:00
|
|
|
/// get meanings
|
|
|
|
Thesaurus::Meanings const & getMeanings(string const & str);
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-07-29 10:42:11 +00:00
|
|
|
/// the text
|
|
|
|
string const & text() {
|
|
|
|
return oldstr_;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// last string looked up
|
|
|
|
string laststr_;
|
|
|
|
|
|
|
|
/// entries for last string
|
2002-01-13 01:46:33 +00:00
|
|
|
Thesaurus::Meanings meanings_;
|
2001-07-29 10:42:11 +00:00
|
|
|
|
|
|
|
/// original string
|
|
|
|
string oldstr_;
|
|
|
|
|
|
|
|
/// not needed.
|
|
|
|
virtual void apply() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLTHESAURUS_H
|