]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormDocument.h
Change the semantics of 'none' and 'auto' viewers/editors: 'none' means now
[lyx.git] / src / frontends / xforms / FormDocument.h
index ad3a5a34065f6a7af3a303a22dd624522410d6ea..429d036e796c9bda8e74cbcdba8b2ef5f34322f3 100644 (file)
@@ -6,39 +6,42 @@
  *
  * \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
 
-
-#include "FormBase.h"
+#include "FormDialogView.h"
+#include "BranchList.h"
 
 #include <boost/scoped_ptr.hpp>
 
+#include "lyx_forms.h"
 #include <vector>
 
-class ControlDocument;
-
-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
  */
-class FormDocument : public FormCB<ControlDocument, FormDB<FD_document> > {
+class FormDocument
+       : public FormController<ControlDocument, FormView<FD_document> > {
 public:
-       FormDocument();
-       ///
-       static void ComboInputCB(int, void *, Combox *);
+       FormDocument(Dialog &);
 private:
        /** Redraw the form (on receipt of a Signal indicating, for example,
            that the xforms colours have been re-mapped). */
@@ -52,6 +55,8 @@ private:
        /// Apply from dialog
        virtual void apply();
 
+       ///
+       void branch_input(FL_OBJECT *);
        ///
        void ChoiceBulletSize(FL_OBJECT * ob, long);
        ///
@@ -81,6 +86,8 @@ private:
        void options_update(BufferParams const &);
        ///
        void bullets_update(BufferParams const &);
+       ///
+       void branch_update(BufferParams const &);
 
        ///
        void paper_apply(BufferParams &);
@@ -89,9 +96,14 @@ private:
        ///
        bool language_apply(BufferParams &);
        ///
-       bool options_apply(BufferParams &);
+       void options_apply(BufferParams &);
        ///
        void bullets_apply(BufferParams &);
+       ///
+       void branch_apply(BufferParams &);
+
+       void rebuild_all_branches_browser();
+       void rebuild_selected_branches_browser();
 
        /// Real GUI implementation.
        boost::scoped_ptr<FD_document_paper>    paper_;
@@ -104,6 +116,10 @@ private:
        ///
        boost::scoped_ptr<FD_document_bullet>   bullets_;
        ///
+       boost::scoped_ptr<FD_document_branch>   branch_;
+       ///
+       boost::scoped_ptr<FormColorpicker> picker_;
+       ///
        int ActCell;
        ///
        int Confirmed;
@@ -114,11 +130,12 @@ private:
        ///
        FL_OBJECT * fbullet;
        ///
-       boost::scoped_ptr<Combox> combo_language;
-       ///
-       boost::scoped_ptr<Combox> combo_doc_class;
-       ///
-       std::vector<string> lang_;
+       std::vector<std::string> lang_;
+       /// Contains all legal branches for this doc
+       BranchList branchlist_;
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif