2001-03-06 10:20:33 +00:00
|
|
|
/**
|
|
|
|
* \file FormSearch.h
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMSEARCH_H
|
|
|
|
#define FORMSEARCH_H
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
#include <boost/smart_ptr.hpp>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "FormBaseDeprecated.h"
|
2001-03-06 10:20:33 +00:00
|
|
|
|
|
|
|
struct FD_form_search;
|
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the FormSearch Dialog.
|
|
|
|
*/
|
|
|
|
class FormSearch : public FormBaseBD {
|
|
|
|
public:
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
|
|
|
FormSearch(LyXView *, Dialogs *);
|
2001-03-06 10:20:33 +00:00
|
|
|
|
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Pointer to the actual instantiation of the ButtonController.
|
|
|
|
virtual xformsBC & bc();
|
2001-03-06 10:20:33 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Filter the inputs
|
|
|
|
virtual bool input(FL_OBJECT *, long);
|
2001-03-06 10:20:33 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Build the popup
|
|
|
|
virtual void build();
|
|
|
|
|
|
|
|
/// Update the popup
|
|
|
|
virtual void update();
|
|
|
|
|
|
|
|
/// Searches occurance of string
|
|
|
|
/// if argument=true forward search otherwise backward search
|
|
|
|
void Find(bool const = true);
|
|
|
|
/// if argument=false replace once otherwise replace all
|
|
|
|
/// Replaces occurance of string
|
|
|
|
void Replace(bool const = false);
|
2001-03-06 10:20:33 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
///
|
|
|
|
virtual FL_FORM * form() const;
|
2001-03-06 10:20:33 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Typedefinitions from the fdesign produced Header file
|
|
|
|
FD_form_search * build_search();
|
2001-03-06 10:20:33 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
/// Real GUI implementation.
|
|
|
|
boost::scoped_ptr<FD_form_search> dialog_;
|
|
|
|
/// The ButtonController
|
|
|
|
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
|
2001-03-06 10:20:33 +00:00
|
|
|
};
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
inline
|
|
|
|
xformsBC & FormSearch::bc()
|
|
|
|
{
|
|
|
|
return bc_;
|
|
|
|
}
|
2001-03-06 10:20:33 +00:00
|
|
|
#endif
|