2000-09-25 15:59:27 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/* This file is part of
|
|
|
|
|
* ======================================================
|
|
|
|
|
*
|
|
|
|
|
* LyX, The Document Processor
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2000 The LyX Team.
|
|
|
|
|
*
|
|
|
|
|
* @author J<EFBFBD>rgen Vigna
|
|
|
|
|
*
|
|
|
|
|
*======================================================*/
|
|
|
|
|
|
|
|
|
|
#ifndef FORM_PARAGRAPH_H
|
|
|
|
|
#define FORM_PARAGRAPH_H
|
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
#include <boost/smart_ptr.hpp>
|
2000-09-25 15:59:27 +00:00
|
|
|
|
|
|
|
|
|
#ifdef __GNUG_
|
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
|
#include "FormBaseDeprecated.h"
|
|
|
|
|
#if 1
|
|
|
|
|
#include "lyxparagraph.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2000-09-25 15:59:27 +00:00
|
|
|
|
struct FD_form_tabbed_paragraph;
|
|
|
|
|
struct FD_form_paragraph_general;
|
|
|
|
|
struct FD_form_paragraph_extra;
|
|
|
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the FormParagraph Popup.
|
2000-10-13 05:57:05 +00:00
|
|
|
|
* @author J<EFBFBD>rgen Vigna
|
2000-09-25 15:59:27 +00:00
|
|
|
|
*/
|
2000-10-13 05:57:05 +00:00
|
|
|
|
class FormParagraph : public FormBaseBD {
|
2000-09-25 15:59:27 +00:00
|
|
|
|
public:
|
|
|
|
|
///
|
2000-10-10 01:33:42 +00:00
|
|
|
|
FormParagraph(LyXView *, Dialogs *);
|
2000-09-25 15:59:27 +00:00
|
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
|
/// Pointer to the actual instantiation of the ButtonController.
|
|
|
|
|
virtual xformsBC & bc();
|
2000-11-10 17:29:47 +00:00
|
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
2001-03-05 19:02:40 +00:00
|
|
|
|
that the xforms colours have been re-mapped). */
|
2000-11-10 17:29:47 +00:00
|
|
|
|
virtual void redraw();
|
2000-10-10 01:33:42 +00:00
|
|
|
|
/// Build the popup
|
2000-10-13 05:57:05 +00:00
|
|
|
|
virtual void build();
|
2000-10-10 01:33:42 +00:00
|
|
|
|
/// Apply from popup
|
2000-10-13 05:57:05 +00:00
|
|
|
|
virtual void apply();
|
2000-10-10 01:33:42 +00:00
|
|
|
|
/// Update the popup.
|
2000-10-24 13:13:59 +00:00
|
|
|
|
virtual void update();
|
2000-10-10 01:33:42 +00:00
|
|
|
|
/// Filter the inputs on callback from xforms
|
|
|
|
|
virtual bool input(FL_OBJECT * ob, long);
|
2000-09-25 15:59:27 +00:00
|
|
|
|
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
|
|
|
|
virtual FL_FORM * form() const;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
void general_update();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#ifndef NO_PEXTRA
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
|
|
|
|
void extra_update();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#endif
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
|
|
|
|
void general_apply();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#ifndef NO_PEXTRA
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
|
|
|
|
void extra_apply();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#endif
|
2001-03-27 10:44:14 +00:00
|
|
|
|
/// Fdesign generated methods
|
2000-10-10 01:33:42 +00:00
|
|
|
|
FD_form_tabbed_paragraph * build_tabbed_paragraph();
|
|
|
|
|
///
|
|
|
|
|
FD_form_paragraph_general * build_paragraph_general();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
//#ifndef NO_PEXTRA
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
|
|
|
|
FD_form_paragraph_extra * build_paragraph_extra();
|
2001-03-16 00:09:53 +00:00
|
|
|
|
//#endif
|
2000-10-10 01:33:42 +00:00
|
|
|
|
/// Real GUI implementation.
|
2001-03-15 13:37:04 +00:00
|
|
|
|
boost::scoped_ptr<FD_form_tabbed_paragraph> dialog_;
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
|
boost::scoped_ptr<FD_form_paragraph_general> general_;
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#ifndef NO_PEXTRA
|
2000-10-10 01:33:42 +00:00
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
|
boost::scoped_ptr<FD_form_paragraph_extra> extra_;
|
2001-03-16 00:09:53 +00:00
|
|
|
|
#endif
|
2001-03-15 13:37:04 +00:00
|
|
|
|
/// The ButtonController
|
|
|
|
|
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
|
2000-09-25 15:59:27 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
|
xformsBC & FormParagraph::bc()
|
|
|
|
|
{
|
|
|
|
|
return bc_;
|
|
|
|
|
}
|
2000-09-25 15:59:27 +00:00
|
|
|
|
#endif
|