*
* LyX, The Document Processor
*
- * Copyright (C) 2000 The LyX Team.
+ * Copyright 2000-2001 The LyX Team.
*
* @author Jürgen Vigna
*
#ifndef FORM_DOCUMENT_H
#define FORM_DOCUMENT_H
-#include "FormBase.h"
#include <vector>
+#include <boost/smart_ptr.hpp>
#ifdef __GNUG_
#pragma interface
#endif
-class LyXView;
-class Dialogs;
+#include "FormBaseDeprecated.h"
+
class Combox;
class BufferParams;
struct FD_form_doc_options;
struct FD_form_doc_bullet;
-/** This class provides an XForms implementation of the FormDocument Popup.
+/** This class provides an XForms implementation of the FormDocument dialog.
The table-layout-form here changes values for latex-tabulars
@author Jürgen Vigna
*/
class FormDocument : public FormBaseBD {
public:
- /// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *);
///
- ~FormDocument();
- ///
static void ComboInputCB(int, void *, Combox *);
-
private:
///
enum State {
///
BULLETBMTABLE
};
+ /// Pointer to the actual instantiation of the ButtonController.
+ virtual xformsBC & bc();
/** Redraw the form (on receipt of a Signal indicating, for example,
- that the xform colours have been re-mapped). */
+ that the xforms colours have been re-mapped). */
virtual void redraw();
/// Build the dialog
virtual void build();
/// Filter the inputs
virtual bool input( FL_OBJECT *, long );
- /// Update the popup.
+ /// Update the dialog.
virtual void update();
- /// Apply from popup
+ /// Apply from dialog
virtual void apply();
- /// Cancel from popup
+ /// Cancel from dialog
virtual void cancel();
///
///
void bullets_apply();
- /// Typedefinitions from the fdesign produced Header file
+ /// Fdesign generated methods
FD_form_tabbed_document * build_tabbed_document();
///
FD_form_doc_paper * build_doc_paper();
FD_form_doc_bullet * build_doc_bullet();
/// Real GUI implementation.
- FD_form_tabbed_document * dialog_;
+ boost::scoped_ptr<FD_form_tabbed_document> dialog_;
///
- FD_form_doc_paper * paper_;
+ boost::scoped_ptr<FD_form_doc_paper> paper_;
///
- FD_form_doc_class * class_;
+ boost::scoped_ptr<FD_form_doc_class> class_;
///
- FD_form_doc_language * language_;
+ boost::scoped_ptr<FD_form_doc_language> language_;
///
- FD_form_doc_options * options_;
+ boost::scoped_ptr<FD_form_doc_options> options_;
///
- FD_form_doc_bullet * bullets_;
+ boost::scoped_ptr<FD_form_doc_bullet> bullets_;
///
int ActCell;
///
///
FL_OBJECT * fbullet;
///
- Combox * combo_language;
+ boost::scoped_ptr<Combox> combo_language;
///
- Combox * combo_doc_class;
+ boost::scoped_ptr<Combox> combo_doc_class;
+ /// The ButtonController
+ ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
};
+
+inline
+xformsBC & FormDocument::bc()
+{
+ return bc_;
+}
+
#endif