2001-07-29 10:42:11 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file ControlThesaurus.h
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author John Levon
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-07-29 10:42:11 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#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
|