*
* \author Jürgen Vigna
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#ifndef FORM_DOCUMENT_H
#define FORM_DOCUMENT_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "FormBaseDeprecated.h"
+#include "FormDialogView.h"
+#include "BranchList.h"
#include <boost/scoped_ptr.hpp>
+#include "lyx_forms.h"
#include <vector>
-class Combox;
class BufferParams;
+namespace lyx {
+namespace frontend {
+
+class ControlDocument;
+class FormColorpicker;
struct FD_document;
struct FD_document_paper;
struct FD_document_class;
struct FD_document_language;
struct FD_document_options;
struct FD_document_bullet;
+struct FD_document_branch;
/** This class provides an XForms implementation of the FormDocument dialog.
- The table-layout-form here changes values for latex-tabulars
+ * The table-layout-form here changes values for latex-tabulars
*/
-class FormDocument : public FormBaseBD {
+class FormDocument
+ : public FormController<ControlDocument, FormView<FD_document> > {
public:
- FormDocument(LyXView &, Dialogs &);
- ///
- static void ComboInputCB(int, void *, Combox *);
+ FormDocument(Dialog &);
private:
- /// Pointer to the actual instantiation of the ButtonController.
- virtual xformsBC & bc();
/** Redraw the form (on receipt of a Signal indicating, for example,
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);
+ virtual ButtonPolicy::SMInput input( FL_OBJECT *, long);
/// Update the dialog.
virtual void update();
/// Apply from dialog
virtual void apply();
- /// Cancel from dialog
- virtual void cancel();
///
- virtual FL_FORM * form() const;
-
+ void branch_input(FL_OBJECT *);
///
void ChoiceBulletSize(FL_OBJECT * ob, long);
///
///
void checkReadOnly();
///
- void CheckChoiceClass(FL_OBJECT * ob, long);
+ void CheckChoiceClass();
///
void UpdateLayoutDocument(BufferParams const & params);
///
void options_update(BufferParams const &);
///
void bullets_update(BufferParams const &);
+ ///
+ void branch_update(BufferParams const &);
///
void paper_apply(BufferParams &);
///
bool language_apply(BufferParams &);
///
- bool options_apply(BufferParams &);
+ void options_apply(BufferParams &);
///
void bullets_apply(BufferParams &);
-
- ///
- void paper_apply();
- ///
- bool class_apply();
///
- bool language_apply();
- ///
- bool options_apply();
- ///
- void bullets_apply();
+ void branch_apply(BufferParams &);
+
+ void rebuild_all_branches_browser();
+ void rebuild_selected_branches_browser();
/// Real GUI implementation.
- boost::scoped_ptr<FD_document> dialog_;
- ///
boost::scoped_ptr<FD_document_paper> paper_;
///
boost::scoped_ptr<FD_document_class> class_;
///
boost::scoped_ptr<FD_document_bullet> bullets_;
///
+ boost::scoped_ptr<FD_document_branch> branch_;
+ ///
+ boost::scoped_ptr<FormColorpicker> picker_;
+ ///
int ActCell;
///
int Confirmed;
///
FL_OBJECT * fbullet;
///
- boost::scoped_ptr<Combox> combo_language;
- ///
- boost::scoped_ptr<Combox> combo_doc_class;
- /// The ButtonController
- ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
- ///
- std::vector<string> lang_;
+ std::vector<std::string> lang_;
+ /// Contains all legal branches for this doc
+ BranchList branchlist_;
};
-
-inline
-xformsBC & FormDocument::bc()
-{
- return bc_;
-}
+} // namespace frontend
+} // namespace lyx
#endif