X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormDocument.h;h=429d036e796c9bda8e74cbcdba8b2ef5f34322f3;hb=d5443737342903de489d527802cd2cdd38987d74;hp=2805d4cf763b0cf0dc78305241c6a6b97ca0e165;hpb=c9dbe4fd82bf88c1b8c8abb7be24f86c6ec25e3f;p=lyx.git diff --git a/src/frontends/xforms/FormDocument.h b/src/frontends/xforms/FormDocument.h index 2805d4cf76..429d036e79 100644 --- a/src/frontends/xforms/FormDocument.h +++ b/src/frontends/xforms/FormDocument.h @@ -1,118 +1,80 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright (C) 2000 The LyX Team. +/** + * \file FormDocument.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * @author Jürgen Vigna + * \author Jürgen Vigna * - *======================================================*/ + * Full author contact details are available in file CREDITS. + */ #ifndef FORM_DOCUMENT_H #define FORM_DOCUMENT_H -#include "FormBase.h" -#include +#include "FormDialogView.h" +#include "BranchList.h" -#ifdef __GNUG_ -#pragma interface -#endif +#include + +#include "lyx_forms.h" +#include -class LyXView; -class Dialogs; -class Combox; class BufferParams; -struct FD_form_tabbed_document; -struct FD_form_doc_paper; -struct FD_form_doc_class; -struct FD_form_doc_language; -struct FD_form_doc_options; -struct FD_form_doc_bullet; +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 Popup. - The table-layout-form here changes values for latex-tabulars - @author Jürgen Vigna +/** This class provides an XForms implementation of the FormDocument dialog. + * The table-layout-form here changes values for latex-tabulars */ -class FormDocument : public FormBaseBD { +class FormDocument + : public FormController > { public: - /// #FormDocument x(Communicator ..., Popups ...);# - FormDocument(LyXView *, Dialogs *); - /// - ~FormDocument(); - /// - static void ComboInputCB(int, void *, Combox *); - + FormDocument(Dialog &); private: - /// - enum State { - /// - INPUT, - /// - CHECKCHOICECLASS, - /// - CHOICEBULLETSIZE, - /// - INPUTBULLETLATEX, - /// - BULLETDEPTH1, - /// - BULLETDEPTH2, - /// - BULLETDEPTH3, - /// - BULLETDEPTH4, - /// - BULLETPANEL1, - /// - BULLETPANEL2, - /// - BULLETPANEL3, - /// - BULLETPANEL4, - /// - BULLETPANEL5, - /// - BULLETPANEL6, - /// - BULLETBMTABLE - }; + /** 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 ); - /// Update the popup. + virtual ButtonPolicy::SMInput input( FL_OBJECT *, long); + /// Update the dialog. virtual void update(); - /// Apply from popup + /// Apply from dialog virtual void apply(); - /// Cancel from popup - virtual void cancel(); - - /// - virtual FL_FORM * form() const; /// - bool CheckDocumentInput(FL_OBJECT * ob, long); + void branch_input(FL_OBJECT *); /// void ChoiceBulletSize(FL_OBJECT * ob, long); /// void InputBulletLaTeX(FL_OBJECT * ob, long); /// - void BulletDepth(FL_OBJECT * ob, State); + void BulletDepth(FL_OBJECT * ob); /// - void BulletPanel(FL_OBJECT * ob, State); + void BulletPanel(FL_OBJECT * ob); /// void BulletBMTable(FL_OBJECT * ob, long); /// - void checkMarginValues(); - /// void checkReadOnly(); /// - void CheckChoiceClass(FL_OBJECT * ob, long); + void CheckChoiceClass(); /// void UpdateLayoutDocument(BufferParams const & params); + /// + void UpdateClassParams(BufferParams const & params); /// void paper_update(BufferParams const &); @@ -124,43 +86,39 @@ private: void options_update(BufferParams const &); /// void bullets_update(BufferParams const &); - - /// - void paper_apply(); - /// - bool class_apply(); - /// - bool language_apply(); /// - bool options_apply(); - /// - void bullets_apply(); + void branch_update(BufferParams const &); - /// Typedefinitions from the fdesign produced Header file - FD_form_tabbed_document * build_tabbed_document(); /// - FD_form_doc_paper * build_doc_paper(); + void paper_apply(BufferParams &); + /// + bool class_apply(BufferParams &); /// - FD_form_doc_class * build_doc_class(); + bool language_apply(BufferParams &); /// - FD_form_doc_language * build_doc_language(); + void options_apply(BufferParams &); /// - FD_form_doc_options * build_doc_options(); + void bullets_apply(BufferParams &); /// - FD_form_doc_bullet * build_doc_bullet(); + void branch_apply(BufferParams &); + + void rebuild_all_branches_browser(); + void rebuild_selected_branches_browser(); /// Real GUI implementation. - FD_form_tabbed_document * dialog_; + boost::scoped_ptr paper_; /// - FD_form_doc_paper * paper_; + boost::scoped_ptr class_; /// - FD_form_doc_class * class_; + boost::scoped_ptr language_; /// - FD_form_doc_language * language_; + boost::scoped_ptr options_; /// - FD_form_doc_options * options_; + boost::scoped_ptr bullets_; /// - FD_form_doc_bullet * bullets_; + boost::scoped_ptr branch_; + /// + boost::scoped_ptr picker_; /// int ActCell; /// @@ -172,9 +130,12 @@ private: /// FL_OBJECT * fbullet; /// - Combox * combo_language; - /// - Combox * combo_doc_class; + std::vector lang_; + /// Contains all legal branches for this doc + BranchList branchlist_; }; +} // namespace frontend +} // namespace lyx + #endif