]> git.lyx.org Git - features.git/commitdiff
Rewrote the maths panel so that ALL the popups now derive from FormBaseBD,
authorAngus Leeming <leeming@lyx.org>
Mon, 19 Mar 2001 15:38:22 +0000 (15:38 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 19 Mar 2001 15:38:22 +0000 (15:38 +0000)
cleaning up the logic in the process. Should now be easy to move to a
controller-view split.
Moved the minw_, minh_ bug-fix into the base class. Can now forget about it!

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1793 a592a061-630c-0410-9148-cb99ea01b6c8

67 files changed:
po/POTFILES.in
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs.C
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBaseDeprecated.C
src/frontends/xforms/FormBaseDeprecated.h
src/frontends/xforms/FormBibitem.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormBrowser.C
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormCitation.C
src/frontends/xforms/FormCopyright.C
src/frontends/xforms/FormCredits.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormError.C
src/frontends/xforms/FormExternal.C
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormInclude.C
src/frontends/xforms/FormIndex.C
src/frontends/xforms/FormMaths.C [deleted file]
src/frontends/xforms/FormMaths.h [deleted file]
src/frontends/xforms/FormMathsBitmap.C [new file with mode: 0644]
src/frontends/xforms/FormMathsBitmap.h [new file with mode: 0644]
src/frontends/xforms/FormMathsDeco.C [new file with mode: 0644]
src/frontends/xforms/FormMathsDeco.h [new file with mode: 0644]
src/frontends/xforms/FormMathsDelim.C [new file with mode: 0644]
src/frontends/xforms/FormMathsDelim.h [new file with mode: 0644]
src/frontends/xforms/FormMathsMatrix.C [new file with mode: 0644]
src/frontends/xforms/FormMathsMatrix.h [new file with mode: 0644]
src/frontends/xforms/FormMathsPanel.C [new file with mode: 0644]
src/frontends/xforms/FormMathsPanel.h [new file with mode: 0644]
src/frontends/xforms/FormMathsSpace.C [new file with mode: 0644]
src/frontends/xforms/FormMathsSpace.h [new file with mode: 0644]
src/frontends/xforms/FormMinipage.C
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/FormPreamble.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormPrint.C
src/frontends/xforms/FormRef.C
src/frontends/xforms/FormSearch.C
src/frontends/xforms/FormTabular.C
src/frontends/xforms/FormTabularCreate.C
src/frontends/xforms/FormToc.C
src/frontends/xforms/FormUrl.C
src/frontends/xforms/Makefile.am
src/frontends/xforms/MathsSymbols.C
src/frontends/xforms/MathsSymbols.h
src/frontends/xforms/Toolbar_pimpl.C
src/frontends/xforms/form_maths.C [deleted file]
src/frontends/xforms/form_maths.h [deleted file]
src/frontends/xforms/form_maths_deco.C [new file with mode: 0644]
src/frontends/xforms/form_maths_deco.h [new file with mode: 0644]
src/frontends/xforms/form_maths_delim.C [new file with mode: 0644]
src/frontends/xforms/form_maths_delim.h [new file with mode: 0644]
src/frontends/xforms/form_maths_matrix.C [new file with mode: 0644]
src/frontends/xforms/form_maths_matrix.h [new file with mode: 0644]
src/frontends/xforms/form_maths_panel.C [new file with mode: 0644]
src/frontends/xforms/form_maths_panel.h [new file with mode: 0644]
src/frontends/xforms/form_maths_space.C [new file with mode: 0644]
src/frontends/xforms/form_maths_space.h [new file with mode: 0644]
src/frontends/xforms/forms/form_maths.fd [deleted file]
src/frontends/xforms/forms/form_maths_deco.fd [new file with mode: 0644]
src/frontends/xforms/forms/form_maths_delim.fd [new file with mode: 0644]
src/frontends/xforms/forms/form_maths_matrix.fd [new file with mode: 0644]
src/frontends/xforms/forms/form_maths_panel.fd [new file with mode: 0644]
src/frontends/xforms/forms/form_maths_space.fd [new file with mode: 0644]
src/frontends/xforms/forms/makefile

index d82613cbeb35a82c6f539c670aab5a059ceddd2c..1d44fb6b87aee1fdeba12b718123ad4d5949ef70 100644 (file)
@@ -74,58 +74,67 @@ src/frontends/qt2/paragraphdlgimpl.C
 src/frontends/qt2/tabularcreatedlgimpl.C
 src/frontends/xforms/combox.C
 src/frontends/xforms/FileDialog.C
-src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibitem.C
-src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/form_bibitem.C
 src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/form_bibtex.C
 src/frontends/xforms/form_browser.C
-src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCharacter.C
-src/frontends/xforms/form_citation.C
+src/frontends/xforms/form_character.C
 src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
 src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_credits.C
+src/frontends/xforms/form_copyright.C
 src/frontends/xforms/FormCredits.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_credits.C
 src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
 src/frontends/xforms/FormError.C
-src/frontends/xforms/form_external.C
+src/frontends/xforms/form_error.C
 src/frontends/xforms/FormExternal.C
-src/frontends/xforms/form_filedialog.C
+src/frontends/xforms/form_external.C
 src/frontends/xforms/FormFiledialog.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_filedialog.C
 src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_include.C
+src/frontends/xforms/form_graphics.C
 src/frontends/xforms/FormInclude.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_include.C
 src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
 src/frontends/xforms/FormLog.C
-src/frontends/xforms/form_maths.C
-src/frontends/xforms/FormMaths.C
-src/frontends/xforms/form_minipage.C
+src/frontends/xforms/FormMathsBitmap.C
+src/frontends/xforms/FormMathsDeco.C
+src/frontends/xforms/form_maths_deco.C
+src/frontends/xforms/FormMathsDelim.C
+src/frontends/xforms/form_maths_delim.C
+src/frontends/xforms/FormMathsMatrix.C
+src/frontends/xforms/form_maths_matrix.C
+src/frontends/xforms/FormMathsPanel.C
+src/frontends/xforms/form_maths_panel.C
+src/frontends/xforms/FormMathsSpace.C
+src/frontends/xforms/form_maths_space.C
 src/frontends/xforms/FormMinipage.C
-src/frontends/xforms/form_paragraph.C
+src/frontends/xforms/form_minipage.C
 src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preamble.C
+src/frontends/xforms/form_paragraph.C
 src/frontends/xforms/FormPreamble.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_preamble.C
 src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
 src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
 src/frontends/xforms/FormRef.C
-src/frontends/xforms/form_search.C
+src/frontends/xforms/form_ref.C
 src/frontends/xforms/FormSearch.C
-src/frontends/xforms/form_tabular.C
+src/frontends/xforms/form_search.C
 src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
 src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
 src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
 src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
 src/frontends/xforms/FormVCLog.C
 src/frontends/xforms/input_validators.C
 src/frontends/xforms/Menubar_pimpl.C
index a4146092811e5321610a1261e900aeef3e5ded38..33d830eb41c2f3f27698f38c9284d9ad79d88019 100644 (file)
@@ -1,3 +1,64 @@
+2001-03-19  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * FormBaseDeprecated.[Ch]: rename title as title_.
+       
+       * FormBaseDeprecated.C: restore John's trick to give the dialog a border
+       with limited functionality. It got lost in the MVC merge.
+
+       * FormBaseDeprecated.C:
+       * FormBase.C (show): moved initialisation of minw_, minh_ here.
+
+       * FormBibitem.C (build):
+       * FormBibtex.C (build):
+       * FormBrowser.C (build):
+       * FormCharacter.C (build):
+       * FormCitation.C (build):
+       * FormCopyright.C (build):
+       * FormCredits.C (build):
+       * FormDocument.C (build):
+       * FormError.C (build):
+       * FormExternal.C (build):
+       * FormGraphics.C (build):
+       * FormInclude.C (build):
+       * FormIndex.C (build):
+       * FormMinipage.C (build):
+       * FormParagraph.C (build):
+       * FormPreamble.C (build):
+       * FormPreferences.C (build):
+       * FormPrint.C (build):
+       * FormRef.C (build):
+       * FormSearch.C (build):
+       * FormTabular.C (build):
+       * FormTabularCreate.C (build):
+       * FormToc.C (build):
+       * FormUrl.C (build): removed initialisation of minw_, minh_.
+       
+       * The Maths Panel stuff no longer causes a crash on exit from LyX.
+
+       * FormMaths.[Ch]:
+       * forms/form_maths.fd: removed.
+
+       * forms/form_maths_delim.fd:
+       * forms/form_maths_deco.fd:
+       * forms/form_maths_matrix.fd:
+       * forms/form_maths_space.fd:
+       * forms/form_maths_panel.fd: new files.
+       Split contents of form_maths.fd into 5 new files, one for each form.
+
+       * MathsSymbols.[Ch]: remove class BitmapMenu, renamed and reworked as
+       class FormMathsBitmap in FormMathsBitmap.[Ch].
+
+       * FormMathsPanel.[Ch]:
+       * FormMathsBitmap.[Ch]:
+       * FormMathsDeco.[Ch]:
+       * FormMathsDelim.[Ch]:
+       * FormMathsMatrix.[Ch]:
+       * FormMathsSpace.[Ch]: Split contents of FormMaths into new files,
+       one for each popup. Rewrite so that all the new classes are derived from
+       FormBaseBD. Clean up the logic in the process (I hope!).
+
+       * Makefile.am: added new fils, removed redundant ones.
+
 2001-03-19  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * FormMinipage.C (FormMinipage): add SigC:: namespace specifier.
@@ -16,7 +77,7 @@
 
 2001-03-16  Angus Leeming  <a.leeming@ic.ac.uk>
 
-       * FormMaths.[Ch]: make the FD_ structs to private. Create appropriate
+       * FormMaths.[Ch]: make the FD_ structs private. Create appropriate
        callback methods.
 
        * forms/form_maths.fd: change C_FormBaseCancelCB to
index 7e27ca071fd5b142a0ec9f2f8e1ac732958e97d1..5c6a2e8ff684057213d975b9b5ce892e75f139f1 100644 (file)
@@ -35,7 +35,7 @@
 #include "FormInclude.h"
 #include "FormIndex.h"
 #include "FormLog.h"
-#include "FormMaths.h"
+#include "FormMathsPanel.h"
 #include "FormParagraph.h"
 #include "FormPreamble.h"
 #include "FormPreferences.h"
@@ -72,7 +72,7 @@ Dialogs::Dialogs(LyXView * lv)
        add(new FormInclude(lv, this));
        add(new FormIndex(lv, this));
        add(new FormLog(lv, this));
-       add(new FormMaths(lv, this));
+       add(new FormMathsPanel(lv, this));
        add(new FormParagraph(lv, this));
        add(new FormPreamble(lv, this));
        add(new FormPreferences(lv, this));
index 228e6fb955bfbddb2e44938ade5cc88bdde29dd8..52b889f6566d22b49181326112af50868ecb9a32 100644 (file)
@@ -39,6 +39,11 @@ void FormBase::show()
 {
        if (!form()) {
                build();
+
+               // work around dumb xforms sizing bug
+               minw_ = form()->w;
+               minh_ = form()->h;
+
                fl_set_form_atclose(form(),
                                    C_FormBaseWMHideCB, 0);
        }
index 4838a85dfa45d7fba9068e6ca3d07fa53f3735fa..7c0c0b27fb8ddc0f92bfcf10624b7182f17d5df5 100644 (file)
@@ -54,7 +54,7 @@ extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT * ob, long d)
 
 FormBaseDeprecated::FormBaseDeprecated(LyXView * lv, Dialogs * d,
                                       string const & t)
-       : lv_(lv), d_(d), h_(0), r_(0), title(t), minw_(0), minh_(0)
+       : lv_(lv), d_(d), h_(0), r_(0), title_(t), minw_(0), minh_(0)
 {
        Assert(lv && d);
 }
@@ -85,6 +85,11 @@ void FormBaseDeprecated::show()
 {
        if (!form()) {
                build();
+
+               // work around dumb xforms sizing bug
+               minw_ = form()->w;
+               minh_ = form()->h;
+
                fl_set_form_atclose(form(),
                                    C_FormBaseDeprecatedWMHideCB, 0);
        }
@@ -95,14 +100,22 @@ void FormBaseDeprecated::show()
 
        if (form()->visible) {
                fl_raise_form(form());
+               /* This XMapWindow() will hopefully ensure that
+                * iconified dialogs are de-iconified. Mad props
+                * out to those crazy Xlib guys for forgetting a
+                * XDeiconifyWindow(). At least WindowMaker, when
+                * being notified of the redirected MapRequest will
+                * specifically de-iconify. From source, fvwm2 seems
+                * to do the same.
+                */
+               XMapWindow(fl_get_display(), form()->window);
        } else {
                // calls to fl_set_form_minsize/maxsize apply only to the next
                // fl_show_form(), so connect() comes first.
                connect();
                fl_show_form(form(),
-                            FL_PLACE_MOUSE | FL_FREE_SIZE,
-                            FL_TRANSIENT,
-                            title.c_str());
+                            FL_PLACE_MOUSE | FL_FREE_SIZE, 0,
+                            title_.c_str());
        }
 }
 
index bab644e521a22c8f9b8a724092b18112d4669f21..ffd20f37e442c0a85560da833e8e7ec205bc560b 100644 (file)
@@ -35,8 +35,6 @@ class LyXView;
     @author Angus Leeming
  */
 
-extern "C" int C_FormBaseDeprecatedWMHideCB(FL_FORM *, void *);
-
 class FormBaseDeprecated : public DialogBase {
 public:
        /// Callback functions
@@ -116,7 +114,7 @@ protected: // methods
        /// Redraw connection.
        SigC::Connection r_;
        /// dialog title, displayed by WM.
-       string title;
+       string title_;
 public:
        /// Overcome a dumb xforms sizing bug
        mutable int minw_;
index dd01a436097c6c509d53b45d18c6598f80ae31da..2fb4ddba6b64bc090690c94a42a53b9bfef6d8f8 100644 (file)
@@ -28,10 +28,6 @@ void FormBibitem::build()
 {
        dialog_.reset(build_bibitem());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(dialog_->key,   FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->label, FL_RETURN_CHANGED);
 
index 13334e88b54d16244b9896e9b316612a9ee506e6..b062d719a12bd0868b97f9f48214b1b52da48ed6 100644 (file)
@@ -53,10 +53,6 @@ void FormBibtex::build()
 {
        dialog_.reset(build_bibtex());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(dialog_->database, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->style, FL_RETURN_CHANGED);
 
index 7bd18e9ddf43168e958c2860480db58169d3826e..7641dddec96e30b8f8c24d23bacf56604285f7a0 100644 (file)
@@ -28,10 +28,6 @@ void FormBrowser::build()
 {
        dialog_.reset(build_browser());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // Manage the close button
        bc().setCancel(dialog_->button_close);
        bc().refresh();
index 30b3b1ea69542e7ddcbc7fa25a1a04de80decc07..5689892814207113a1e17f148c25da88eaf7f834 100644 (file)
@@ -51,9 +51,7 @@ FL_FORM * FormCharacter::form() const
 void FormCharacter::build()
 {
    dialog_.reset(build_character());
-   // Workaround dumb xforms sizing bug
-   minw_ = form()->w;
-   minh_ = form()->h;
+
    // Manage the ok, apply and cancel/close buttons
    bc().setApply(dialog_->button_apply);
    bc().setCancel(dialog_->button_close);
index 3b91a86033fbab8ceaa159f0f2b2de364ce9e288..0e65ed61776f9b610870834885db06f802df2487 100644 (file)
@@ -59,10 +59,6 @@ void FormCitation::build()
 {
        dialog_.reset(build_citation());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(dialog_->input_after,  FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->input_before, FL_RETURN_CHANGED);
 
@@ -74,7 +70,6 @@ void FormCitation::build()
        bc().setApply(dialog_->button_apply);
        bc().setCancel(dialog_->button_cancel);
        bc().setUndoAll(dialog_->button_restore);
-       bc().refresh();
 
        bc().addReadOnly(dialog_->button_add);
        bc().addReadOnly(dialog_->button_del);
@@ -83,6 +78,8 @@ void FormCitation::build()
        bc().addReadOnly(dialog_->choice_style);
        bc().addReadOnly(dialog_->input_before);
        bc().addReadOnly(dialog_->input_after);
+
+       bc().refresh();
 }
 
 
index 36b3e278f65fa965b4869a1e933660c301ec9e2f..fb182f7231d4f2166b16340a39d427f7bcd120eb 100644 (file)
@@ -39,10 +39,6 @@ void FormCopyright::build()
 {
        dialog_.reset(build_copyright());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2001 LyX Team");
        str = formatted(str, dialog_->text_copyright->w-10,
                        FL_NORMAL_SIZE, FL_NORMAL_STYLE);
index df85966534fa857fa5fd2a5bbd1aae4b193ba9dc..09251155a76914e9ab2df66fec1aa301a1881b30 100644 (file)
@@ -47,10 +47,6 @@ void FormCredits::build()
 {
    dialog_.reset(build_credits());
 
-   // Workaround dumb xforms sizing bug
-   minw_ = form()->w;
-   minh_ = form()->h;
-
    // Manage the cancel/close button
    bc_.setCancel(dialog_->button_cancel);
    bc_.refresh();
index 2150c229b9d14c320f20b946625d95adb8c80e52..0a114121bb0a6d3e7b95cb3bc7396e622b3e34fc 100644 (file)
@@ -87,10 +87,6 @@ void FormDocument::build()
     bc().setUndoAll(dialog_->button_restore);
     bc().refresh();
 
-    // Workaround dumb xforms sizing bug
-    minw_ = form()->w;
-    minh_ = form()->h;
-
     // the document paper form
     paper_.reset(build_doc_paper());
     fl_addto_choice(paper_->choice_papersize2,
index e80a4982112e6b4a18da20ccfc8356c2bb33246a..0a6b5b2d1a583f3e926ddb05de99f861742dd32a 100644 (file)
@@ -75,10 +75,6 @@ void FormError::build()
 {
        dialog_.reset(build_error());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-       
         // Manage the cancel/close button
        bc().setCancel(dialog_->button_cancel);
        bc().refresh();
index a1f280794ffef72fad1f6871f9349c79a7d62683..95748aa7362d6388631646052d2ba8505e7b7431 100644 (file)
@@ -130,10 +130,6 @@ void FormExternal::build()
        fl_addto_choice(dialog_->choice_template,
                        getTemplatesComboString().c_str());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        bc_.setOK(dialog_->button_ok);
        bc_.setCancel(dialog_->button_cancel);
        bc_.refresh();
index 483ed07861c2b9d756ad6dca1970dfcb59756ca9..c118ebabdca8bf54130b805c5b82bebe537378b2 100644 (file)
@@ -61,10 +61,6 @@ void FormGraphics::build()
 {
        dialog_.reset(build_graphics());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // This is the place to add settings of the dialog that did not go
        // to the .fd file.
 
index 406a04c8e9e71d70f28151a67b509447f5d053a6..30bf53255f5a3bd5cf9b11a106710c9cb200accb 100644 (file)
@@ -79,10 +79,6 @@ void FormInclude::build()
 {
        dialog_.reset(build_include());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // Manage the ok and cancel buttons
        bc_.setOK(dialog_->button_ok);
        bc_.setCancel(dialog_->button_cancel);
index 8f68742d6575210789d4f8539fe3e39d95d9fd9c..1892b2c044abc9a4bebb3c85c3379852a7b6edab 100644 (file)
@@ -56,10 +56,6 @@ void FormIndex::build()
 {
        dialog_.reset(build_index());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
 
         // Manage the ok, apply, restore and cancel/close buttons
diff --git a/src/frontends/xforms/FormMaths.C b/src/frontends/xforms/FormMaths.C
deleted file mode 100644 (file)
index 4ceb6d5..0000000
+++ /dev/null
@@ -1,607 +0,0 @@
-/**
- * \file FormMaths.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Alejandro Aguilar Sierra
- * \author Pablo De Napoli, pdenapo@dm.uba.ar
- * \author John Levon, moz@compsoc.man.ac.uk
- */
-
-#include <config.h>
-
-#ifdef __GNUG_
-#pragma implementation
-#endif
-
-#include FORMS_H_LOCATION
-
-#include "support/LAssert.h"
-#include "FormMaths.h"
-#include "form_maths.h"
-#include "MathsSymbols.h"
-#include "Dialogs.h"
-#include "LyXView.h"
-#include "lyxfunc.h"
-#include "debug.h"
-#include "bmtable.h"
-
-#include "mathed/symbol_def.h"
-#include "delim.xbm"
-#include "delim0.xpm"
-#include "delim.xpm"
-#include "deco.xbm"
-#include "deco.xpm"
-#include "space.xpm"
-#include "sqrt.xpm"
-#include "frac.xpm"
-#include "matrix.xpm"
-#include "equation.xpm"
-#include "greek.xbm"
-#include "arrows.xbm"
-#include "brel.xbm"
-#include "bop.xbm"
-#include "misc.xbm"
-#include "varsz.xbm"
-#include "dots.xbm"
-
-using std::endl;
-using SigC::slot;
-
-static char h_align_str[80] = "c";
-static char v_align_c[] = "tcb";
-static int const delim_rversion[] = { 
-       1,1,3,3,4,5,7,7,9,9,10,11,
-       13,13,14,15,16,17,19,19,20,21,22,23 };
-static char const * function_names[] = {
-       "arccos", "arcsin", "arctan", "arg", "bmod",
-       "cos", "cosh", "cot", "coth", "csc", "deg",
-       "det", "dim", "exp", "gcd", "hom", "inf", "ker",
-       "lg", "lim", "liminf", "limsup", "ln", "log",
-       "max", "min", "sec", "sin", "sinh", "sup",
-       "tan", "tanh"
-};
-
-static int const nr_function_names = sizeof(function_names) / sizeof(char const *);
-
-static char const * decoration_names[] = {
-       "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow", 
-       "overline", "underbrace", "underline"
-};
-
-static int const nr_decoration_names = sizeof(decoration_names) / sizeof(char const *);
-static int delim_values[] = {
-       '(', ')', LM_lceil,  LM_rceil,  LM_uparrow,  LM_Uparrow,
-       '[', ']', LM_lfloor,  LM_rfloor,  LM_updownarrow, LM_Updownarrow,
-       '{', '}',  '/', LM_backslash,  LM_downarrow,  LM_Downarrow,
-       LM_langle,  LM_rangle, '|', LM_Vert, '.', 0
-};
-
-
-extern "C" int C_FormMathsWMHideCB(FL_FORM * form, void *)
-{
-       if (form && form->visible)
-               fl_hide_form(form);
-       return FL_CANCEL; 
-}
-
-extern "C" void C_FormMathsButtonCB(FL_OBJECT * ob, long data)
-{
-       Assert(ob && ob->form);
-       FormMaths * pre = static_cast<FormMaths *>(ob->form->u_vdata);
-       Assert(pre);
-       pre->ButtonCB(ob, data);
-}
-
-
-extern "C" void C_FormMathsDelimCB(FL_OBJECT * ob, long data)
-{
-       Assert(ob && ob->form);
-       FormMaths * pre = static_cast<FormMaths *>(ob->form->u_vdata);
-       Assert(pre);
-       pre->DelimCB(ob, data);
-}
-
-
-extern "C" void C_FormMathsMatrixCB(FL_OBJECT * ob, long data)
-{
-       Assert(ob && ob->form);
-       FormMaths * pre = static_cast<FormMaths *>(ob->form->u_vdata);
-       Assert(pre);
-       pre->MatrixCB(ob, data);
-}
-
-
-extern "C" void C_FormMathsDecoCB(FL_OBJECT * ob, long data)
-{
-       Assert(ob && ob->form);
-       FormMaths * pre = static_cast<FormMaths *>(ob->form->u_vdata);
-       Assert(pre);
-       pre->DecoCB(ob, data);
-}
-
-
-extern "C" void C_FormMathsSpaceCB(FL_OBJECT * ob, long data)
-{
-       Assert(ob && ob->form);
-       FormMaths * pre = static_cast<FormMaths *>(ob->form->u_vdata);
-       Assert(pre);
-       pre->SpaceCB(ob, data);
-}
-
-
-extern "C" int C_FormMathsAlignFilter(FL_OBJECT * ob, char const *,
-                                     char const * cur, int c)
-{
-       Assert(ob);
-       FormMaths * pre = static_cast<FormMaths *>(ob->u_vdata);
-       Assert(pre);
-       return pre->AlignFilter(cur, c);
-}
-
-       
-FormMaths::FormMaths(LyXView * lv, Dialogs * d)
-       : FormBaseBD(lv, d, _("Maths Symbols"))
-{
-       d->showMathPanel.connect(slot(this, &FormMaths::show));
-}
-
-
-FL_FORM * FormMaths::form() const
-{
-       if (dialog_.get())
-               return dialog_->form;
-       return 0;
-}
-
-
-extern "C" int C_MathsSymbolsPeekCB(FL_FORM *, void *);
-void FormMaths::build()
-{
-       dialog_.reset(build_panel());
-       delim_.reset(build_delim());
-       matrix_.reset(build_matrix());
-       deco_.reset(build_deco());
-       space_.reset(build_space());
-
-       fl_set_form_atclose(delim_->form, C_FormMathsWMHideCB, delim_.get());
-       fl_set_form_atclose(matrix_->form, C_FormMathsWMHideCB, matrix_.get());
-       fl_set_form_atclose(deco_->form, C_FormMathsWMHideCB, deco_.get());
-       fl_set_form_atclose(space_->form, C_FormMathsWMHideCB, space_.get());
-       // work around dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
-       fl_set_button(space_->radio_space_thin, 1);
-       fl_set_button(delim_->radio_left, 1);
-       fl_set_pixmap_data(delim_->button_delim_pix, const_cast<char**>(delim0));
-       delim_->radio_left->u_ldata = 0;
-       delim_->radio_right->u_ldata = 1;
-       fl_set_bmtable_data(delim_->bmtable_delim, 6, 4, delim_width, delim_height, delim_bits);
-       fl_set_bmtable_maxitems(delim_->bmtable_delim, 23);
-       
-       for (int i = 0; i < nr_function_names; ++i)
-               fl_add_browser_line(dialog_->browser_functions, function_names[i]);
-       
-       fl_set_pixmap_data(dialog_->button_sqrt, const_cast<char**>(sqrt_xpm));
-       fl_set_pixmap_data(dialog_->button_frac, const_cast<char**>(frac));
-       fl_set_pixmap_data(dialog_->button_delim, const_cast<char**>(delim));
-       fl_set_pixmap_data(dialog_->button_deco, const_cast<char**>(deco));
-       fl_set_pixmap_data(dialog_->button_space, const_cast<char**>(space_xpm));
-       fl_set_pixmap_data(dialog_->button_matrix, const_cast<char**>(matrix));
-       fl_set_pixmap_data(dialog_->button_equation, const_cast<char**>(equation));
-       
-       fl_addto_choice(matrix_->choice_matrix_valign, _("Top | Center | Bottom"));
-       fl_set_choice(matrix_->choice_matrix_valign, 2);
-       fl_set_input(matrix_->input_matrix_halign, h_align_str);
-       matrix_->input_matrix_halign->u_vdata = this;
-       fl_set_input_filter(matrix_->input_matrix_halign,
-                           C_FormMathsAlignFilter);
-       
-       fl_set_bmtable_data(deco_->bmtable_deco, 3, 3, deco_width, deco_height, deco_bits);
-       fl_set_bmtable_maxitems(deco_->bmtable_deco, 8);
-
-       build_symbol_menus();
-
-       // to close any bitmap menus on interacting with the main form
-       fl_register_raw_callback(dialog_->form, KeyPressMask|ButtonPressMask, C_MathsSymbolsPeekCB);
-       bc_.setCancel(dialog_->button_close);
-       bc_.refresh();
-}
-
-void FormMaths::build_symbol_menus()
-{
-       FL_OBJECT * obj;
-
-       greek_.reset(new BitmapMenu(this, 2, dialog_->button_greek));
-       obj = greek_->AddBitmap(MM_GREEK, 6, 2,
-                               Greek_width, Greek_height, Greek_bits);
-       fl_set_bmtable_maxitems(obj, 11);
-       obj = greek_->AddBitmap(MM_GREEK, 7, 4,
-                               greek_width, greek_height, greek_bits);
-       greek_->create();
-
-       boperator_.reset(new BitmapMenu(this, 1, dialog_->button_boperator,
-                                       greek_.get()));
-       obj = boperator_->AddBitmap(MM_BOP, 4, 8,
-                                   bop_width, bop_height, bop_bits);
-       fl_set_bmtable_maxitems(obj, 31);
-       boperator_->create();
-
-       brelats_.reset(new BitmapMenu(this, 1, dialog_->button_brelats,
-                                     boperator_.get()));
-       obj = brelats_->AddBitmap(MM_BRELATS, 4, 9,
-                                 brel_width, brel_height, brel_bits);
-       fl_set_bmtable_maxitems(obj, 35);
-       brelats_->create();
-
-       arrow_.reset(new BitmapMenu(this, 3, dialog_->button_arrow,
-                                   brelats_.get()));
-       obj = arrow_->AddBitmap(MM_ARROW, 5, 4,
-                               arrow_width, arrow_height, arrow_bits);
-       obj = arrow_->AddBitmap(MM_ARROW, 2, 4,
-                               larrow_width, larrow_height, larrow_bits,
-                               False);
-       fl_set_bmtable_maxitems(obj, 7);
-       obj = arrow_->AddBitmap(MM_ARROW, 2, 2,
-                               darrow_width, darrow_height, darrow_bits);
-       arrow_->create();
-
-       varsize_.reset(new BitmapMenu(this, 1, dialog_->button_varsize,
-                                     arrow_.get()));
-       obj = varsize_->AddBitmap(MM_VARSIZE, 3, 5,
-                                 varsz_width, varsz_height, varsz_bits);
-       fl_set_bmtable_maxitems(obj, 14);
-       varsize_->create();
-
-       misc_.reset(new BitmapMenu(this, 2, dialog_->button_misc,
-                                  varsize_.get()));
-       obj = misc_->AddBitmap(MM_MISC, 5, 6,
-                              misc_width, misc_height, misc_bits);
-       fl_set_bmtable_maxitems(obj, 29);
-       obj = misc_->AddBitmap(MM_DOTS, 4, 1,
-                              dots_width, dots_height, dots_bits);
-       misc_->create();
-}
-
-
-void FormMaths::insertMatrix() const
-{
-       char const c = v_align_c[fl_get_choice(matrix_->choice_matrix_valign) - 1];
-       char const * sh = fl_get_input(matrix_->input_matrix_halign);
-       int const nx = int(fl_get_slider_value(matrix_->slider_matrix_columns) + 0.5);
-       int const ny = int(fl_get_slider_value(matrix_->slider_matrix_rows) + 0.5);
-       std::ostringstream ost;
-       ost << nx << ' ' << ny << ' ' << c << sh;
-       lv_->getLyXFunc()->Dispatch(LFUN_INSERT_MATRIX, ost.str().c_str());
-}
-
-void FormMaths::insertDelim(string const & delim) const
-{
-       lv_->getLyXFunc()->Dispatch(LFUN_MATH_DELIM, delim);
-}
-
-void FormMaths::openBitmapMenu(MathsCallbackValues val) const
-{
-       switch (val) {
-               case MM_GREEK:
-                       greek_->show();
-                       break;
-               case MM_ARROW:
-                       arrow_->show();
-                       break;
-               case MM_BOP:
-                       boperator_->show();
-                       break;
-               case MM_BRELATS:
-                       brelats_->show();
-                       break;
-               case MM_VARSIZE:
-                       varsize_->show();
-                       break;
-               case MM_MISC:
-                       misc_->show();
-                       break;
-               default:
-                       Assert(false);
-       }
-}
-
-
-void FormMaths::insertSymbol(string const & sym) const
-{
-       lv_->getLyXFunc()->Dispatch(LFUN_INSERT_MATH, sym);
-}
-
-
-void FormMaths::mathDisplay() const
-{
-       lv_->getLyXFunc()->Dispatch(LFUN_MATH_DISPLAY);
-}
-
-
-void FormMaths::openSubDialog(MathsCallbackValues val) const
-{
-       FL_FORM * form = 0;
-       string title;
-
-       switch (val) {
-               case MM_DELIM:
-                       form = delim_->form;
-                       title = "Delimiters";
-                       break;
-               case MM_MATRIX:
-                       form = matrix_->form;
-                       title = "Matrix";
-                       break;
-               case MM_DECO:
-                       form = deco_->form; 
-                       title = "Maths Decorations";
-                       break;
-               case MM_SPACE:
-                       form = space_->form;
-                       title = "Maths Spacing";
-                       break;
-               default:
-                       Assert(false);
-       }
-
-       if (form->visible) {
-               fl_raise_form(form);
-               XMapWindow(fl_get_display(), form->window);
-       } else
-               fl_show_form(form, FL_PLACE_MOUSE | FL_FREE_SIZE, 0, title.c_str());
-}
-
-
-void FormMaths::insertFunction() const
-{
-       int const i = fl_get_browser(dialog_->browser_functions) - 1;
-       insertSymbol(function_names[i]);
-}
-
-
-void FormMaths::ButtonCB(FL_OBJECT *, long data)
-{
-       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
-
-       lyxerr[Debug::GUI] << "Maths button CB val " << long(val) << endl;
-
-       switch (val) {
-               case MM_GREEK:
-               case MM_ARROW:
-               case MM_BOP:
-               case MM_BRELATS:
-               case MM_VARSIZE:
-               case MM_MISC:
-                       openBitmapMenu(val);
-                       break;
-
-               case MM_FRAC:
-                       insertSymbol("frac");
-                       break;
-               case MM_SQRT:
-                       insertSymbol("sqrt");
-                       break;
-
-               case MM_DELIM:
-               case MM_MATRIX:
-               case MM_DECO:
-               case MM_SPACE:
-                       openSubDialog(val);
-                       break;
-
-               case MM_EQU:
-                       mathDisplay();
-                       break;
-
-               case MM_FUNC:
-                       insertFunction();
-                       break;
-
-               case MM_DOTS:
-                       break;
-
-               case MM_MAX:
-               case MM_CLOSE:
-               case MM_APPLY:
-               case MM_OK:
-                       Assert(false);
-                       break;
-       }
-}
-
-
-void FormMaths::DelimCB(FL_OBJECT *, long data)
-{
-       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
-
-       lyxerr[Debug::GUI] << "Maths delim CB val " << long(val) << endl;
-
-       int left = int(delim_->radio_left->u_ldata);
-       int right= int(delim_->radio_right->u_ldata);
-       int const side = (fl_get_button(delim_->radio_right) != 0);
-       std::ostringstream ost;
-       ost << delim_values[left] << ' ' << delim_values[right];
-       switch (val) {
-               case MM_OK:
-                       insertDelim(ost.str().c_str());
-               case MM_CLOSE:
-                       fl_hide_form(delim_->form);
-                       break;
-
-               case MM_APPLY:
-                       insertDelim(ost.str().c_str());
-                       break;
-
-               /* the bmtable */
-               case 2: {
-                       int const i = fl_get_bmtable(delim_->bmtable_delim);
-                       int const button = fl_get_bmtable_numb(delim_->bmtable_delim);
-                       bool const both = (button == FL_MIDDLE_MOUSE);
-       
-                       if (i>= 0) {
-                               if (side || (button == FL_RIGHT_MOUSE))
-                                       right = i;
-                               else {
-                                       left = i;
-                                       if (both)
-                                               right = delim_rversion[i];
-                               }
-                       }
-                       Pixmap p1, p2;
-                       p1 = fl_get_pixmap_pixmap(delim_->button_delim_pix, &p1, &p2);
-                       fl_draw_bmtable_item(delim_->bmtable_delim, left, p1, 0, 0);
-                       fl_draw_bmtable_item(delim_->bmtable_delim, right, p1, 16, 0);
-                       fl_redraw_object(delim_->button_delim_pix);
-       
-                       delim_->radio_left->u_ldata = left;
-                       delim_->radio_right->u_ldata = right;
-                       } break;
-               /* left/right - ignore */
-               case 3:
-               case 4:
-                       break;
-               default:
-                       Assert(false);
-                       break;
-       }
-}
-
-
-int FormMaths::AlignFilter(char const * cur, int c)
-{
-       int n = int(fl_get_slider_value(matrix_->slider_matrix_columns)+0.5) -
-               int(strlen(cur));
-       if (n < 0)
-               return FL_INVALID;
-
-       if (c == 'c' || c == 'l' || c == 'r') 
-               return FL_VALID;
-       return FL_INVALID;
-}
-void FormMaths::MatrixCB(FL_OBJECT *, long data)
-{
-       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
-
-       lyxerr[Debug::GUI] << "Maths matrix CB val " << long(val) << endl;
-
-       switch (val) {
-               case MM_OK:
-                       insertMatrix();
-               case MM_CLOSE:
-                       fl_hide_form(matrix_->form);
-                       break;
-
-               case MM_APPLY:
-                       insertMatrix();
-                       break;
-
-               /* rows slider etc.: ignore */
-               case -1:
-                       break;
-               /* the "columns" slider */
-               case 2: {
-                       int const nx = int(fl_get_slider_value(matrix_->slider_matrix_columns)+0.5);
-                       for (int i = 0; i < nx; ++i) 
-                               h_align_str[i] = 'c';
-                       h_align_str[nx] = '\0';
-
-                       fl_set_input(matrix_->input_matrix_halign, h_align_str);
-                       fl_redraw_object(matrix_->input_matrix_halign);
-                       } break;
-               default:
-                       Assert(false);
-                       break;
-       }
-}
-
-
-void FormMaths::DecoCB(FL_OBJECT *, long data)
-{
-       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
-
-       lyxerr[Debug::GUI] << "Maths deco CB val " << long(val) << endl;
-
-       int const i = fl_get_bmtable(deco_->bmtable_deco);
-       if (i >= nr_decoration_names)
-               return;
-       string const deco_str = decoration_names[i];
-       switch (val) {
-               case MM_OK:
-                       insertSymbol(deco_str);
-               case MM_CLOSE:
-                       fl_hide_form(deco_->form);
-                       break;
-
-               case MM_APPLY:
-                       insertSymbol(deco_str);
-                       break;
-
-               default:
-                       Assert(false);
-                       break;
-       }
-}
-
-
-void FormMaths::SpaceCB(FL_OBJECT *, long data)
-{
-       extern char * latex_mathspace[];
-       static short sp = -1;
-       if (data >= 0 && data < 6) {
-               sp = short(data);
-               return;
-       }
-       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
-
-       lyxerr[Debug::GUI] << "Maths space CB val " << long(val) << endl;
-
-       switch (val) {
-               case MM_OK:
-                       if (sp > 0)
-                               insertSymbol(latex_mathspace[sp]);
-               case MM_CLOSE:
-                       fl_hide_form(space_->form);
-                       break;
-
-               case MM_APPLY:
-                       if (sp > 0)
-                               insertSymbol(latex_mathspace[sp]);
-                       break;
-
-               default:
-                       Assert(false);
-                       break;
-       }
-}
diff --git a/src/frontends/xforms/FormMaths.h b/src/frontends/xforms/FormMaths.h
deleted file mode 100644 (file)
index 8c02253..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/** 
- * \file FormMaths.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- * 
- * \author Alejandro Aguilar Sierra 
- * \author John Levon
- */
-
-#ifndef FORM_MATHS_H
-#define FORM_MATHS_H
-
-#include <boost/smart_ptr.hpp>
-
-#ifdef __GNUG_
-#pragma interface
-#endif
-
-#include "FormBaseDeprecated.h"
-
-class BitmapMenu; 
-struct FD_form_panel;
-struct FD_form_delim;
-struct FD_form_matrix;
-struct FD_form_deco;
-struct FD_form_space;
-
-/// values used by the xforms callbacks 
-enum MathsCallbackValues {
-       MM_GREEK,
-       MM_ARROW,
-       MM_BOP,
-       MM_BRELATS,
-       MM_VARSIZE,
-       MM_MISC,
-       MM_FRAC,
-       MM_SQRT,
-       MM_DELIM,
-       MM_MATRIX,
-       MM_EQU,
-       MM_DECO,
-       MM_SPACE,
-       MM_DOTS,
-       MM_FUNC,
-       MM_MAX,
-       MM_CLOSE = 1024,
-       MM_APPLY,
-       MM_OK
-};
-/** 
- * This class provides an XForms implementation of the maths panel.
- */
-class FormMaths : public FormBaseBD {
-public:
-       ///
-       FormMaths(LyXView *, Dialogs *);
-       ///
-       /// input callback functions
-       void InputCB(FL_OBJECT *, long);
-       ///
-       void ButtonCB(FL_OBJECT *, long);
-       ///
-       void DelimCB(FL_OBJECT *, long);
-       ///
-       void MatrixCB(FL_OBJECT *, long);
-       ///
-       void DecoCB(FL_OBJECT *, long);
-       ///
-       void SpaceCB(FL_OBJECT *, long);
-       ///
-       int AlignFilter(char const *, int);
-
-
-       /// insert a matrix 
-       void insertMatrix() const;
-       /// insert a delimiter
-       void insertDelim(string const & delim) const;
-       /// open a bitmap menu 
-       void openBitmapMenu(MathsCallbackValues val) const;
-       /// dispatch a symbol insert 
-       void insertSymbol(string const & sym) const;
-       /// send LFUN_MATH_DISPLAY
-       void mathDisplay() const;
-
-       /// open a sub-dialog 
-       void openSubDialog(MathsCallbackValues val) const;
-
-       /// dispatch a function name insert
-       void insertFunction() const;
-
-private:
-       /// Pointer to the actual instantiation of the ButtonController.
-       virtual xformsBC & bc();
-       
-       /// Build the popup
-       virtual void build();
-   
-       /// build the bitmap menus 
-       void build_symbol_menus();
-       /// Pointer to the actual instantiation of the xforms form
-       virtual FL_FORM * form() const;
-
-       // build the panels
-       FD_form_panel * build_panel();
-       FD_form_delim * build_delim();
-       FD_form_matrix * build_matrix();
-       FD_form_deco * build_deco();
-       FD_form_space * build_space();
-       
-       // Real GUI implementations
-       boost::scoped_ptr<FD_form_panel> dialog_;
-       boost::scoped_ptr<FD_form_delim> delim_;
-       boost::scoped_ptr<FD_form_matrix> matrix_;
-       boost::scoped_ptr<FD_form_deco> deco_;
-       boost::scoped_ptr<FD_form_space> space_;
-
-       // bit map menus
-       boost::scoped_ptr<BitmapMenu> greek_;
-       boost::scoped_ptr<BitmapMenu> boperator_;
-       boost::scoped_ptr<BitmapMenu> brelats_;
-       boost::scoped_ptr<BitmapMenu> arrow_;
-       boost::scoped_ptr<BitmapMenu> varsize_;
-       boost::scoped_ptr<BitmapMenu> misc_;
-
-       /// The ButtonController
-       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
-};
-
-
-inline
-xformsBC & FormMaths::bc()
-{
-       return bc_;
-}
-
-#endif /* FORM_MATHS_H */
diff --git a/src/frontends/xforms/FormMathsBitmap.C b/src/frontends/xforms/FormMathsBitmap.C
new file mode 100644 (file)
index 0000000..91e8a1a
--- /dev/null
@@ -0,0 +1,156 @@
+/**
+ * \file FormMathsBitmap.C
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+#include <algorithm>
+#include <iomanip>
+#include XPM_H_LOCATION
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "FormMathsBitmap.h"
+
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "bmtable.h"
+#include "debug.h"
+#include "lyx_gui_misc.h" // scex, idex
+#include "gettext.h"
+
+using std::vector;
+using std::endl;
+using std::setw;
+using std::max;
+
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+
+FormMathsBitmap::FormMathsBitmap(LyXView * lv, Dialogs * d,   
+                                FormMathsPanel const & p,
+                                vector<string> const & l)
+       : FormMathsSub(lv, d, p, _("Maths Bitmaps")),
+         latex_(l), ww_(0), x_(0), y_(0), w_(0), h_(0)
+{
+       ww_ = 2 * FL_abs(FL_BOUND_WIDTH);
+       x_ = y_ = ww_;
+       y_ += 8;
+}
+
+
+FL_FORM * FormMathsBitmap::form() const
+{
+       return form_;
+}
+
+
+void FormMathsBitmap::build()
+{
+       Assert(bitmaps_.size() > 0);
+
+       h_+= 50; // Allow room for a Close button
+
+       form_ = fl_bgn_form(FL_UP_BOX, w_, h_);
+       form_->u_vdata = this;
+
+       FL_OBJECT * obj = fl_add_box(FL_UP_BOX, 0, 0, w_, h_, "");
+
+       y_ = 0;
+       for (vector<bm_ptr>::const_iterator it = bitmaps_.begin();
+            it < bitmaps_.end(); ++it) {
+               FL_OBJECT * obj = it->get();
+
+               fl_add_object(form_, obj);
+               bc().addReadOnly(obj);
+
+               y_ = max(y_, obj->y + obj->h);
+       }
+       char const * const label = N_("Close|^[");
+
+       x_ = (form_->w - 90) / 2;
+       y_ += 10;
+               
+       FL_OBJECT * button_cancel = obj = 
+               fl_add_button(FL_NORMAL_BUTTON, x_, y_, 90, 30, idex(_(label)));
+       fl_set_button_shortcut(obj, scex(_(label)), 1);
+
+       fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+       fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+
+       fl_end_form();
+
+       bc().setCancel(button_cancel);
+       bc().refresh();
+}
+
+
+void FormMathsBitmap::addBitmap(int nt, int nx, int ny, int bw, int bh,
+                               unsigned char const * data, bool vert)
+{
+       int wx = bw + ww_ / 2;
+       int wy = bh + ww_ / 2;
+       wx += (wx % nx);
+       wy += (wy % ny);
+
+       FL_OBJECT * obj = fl_create_bmtable(1, x_, y_, wx, wy, "");
+       fl_set_object_lcol(obj, FL_BLUE);
+       fl_set_object_boxtype(obj, FL_UP_BOX);
+       fl_set_bmtable_data(obj, nx, ny, bw, bh, data);
+       fl_set_bmtable_maxitems(obj, nt);
+       fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+
+       if (vert) {
+               y_ += wy + 8;
+               h_ = max(y_, h_);
+               w_ = max(x_ + wx + ww_, w_);
+       } else  {
+               x_ += wx + 8;
+               w_ = max(x_, w_);
+               h_ = max(y_ + wy + ww_, h_);
+       }
+
+       bitmaps_.push_back(bm_ptr(obj));
+}
+
+
+int FormMathsBitmap::GetIndex(FL_OBJECT * ob)
+{
+       int k = 0;
+       for (vector<bm_ptr>::const_iterator it = bitmaps_.begin();
+            it < bitmaps_.end(); ++it) {
+               if (it->get() == ob)
+                       return k + fl_get_bmtable(ob);
+               else
+                       k += fl_get_bmtable_maxitems(it->get());
+       }
+       return -1;
+}
+
+
+void FormMathsBitmap::apply()
+{
+       parent_.insertSymbol(latex_chosen_);
+}
+
+
+bool FormMathsBitmap::input(FL_OBJECT * ob, long)
+{
+       int const i = GetIndex(ob);
+
+       if (i < 0) 
+               return false;
+
+       latex_chosen_ = latex_[i];
+       apply();
+       return true;
+}
diff --git a/src/frontends/xforms/FormMathsBitmap.h b/src/frontends/xforms/FormMathsBitmap.h
new file mode 100644 (file)
index 0000000..ff412d0
--- /dev/null
@@ -0,0 +1,76 @@
+/**
+ * \file FormMathsBitmap.h
+ * Copyright 2001 the LyX Team
+ * Read the file COPYING
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSBITMAP_H
+#define FORM_MATHSBITMAP_H
+
+#include <vector>
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+#include "LString.h"
+#include "FormMathsPanel.h"
+
+/** 
+ * This class provides an XForms implementation of a maths bitmap form.
+ */
+class FormMathsBitmap : public FormMathsSub {
+       friend class FormMathsPanel;
+
+  public:
+       ///
+       typedef boost::shared_ptr<FL_OBJECT> bm_ptr;
+       ///
+       FormMathsBitmap(LyXView *, Dialogs * d, FormMathsPanel const &,
+                       std::vector<string> const &);
+       ///
+       void addBitmap(int, int, int, int, int, unsigned char const *,
+                      bool = true);
+
+private:
+       ///
+       int GetIndex(FL_OBJECT *);
+
+       /// Build the popup
+       virtual void build();
+       /// apply the data
+       virtual void apply();
+       /// input handler
+       bool input(FL_OBJECT *, long);
+
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       /// The latex names associated with each symbol
+       std::vector<string> latex_;
+       /// The latex name chosen
+       string latex_chosen_;
+       /// Real GUI implementation
+       FL_FORM * form_;
+       /// The bitmap tables
+       std::vector<bm_ptr> bitmaps_;
+
+       /// Border width
+       int ww_;
+       ///
+       int x_;
+       ///
+       int y_;
+       ///
+       int w_;
+       ///
+       int h_;
+};
+
+
+#endif // FORM_MATHSBITMAP_H
diff --git a/src/frontends/xforms/FormMathsDeco.C b/src/frontends/xforms/FormMathsDeco.C
new file mode 100644 (file)
index 0000000..dbb12bb
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * \file FormMathsDeco.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Pablo De Napoli, pdenapo@dm.uba.ar
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include "FormMathsDeco.h"
+#include "form_maths_deco.h"
+#include "Dialogs.h"
+#include "bmtable.h"
+
+#include "deco.xbm"
+
+static char const * decoration_names[] = {
+       "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow", 
+       "overline", "underbrace", "underline"
+};
+
+static int const nr_decoration_names = sizeof(decoration_names) / sizeof(char const *);
+FormMathsDeco::FormMathsDeco(LyXView * lv, Dialogs * d,
+                            FormMathsPanel const & p)
+       : FormMathsSub(lv, d, p, _("Maths Decorations"))
+{}
+
+
+FL_FORM * FormMathsDeco::form() const
+{
+       if (dialog_.get())
+               return dialog_->form;
+       return 0;
+}
+
+
+void FormMathsDeco::build()
+{
+       dialog_.reset(build_maths_deco());
+
+       fl_set_bmtable_data(dialog_->bmtable, 3, 3,
+                           deco_width, deco_height, deco_bits);
+       fl_set_bmtable_maxitems(dialog_->bmtable, 8);
+
+       bc().setCancel(dialog_->button_cancel);
+       bc().addReadOnly(dialog_->bmtable);
+       bc().refresh();
+}
+
+
+void FormMathsDeco::apply()
+{
+       int const i = fl_get_bmtable(dialog_->bmtable);
+       if (i >= nr_decoration_names)
+               return;
+       parent_.insertSymbol(decoration_names[i]);
+}
diff --git a/src/frontends/xforms/FormMathsDeco.h b/src/frontends/xforms/FormMathsDeco.h
new file mode 100644 (file)
index 0000000..c8c9089
--- /dev/null
@@ -0,0 +1,48 @@
+/** 
+ * \file FormMathsDeco.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ * 
+ * \author Alejandro Aguilar Sierra 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSDECO_H
+#define FORM_MATHSDECO_H
+
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+#include "FormMathsPanel.h"
+
+struct FD_form_maths_deco;
+
+/** 
+ * This class provides an XForms implementation of the maths deco.
+ */
+class FormMathsDeco : public FormMathsSub {
+public:
+       ///
+       FormMathsDeco(LyXView *, Dialogs *, FormMathsPanel const &);
+
+private:
+       /// Build the popup
+       virtual void build();
+       /// Apply from dialog (modify or create inset)
+       virtual void apply();
+
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       // build the popup
+       FD_form_maths_deco * build_maths_deco();
+       
+       // Real GUI implementation
+       boost::scoped_ptr<FD_form_maths_deco> dialog_;
+};
+
+#endif //  FORM_MATHSDECO_H
diff --git a/src/frontends/xforms/FormMathsDelim.C b/src/frontends/xforms/FormMathsDelim.C
new file mode 100644 (file)
index 0000000..b20405a
--- /dev/null
@@ -0,0 +1,125 @@
+/**
+ * \file FormMathsDelim.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Pablo De Napoli, pdenapo@dm.uba.ar
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include "FormMathsDelim.h"
+#include "form_maths_delim.h"
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "lyxfunc.h"
+#include "bmtable.h"
+#include "debug.h"
+#include "mathed/symbol_def.h"
+
+#include "delim.xbm"
+#include "delim0.xpm"
+
+static int const delim_rversion[] = { 
+       1,1,3,3,4,5,7,7,9,9,10,11,
+       13,13,14,15,16,17,19,19,20,21,22,23 };
+static int delim_values[] = {
+       '(', ')', LM_lceil,  LM_rceil,  LM_uparrow,  LM_Uparrow,
+       '[', ']', LM_lfloor,  LM_rfloor,  LM_updownarrow, LM_Updownarrow,
+       '{', '}',  '/', LM_backslash,  LM_downarrow,  LM_Downarrow,
+       LM_langle,  LM_rangle, '|', LM_Vert, '.', 0
+};
+
+using std::endl;
+
+FormMathsDelim::FormMathsDelim(LyXView * lv, Dialogs * d, 
+                              FormMathsPanel const & p)
+       : FormMathsSub(lv, d, p, _("Maths Delimiters"))
+{}
+
+
+FL_FORM * FormMathsDelim::form() const
+{
+       if (dialog_.get())
+               return dialog_->form;
+       return 0;
+}
+
+
+void FormMathsDelim::build()
+{
+       dialog_.reset(build_maths_delim());
+       
+       fl_set_button(dialog_->radio_left, 1);
+       fl_set_pixmap_data(dialog_->button_pix, const_cast<char**>(delim0));
+       dialog_->radio_left->u_ldata = 0;
+       dialog_->radio_right->u_ldata = 1;
+       fl_set_bmtable_data(dialog_->bmtable, 6, 4,
+                           delim_width, delim_height, delim_bits);
+       fl_set_bmtable_maxitems(dialog_->bmtable, 23);
+
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+
+       bc().addReadOnly(dialog_->bmtable);
+       bc().addReadOnly(dialog_->radio_right);
+       bc().addReadOnly(dialog_->radio_left);
+       bc().addReadOnly(dialog_->button_pix);
+
+       bc().refresh();
+}
+
+
+void FormMathsDelim::apply()
+{
+       int left = int(dialog_->radio_left->u_ldata);
+       int right= int(dialog_->radio_right->u_ldata);
+
+       std::ostringstream ost;
+       ost << delim_values[left] << ' ' << delim_values[right];
+
+       lv_->getLyXFunc()->Dispatch(LFUN_MATH_DELIM, ost.str().c_str());
+}
+
+bool FormMathsDelim::input(FL_OBJECT *, long)
+{
+       int left = int(dialog_->radio_left->u_ldata);
+       int right= int(dialog_->radio_right->u_ldata);
+       int const side = (fl_get_button(dialog_->radio_right) != 0);
+
+       int const i = fl_get_bmtable(dialog_->bmtable);
+       int const button = fl_get_bmtable_numb(dialog_->bmtable);
+       bool const both = (button == FL_MIDDLE_MOUSE);
+       
+       if (i>= 0) {
+               if (side || (button == FL_RIGHT_MOUSE))
+                       right = i;
+               else {
+                       left = i;
+                       if (both)
+                               right = delim_rversion[i];
+               }
+       }
+       Pixmap p1, p2;
+       p1 = fl_get_pixmap_pixmap(dialog_->button_pix, &p1, &p2);
+       fl_draw_bmtable_item(dialog_->bmtable, left, p1, 0, 0);
+       fl_draw_bmtable_item(dialog_->bmtable, right, p1, 16, 0);
+       fl_redraw_object(dialog_->button_pix);
+       
+       dialog_->radio_left->u_ldata  = left;
+       dialog_->radio_right->u_ldata = right;
+
+       return true;
+}
diff --git a/src/frontends/xforms/FormMathsDelim.h b/src/frontends/xforms/FormMathsDelim.h
new file mode 100644 (file)
index 0000000..1e3861a
--- /dev/null
@@ -0,0 +1,50 @@
+/** 
+ * \file FormMathsDelim.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ * 
+ * \author Alejandro Aguilar Sierra 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSDELIM_H
+#define FORM_MATHSDELIM_H
+
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+#include "FormMathsPanel.h"
+
+struct FD_form_maths_delim;
+
+/** 
+ * This class provides an XForms implementation of the maths delim.
+ */
+class FormMathsDelim : public FormMathsSub {
+public:
+       ///
+       FormMathsDelim(LyXView *, Dialogs *, FormMathsPanel const &);
+
+private:
+       /// Build the popup
+       virtual void build();
+       /// input handler
+       virtual bool input(FL_OBJECT *, long);
+       /// Apply from dialog (modify or create inset)
+       virtual void apply();
+
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       // build the popup
+       FD_form_maths_delim * build_maths_delim();
+       
+       // Real GUI implementation
+       boost::scoped_ptr<FD_form_maths_delim> dialog_;
+};
+
+#endif //  FORM_MATHSDELIM_H
diff --git a/src/frontends/xforms/FormMathsMatrix.C b/src/frontends/xforms/FormMathsMatrix.C
new file mode 100644 (file)
index 0000000..92961e5
--- /dev/null
@@ -0,0 +1,117 @@
+/**
+ * \file FormMathsMatrix.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Pablo De Napoli, pdenapo@dm.uba.ar
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include "FormMathsMatrix.h"
+#include "form_maths_matrix.h"
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "lyxfunc.h"
+#include "Lsstream.h"
+
+static char h_align_str[80] = "c";
+static char v_align_c[] = "tcb";
+
+extern "C" int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
+                                           char const * cur, int c)
+{
+       Assert(ob);
+       FormMathsMatrix * pre = static_cast<FormMathsMatrix *>(ob->u_vdata);
+       Assert(pre);
+       return pre->AlignFilter(cur, c);
+}
+
+
+FormMathsMatrix::FormMathsMatrix(LyXView * lv, Dialogs * d,
+                              FormMathsPanel const & p)
+       : FormMathsSub(lv, d, p, _("Maths Matrix"))
+{}
+
+
+FL_FORM * FormMathsMatrix::form() const
+{
+       if (dialog_.get())
+               return dialog_->form;
+       return 0;
+}
+
+
+void FormMathsMatrix::build()
+{
+       dialog_.reset(build_maths_matrix());
+
+       fl_addto_choice(dialog_->choice_valign, _("Top | Center | Bottom"));
+       fl_set_choice(dialog_->choice_valign, 2);
+       fl_set_input(dialog_->input_halign, h_align_str);
+       dialog_->input_halign->u_vdata = this;
+       fl_set_input_filter(dialog_->input_halign,
+                           C_FormMathsMatrixAlignFilter);
+
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+
+       bc().addReadOnly(dialog_->slider_rows);
+       bc().addReadOnly(dialog_->slider_columns);
+       bc().addReadOnly(dialog_->choice_valign);
+       bc().addReadOnly(dialog_->input_halign);
+
+       bc().refresh();
+}
+
+
+void FormMathsMatrix::apply()
+{
+       char const c = v_align_c[fl_get_choice(dialog_->choice_valign) - 1];
+       char const * sh = fl_get_input(dialog_->input_halign);
+       int const nx = int(fl_get_slider_value(dialog_->slider_columns) + 0.5);
+       int const ny = int(fl_get_slider_value(dialog_->slider_rows) + 0.5);
+       std::ostringstream ost;
+       ost << nx << ' ' << ny << ' ' << c << sh;
+       lv_->getLyXFunc()->Dispatch(LFUN_INSERT_MATRIX, ost.str().c_str());
+}
+
+bool FormMathsMatrix::input(FL_OBJECT * ob, long)
+{
+       if (ob == dialog_->choice_valign ||
+           ob == dialog_->slider_rows) return true;
+
+       int const nx = int(fl_get_slider_value(dialog_->slider_columns)+0.5);
+       for (int i = 0; i < nx; ++i)
+               h_align_str[i] = 'c';
+       h_align_str[nx] = '\0';
+
+       fl_set_input(dialog_->input_halign, h_align_str);
+       fl_redraw_object(dialog_->input_halign);
+       return true;
+}
+
+
+int FormMathsMatrix::AlignFilter(char const * cur, int c)
+{
+       int n = int(fl_get_slider_value(dialog_->slider_columns)+0.5) -
+               int(strlen(cur));
+       if (n < 0)
+               return FL_INVALID;
+
+       if (c == 'c' || c == 'l' || c == 'r') 
+               return FL_VALID;
+       return FL_INVALID;
+}
diff --git a/src/frontends/xforms/FormMathsMatrix.h b/src/frontends/xforms/FormMathsMatrix.h
new file mode 100644 (file)
index 0000000..b96103d
--- /dev/null
@@ -0,0 +1,51 @@
+/** 
+ * \file FormMathsMatrix.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ * 
+ * \author Alejandro Aguilar Sierra 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSMATRIX_H
+#define FORM_MATHSMATRIX_H
+
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+#include "FormMathsPanel.h"
+
+struct FD_form_maths_matrix;
+
+/** 
+ * This class provides an XForms implementation of the maths matrix.
+ */
+class FormMathsMatrix : public FormMathsSub {
+public:
+       FormMathsMatrix(LyXView *, Dialogs *, FormMathsPanel const &);
+       ///
+       int AlignFilter(char const *, int);
+
+private:
+       /// Build the popup
+       virtual void build();
+       /// input handler
+       virtual bool input(FL_OBJECT *, long);
+       /// Apply from dialog (modify or create inset)
+       virtual void apply();
+
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       // build the popup
+       FD_form_maths_matrix * build_maths_matrix();
+       
+       // Real GUI implementation
+       boost::scoped_ptr<FD_form_maths_matrix> dialog_;
+};
+
+#endif //  FORM_MATHSMATRIX_H
diff --git a/src/frontends/xforms/FormMathsPanel.C b/src/frontends/xforms/FormMathsPanel.C
new file mode 100644 (file)
index 0000000..3fea956
--- /dev/null
@@ -0,0 +1,276 @@
+/**
+ * \file FormMathsPanel.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Pablo De Napoli, pdenapo@dm.uba.ar
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include "Dialogs.h"
+#include "LyXView.h"
+#include "lyxfunc.h"
+#include "FormMathsPanel.h"
+#include "form_maths_panel.h"
+#include "MathsSymbols.h"
+#include "debug.h"
+
+#include "FormMathsBitmap.h"
+#include "FormMathsDeco.h"
+#include "FormMathsDelim.h"
+#include "FormMathsMatrix.h"
+#include "FormMathsSpace.h"
+
+#include "deco.xpm"
+#include "delim.xpm"
+#include "equation.xpm"
+#include "frac.xpm"
+#include "matrix.xpm"
+#include "space.xpm"
+#include "sqrt.xpm"
+
+#include "arrows.xbm"
+#include "bop.xbm"
+#include "brel.xbm"
+#include "dots.xbm"
+#include "greek.xbm"
+#include "misc.xbm"
+#include "varsz.xbm"
+
+using std::vector;
+using SigC::slot;
+
+FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
+       : FormBaseBD(lv, d, _("Maths Panel")),
+         active_(0)
+{
+       deco_.reset(  new FormMathsDeco(  lv, d, *this));
+       delim_.reset( new FormMathsDelim( lv, d, *this));
+       matrix_.reset(new FormMathsMatrix(lv, d, *this));
+       space_.reset( new FormMathsSpace( lv, d, *this));
+
+       vector<string> latex(nr_latex_arrow);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_arrow[i];
+       }
+       arrow_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       latex.resize(nr_latex_bop);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_bop[i];
+       }
+       boperator_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       latex.resize(nr_latex_brel);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_brel[i];
+       }
+       brelats_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       latex.resize(nr_latex_greek);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_greek[i];
+       }
+       greek_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       latex.resize(nr_latex_misc);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_misc[i];
+       }
+       misc_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       latex.resize(nr_latex_varsz);
+       for (int i = 0; i<latex.size(); ++i) {
+               latex[i] = latex_varsz[i];
+       }
+       varsize_.reset(new FormMathsBitmap(lv, d, *this, latex));
+
+       d->showMathPanel.connect(slot(this, &FormMathsPanel::show));
+}
+
+
+FL_FORM * FormMathsPanel::form() const
+{
+       if (dialog_.get())
+               return dialog_->form;
+       return 0;
+}
+
+
+void FormMathsPanel::setActive(FormMathsSub * a) const
+{
+       active_ = a;
+}
+
+
+void FormMathsPanel::build()
+{
+       dialog_.reset(build_maths_panel());
+       
+       for (int i = 0; i < nr_function_names; ++i)
+               fl_add_browser_line(dialog_->browser_funcs,
+                                   function_names[i]);
+       
+       fl_set_pixmap_data(dialog_->button_sqrt,
+                          const_cast<char**>(sqrt_xpm));
+       fl_set_pixmap_data(dialog_->button_frac,
+                          const_cast<char**>(frac));
+       fl_set_pixmap_data(dialog_->button_delim,
+                          const_cast<char**>(delim));
+       fl_set_pixmap_data(dialog_->button_deco,
+                          const_cast<char**>(deco));
+       fl_set_pixmap_data(dialog_->button_space,
+                          const_cast<char**>(space_xpm));
+       fl_set_pixmap_data(dialog_->button_matrix,
+                          const_cast<char**>(matrix));
+       fl_set_pixmap_data(dialog_->button_equation,
+                          const_cast<char**>(equation));
+
+       arrow_->addBitmap(20, 5, 4, arrow_width,  arrow_height,  arrow_bits);
+       arrow_->addBitmap(7,  2, 4, larrow_width, larrow_height, larrow_bits,
+                         false);
+       arrow_->addBitmap(4,  2, 2, darrow_width,  darrow_height, darrow_bits);
+       
+       boperator_->addBitmap(31, 4, 8, bop_width, bop_height, bop_bits);
+
+       brelats_->addBitmap(35, 4, 9, brel_width, brel_height, brel_bits);
+
+       greek_->addBitmap(11, 6, 2, Greek_width, Greek_height, Greek_bits);
+       greek_->addBitmap(28, 7, 4, greek_width, greek_height, greek_bits);
+
+       misc_->addBitmap(29, 5, 6, misc_width, misc_height, misc_bits);
+
+       varsize_->addBitmap(14, 3, 5, varsz_width, varsz_height, varsz_bits);
+
+       bc().setCancel(dialog_->button_close);
+       bc().refresh();
+}
+
+bool FormMathsPanel::input(FL_OBJECT *, long data)
+{
+       MathsCallbackValues val = static_cast<MathsCallbackValues>(data);
+
+       switch (val) {
+       case MM_GREEK:
+               if (active_ && active_ != greek_.get())
+                       active_->hide();
+               greek_->show();
+               break;
+
+       case MM_ARROW:
+               if (active_ && active_ != arrow_.get())
+                       active_->hide();
+               arrow_->show();
+               break;
+
+       case MM_BOP:
+               if (active_ && active_ != boperator_.get())
+                       active_->hide();
+               boperator_->show();
+               break;
+
+       case MM_BRELATS:
+               if (active_ && active_ != brelats_.get())
+                       active_->hide();
+               brelats_->show();
+               break;
+
+       case MM_MISC:
+               if (active_ && active_ != misc_.get())
+                       active_->hide();
+               misc_->show();
+               break;
+
+       case MM_VARSIZE:
+               if (active_ && active_ != varsize_.get())
+                       active_->hide();
+               varsize_->show();
+               break;
+
+       case MM_FRAC:
+               insertSymbol("frac");
+               break;
+
+       case MM_SQRT:
+               insertSymbol("sqrt");
+               break;
+
+       case MM_DELIM:
+               if (active_ && active_ != delim_.get())
+                       active_->hide();
+               delim_->show();
+               break;
+
+       case MM_MATRIX:
+               if (active_ && active_ != matrix_.get())
+                       active_->hide();
+               matrix_->show();
+               break;
+
+       case MM_DECO:
+               if (active_ && active_ != deco_.get())
+                       active_->hide();
+               deco_->show();
+               break;
+
+       case MM_SPACE:
+               if (active_ && active_ != space_.get())
+                       active_->hide();
+               space_->show();
+               break;
+
+       case MM_EQU:
+               mathDisplay();
+               break;
+
+       case MM_FUNC:
+               int const i = fl_get_browser(dialog_->browser_funcs) - 1;
+               insertSymbol(function_names[i]);
+               break;
+       }
+
+       return true;
+}
+
+
+void FormMathsPanel::insertSymbol(string const & sym) const
+{
+       lv_->getLyXFunc()->Dispatch(LFUN_INSERT_MATH, sym);
+}
+
+
+void FormMathsPanel::mathDisplay() const
+{
+       lv_->getLyXFunc()->Dispatch(LFUN_MATH_DISPLAY);
+}
+
+
+
+FormMathsSub::FormMathsSub(LyXView * lv, Dialogs * d, FormMathsPanel const & p,
+                          string const & t)
+       : parent_(p), FormBaseBD(lv, d, t)
+{}
+
+
+void FormMathsSub::connect()
+{
+       parent_.setActive(this);
+       FormBaseBD::connect();
+}
+
+
+void FormMathsSub::disconnect()
+{
+       parent_.setActive(0);
+       FormBaseBD::disconnect();
+}
+
+
diff --git a/src/frontends/xforms/FormMathsPanel.h b/src/frontends/xforms/FormMathsPanel.h
new file mode 100644 (file)
index 0000000..72a330b
--- /dev/null
@@ -0,0 +1,136 @@
+/** 
+ * \file FormMathsPanel.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ * 
+ * \author Alejandro Aguilar Sierra 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSPANEL_H
+#define FORM_MATHSPANEL_H
+
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+#include "FormBaseDeprecated.h"
+
+class FormMathsBitmap;
+class FormMathsDeco;
+class FormMathsDelim;
+class FormMathsMatrix;
+class FormMathsSpace;
+class FormMathsSub;
+struct FD_form_maths_panel;
+
+/// values used by the xforms callbacks 
+enum MathsCallbackValues {
+       MM_GREEK,
+       MM_ARROW,
+       MM_BOP,
+       MM_BRELATS,
+       MM_VARSIZE,
+       MM_MISC,
+       MM_FRAC,
+       MM_SQRT,
+       MM_DELIM,
+       MM_MATRIX,
+       MM_EQU,
+       MM_DECO,
+       MM_SPACE,
+       MM_DOTS,
+       MM_FUNC
+};
+/** 
+ * This class provides an XForms implementation of the maths panel.
+ */
+class FormMathsPanel : public FormBaseBD {
+public:
+       ///
+       FormMathsPanel(LyXView *, Dialogs *);
+       ///
+       void setActive(FormMathsSub *) const;
+       /// dispatch a symbol insert 
+       void insertSymbol(string const & sym) const;
+
+private:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+       
+       /// Build the popup
+       virtual void build();
+       /// input handler
+       virtual bool input(FL_OBJECT *, long);
+   
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       // build the panels
+       FD_form_maths_panel * build_maths_panel();
+       
+       /// send LFUN_MATH_DISPLAY
+       void mathDisplay() const;
+
+       // Real GUI implementation
+       boost::scoped_ptr<FD_form_maths_panel> dialog_;
+
+       /// Subdialogs
+       boost::scoped_ptr<FormMathsDeco>   deco_;
+       boost::scoped_ptr<FormMathsDelim>  delim_;
+       boost::scoped_ptr<FormMathsMatrix> matrix_;
+       boost::scoped_ptr<FormMathsSpace>  space_;
+       boost::scoped_ptr<FormMathsBitmap> arrow_;
+       boost::scoped_ptr<FormMathsBitmap> boperator_;
+       boost::scoped_ptr<FormMathsBitmap> brelats_;
+       boost::scoped_ptr<FormMathsBitmap> greek_;
+       boost::scoped_ptr<FormMathsBitmap> misc_;
+       boost::scoped_ptr<FormMathsBitmap> varsize_;
+
+       /// A pointer to the currently active subdialog
+       mutable FormMathsSub * active_;
+
+       /// The ButtonController
+       ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
+};
+
+
+class FormMathsSub : public FormBaseBD {
+       friend class FormMathsPanel; // has subdialogs to manipulate
+
+public:
+       ///
+       FormMathsSub(LyXView *, Dialogs *, FormMathsPanel const &,
+                    string const &);
+
+protected:
+       /// Pointer to the actual instantiation of the ButtonController.
+       virtual xformsBC & bc();
+       /// The parent Maths Panel
+       FormMathsPanel const & parent_;
+private:
+       ///
+       virtual void connect();
+       ///
+       virtual void disconnect();
+       /// The ButtonController
+       ButtonController<OkApplyCancelReadOnlyPolicy, xformsBC> bc_;
+};
+
+
+inline
+xformsBC & FormMathsSub::bc()
+{
+       return bc_;
+}
+
+inline
+xformsBC & FormMathsPanel::bc()
+{
+       return bc_;
+}
+#endif //  FORM_MATHSPANEL_H
diff --git a/src/frontends/xforms/FormMathsSpace.C b/src/frontends/xforms/FormMathsSpace.C
new file mode 100644 (file)
index 0000000..31ca06b
--- /dev/null
@@ -0,0 +1,73 @@
+/**
+ * \file FormMathsSpace.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author Pablo De Napoli, pdenapo@dm.uba.ar
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include "FormMathsSpace.h"
+#include "form_maths_space.h"
+
+extern char * latex_mathspace[];
+
+FormMathsSpace::FormMathsSpace(LyXView * lv, Dialogs * d,
+                              FormMathsPanel const & p)
+       : FormMathsSub(lv, d, p, _("Maths Spacing")),
+         space_(-1)
+{}
+
+
+FL_FORM * FormMathsSpace::form() const
+{
+       if (dialog_.get())
+               return dialog_->form;
+       return 0;
+}
+
+
+void FormMathsSpace::build()
+{
+       dialog_.reset(build_maths_space());
+
+       fl_set_button(dialog_->radio_thin, 1);
+
+       bc().setOK(dialog_->button_ok);
+       bc().setApply(dialog_->button_apply);
+       bc().setCancel(dialog_->button_cancel);
+
+       bc().addReadOnly(dialog_->radio_thin);
+       bc().addReadOnly(dialog_->radio_medium);
+       bc().addReadOnly(dialog_->radio_thick);
+       bc().addReadOnly(dialog_->radio_negative);
+       bc().addReadOnly(dialog_->radio_quadratin);
+       bc().addReadOnly(dialog_->radio_twoquadratin);
+
+       bc().refresh();
+}
+
+
+void FormMathsSpace::apply()
+{
+       if (space_ > 0)
+               parent_.insertSymbol(latex_mathspace[space_]);
+}
+
+bool FormMathsSpace::input(FL_OBJECT *, long data)
+{
+       space_ = -1;
+       if (data >= 0 && data < 6) {
+               space_ = short(data);
+       }
+       return true;
+}
diff --git a/src/frontends/xforms/FormMathsSpace.h b/src/frontends/xforms/FormMathsSpace.h
new file mode 100644 (file)
index 0000000..cc1e9ed
--- /dev/null
@@ -0,0 +1,53 @@
+/** 
+ * \file FormMathsSpace.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ * 
+ * \author Alejandro Aguilar Sierra 
+ * \author John Levon, moz@compsoc.man.ac.uk
+ * \author Angus Leeming, a.leeming@ic.ac.uk
+ */
+
+#ifndef FORM_MATHSSPACE_H
+#define FORM_MATHSSPACE_H
+
+#include <boost/smart_ptr.hpp>
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+#include "FormMathsPanel.h"
+
+struct FD_form_maths_space;
+
+/** 
+ * This class provides an XForms implementation of the maths space.
+ */
+class FormMathsSpace : public FormMathsSub {
+public:
+       ///
+       FormMathsSpace(LyXView *, Dialogs *, FormMathsPanel const &);
+
+private:
+       /// Build the popup
+       virtual void build();
+       /// input handler
+       virtual bool input(FL_OBJECT *, long);
+       /// Apply from dialog (modify or create inset)
+       virtual void apply();
+
+       /// Pointer to the actual instantiation of the xforms form
+       virtual FL_FORM * form() const;
+
+       // build the popup
+       FD_form_maths_space * build_maths_space();
+       
+       // Real GUI implementation
+       boost::scoped_ptr<FD_form_maths_space> dialog_;
+
+       /// The current choice.
+       short space_;
+};
+
+#endif //  FORM_MATHSSPACE_H
index 62c4e3e96388342508aab8642bbe98cf8ab33e2d..9ff5cc1f3877508447621f0ed9d1e411dcb00533 100644 (file)
@@ -86,10 +86,6 @@ void FormMinipage::build()
 {
     dialog_.reset(build_minipage());
 
-    // Workaround dumb xforms sizing bug
-    minw_ = form()->w;
-    minh_ = form()->h;
-
     fl_set_input_return(dialog_->input_width, FL_RETURN_CHANGED);
     fl_set_input_return(dialog_->input_widthp, FL_RETURN_CHANGED);
 
index 4b15f5a312387127a77351329c8cb3d4a8221657..02a6f88d497c15c4186b78996f00221db5df4306 100644 (file)
@@ -67,10 +67,6 @@ void FormParagraph::build()
     // the tabbed folder
     dialog_.reset(build_tabbed_paragraph());
 
-    // Workaround dumb xforms sizing bug
-    minw_ = form()->w;
-    minh_ = form()->h;
-
     // Manage the ok, apply, restore and cancel/close buttons
     bc_.setOK(dialog_->button_ok);
     bc_.setApply(dialog_->button_apply);
index f57502828fa14b4207b237ac2049fe6a70e0dba2..b68f411708fbb82150a55e542a04c198feaef63c 100644 (file)
@@ -46,9 +46,6 @@ FL_FORM * FormPreamble::form() const
 void FormPreamble::build()
 {
    dialog_.reset(build_preamble());
-   // Workaround dumb xforms sizing bug
-   minw_ = form()->w;
-   minh_ = form()->h;
    
    fl_set_input_return(dialog_->input_preamble, FL_RETURN_CHANGED);
    // Manage the ok, apply and cancel/close buttons
index 3ac230e60e2530b09634708885f7d5fd54a9e602..2be994a0f19806a1287209604ba8e8f2327a3a8b 100644 (file)
@@ -172,10 +172,6 @@ void FormPreferences::build()
        bc().setUndoAll(dialog_->button_restore);
        bc().refresh();
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // build the tab folders
        converters_tab_.reset(build_outer_tab());
        look_n_feel_tab_.reset(build_outer_tab());
index 1e65b6d79c5d190bbb5b90beae0ccee1e6770573..66fe07dfe0c7a55f59450c60cdd377924ef7f9cb 100644 (file)
@@ -44,10 +44,6 @@ void FormPrint::build()
 {
        dialog_.reset(build_print());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // Manage the ok, apply and cancel/close buttons
        bc().setOK(dialog_->button_ok);
        bc().setApply(dialog_->button_apply);
index f2a1fa16d04dc4a95ff08ab918cf81f16bbdcadf..184bd2ac519f25e5fba1817e4eaee25f0a3b721f 100644 (file)
@@ -70,10 +70,6 @@ void FormRef::build()
                fl_addto_choice(dialog_->type,
                                _(InsetRef::types[i].gui_name.c_str()));
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        // Force the user to use the browser to change refs.
        fl_deactivate_object(dialog_->ref);
 
index f2be85def7bf8d603d6b4aaddb67de6f6b4d631d..30e121a636623f9c7d7d2892ab8d2861be01c451 100644 (file)
@@ -49,9 +49,6 @@ FL_FORM * FormSearch::form() const
 void FormSearch::build()
 {
    dialog_.reset(build_search());
-   // Workaround dumb xforms sizing bug
-   minw_ = form()->w;
-   minh_ = form()->h;
        
    // Manage the ok, apply and cancel/close buttons
    bc_.setCancel(dialog_->button_cancel);
index 515fa5945fb5c316bc412d49a479ede751555202..e83643eddeb7ac7f7706fd119c23cd26c53395ec 100644 (file)
@@ -106,10 +106,6 @@ void FormTabular::build()
        cell_options_.reset(build_cell_options());
        longtable_options_.reset(build_longtable_options());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(column_options_->input_column_width,
                            FL_RETURN_END);
        fl_set_input_return(column_options_->input_special_alignment,
index 58856bf37e915bf2c3b2eee35782b4432926a1fb..2b8a0f57d28df39235ea604ae28f1982e44bc740 100644 (file)
@@ -58,10 +58,6 @@ void FormTabularCreate::build()
 {
        dialog_.reset(build_tabular_create());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_slider_bounds(dialog_->slider_rows, 1, 50);
        fl_set_slider_bounds(dialog_->slider_columns, 1, 50);
        fl_set_slider_value(dialog_->slider_rows, 5);
index 65da209551b65729011e90a6734b5c05e7bbe04a..f69f633e7cc06a1768085b1806dbea118b528491 100644 (file)
@@ -76,11 +76,6 @@ void FormToc::build()
                fl_addto_choice(dialog_->choice_toc_type, cit->first.c_str());
        }
 #endif
-       // Don't need to limit size of this dialog
-       // (but fixing min size is a GOOD thing).
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
 
         // Manage the cancel/close button
        bc().setCancel(dialog_->button_cancel);
index bfcf7008385e840273a6b434ffb726754e0118bb..78b2cad0f04e1f0e5da6d2255c43f661f21e7851 100644 (file)
@@ -55,10 +55,6 @@ void FormUrl::build()
 {
        dialog_.reset(build_url());
 
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
-
        fl_set_input_return(dialog_->name, FL_RETURN_CHANGED);
        fl_set_input_return(dialog_->url,  FL_RETURN_CHANGED);
 
index 3c8e487e366625611f4f408bdec44764ef7b2998..cb78c0d61bbc34aef1ecd16f0bd520c309b58cd8 100644 (file)
@@ -13,10 +13,10 @@ LYXDATADIRS = forms
 ETAGS_ARGS = --lang=c++
 # Alphabetical order please.  It makes it easier to figure out what's missing. 
 libxforms_la_SOURCES = \
-       Color.C \
-       Color.h \
        bmtable.c \
        bmtable.h \
+       Color.C \
+       Color.h \
        combox.C \
        combox.h \
        Dialogs.C \
@@ -86,10 +86,28 @@ libxforms_la_SOURCES = \
        FormInset.h \
        FormLog.C \
        FormLog.h \
-       FormMaths.C \
-       FormMaths.h \
-       form_maths.C \
-       form_maths.h \
+       FormMathsBitmap.C \
+       FormMathsBitmap.h \
+       FormMathsDeco.C \
+       FormMathsDeco.h \
+       form_maths_deco.C \
+       form_maths_deco.h \
+       FormMathsDelim.C \
+       FormMathsDelim.h \
+       form_maths_delim.C \
+       form_maths_delim.h \
+       FormMathsMatrix.C \
+       FormMathsMatrix.h \
+       form_maths_matrix.C \
+       form_maths_matrix.h \
+       FormMathsPanel.C \
+       FormMathsPanel.h \
+       form_maths_panel.C \
+       form_maths_panel.h \
+       FormMathsSpace.C \
+       FormMathsSpace.h \
+       form_maths_space.C \
+       form_maths_space.h \
        FormMinipage.C \
        FormMinipage.h \
        form_minipage.C \
index 617f13a6f824aa7bc8d94259b8c3629c57f0296a..e14432f868a7c15aaf0f45695886780edbc6495b 100644 (file)
 #pragma implementation
 #endif
 
-#include "support/lstrings.h"
 #include "support/LAssert.h" 
 #include "debug.h"
 
 #include "MathsSymbols.h"
-#include "FormMaths.h"
+#include "FormMathsPanel.h"
  
 using std::max;
 using std::endl;
 using std::ostream;
 
 /* Latex code for those bitmaps */
-static
-char const * latex_greek[] = {
-       "Gamma", "Delta", "Theta", "Lambda", "Xi", "Pi",
-       "Sigma", "Upsilon", "Phi", "Psi", "Omega",
-       "alpha", "beta", "gamma", "delta", "epsilon", "varepsilon", "zeta",
-       "eta", "theta", "vartheta", "iota", "kappa", "lambda", "mu",
-       "nu", "xi", "pi", "varpi", "rho", "sigma", "varsigma",
-       "tau", "upsilon", "phi", "varphi", "chi", "psi", "omega", ""
-};
 
-static
-char const * latex_brel[] = {
-       "leq", "geq", "equiv", "models",
-       "prec", "succ", "sim", "perp",
-       "preceq", "succeq", "simeq", "mid",
-       "ll", "gg", "asymp", "parallel",
-       "subset", "supset", "approx", "smile",
-       "subseteq", "supseteq", "cong", "frown",
-       "sqsubseteq", "sqsupseteq", "doteq", "neq",
-       "in", "ni", "propto", "notin",
-       "vdash", "dashv", "bowtie", ""
+#include "greek.xbm"
+#include "arrows.xbm"
+#include "brel.xbm"
+#include "bop.xbm"
+#include "misc.xbm"
+#include "varsz.xbm"
+#include "dots.xbm"
+#include "mathed/math_parser.h"
+#include "frac.xpm"
+#include "sqrt.xpm"
+#include "delim.xbm"
+#include "delim.xpm"
+#include "deco.xbm"
+#include "deco.xpm"
+#include "space.xpm"
+#include "matrix.xpm"
+#include "equation.xpm"
+
+char const * function_names[] = {
+       "arccos", "arcsin", "arctan", "arg", "bmod",
+       "cos", "cosh", "cot", "coth", "csc", "deg",
+       "det", "dim", "exp", "gcd", "hom", "inf", "ker",
+       "lg", "lim", "liminf", "limsup", "ln", "log",
+       "max", "min", "sec", "sin", "sinh", "sup",
+       "tan", "tanh"
 };
 
-static
+int const nr_function_names = sizeof(function_names) /
+                                    sizeof(char const *);
+
 char const * latex_arrow[] = {
        "downarrow", "leftarrow", "Downarrow", "Leftarrow",
        "hookleftarrow", "rightarrow", "uparrow", "Rightarrow", "Uparrow",
@@ -63,15 +69,8 @@ char const * latex_arrow[] = {
        "nwarrow", "nearrow", "swarrow", "searrow",  "",
 };
 
-char const * latex_varsz[] = {
-       "sum", "int", "oint",
-       "prod", "coprod", "bigsqcup",
-       "bigotimes", "bigodot", "bigoplus",
-       "bigcap", "bigcup", "biguplus",
-       "bigvee", "bigwedge", ""
-};
+int const nr_latex_arrow = sizeof(latex_arrow) / sizeof(char const *);
 
-static
 char const * latex_bop[] = {
        "pm", "cap", "diamond", "oplus",
        "mp", "cup", "bigtriangleup", "ominus",
@@ -83,222 +82,59 @@ char const * latex_bop[] = {
        "bullet", "wr", "ddagger", ""
 };
 
-static
-char const * latex_misc[] = {
-       "nabla", "partial", "infty", "prime", "ell",
-       "emptyset", "exists", "forall", "imath",  "jmath",
-       "Re", "Im", "aleph", "wp", "hbar",
-       "angle", "top", "bot", "Vert", "neg",
-       "flat", "natural", "sharp", "surd", "triangle",
-       "diamondsuit", "heartsuit", "clubsuit", "spadesuit", ""
+int const nr_latex_bop = sizeof(latex_bop) / sizeof(char const *);
+
+char const * latex_brel[] = {
+       "leq", "geq", "equiv", "models",
+       "prec", "succ", "sim", "perp",
+       "preceq", "succeq", "simeq", "mid",
+       "ll", "gg", "asymp", "parallel",
+       "subset", "supset", "approx", "smile",
+       "subseteq", "supseteq", "cong", "frown",
+       "sqsubseteq", "sqsupseteq", "doteq", "neq",
+       "in", "ni", "propto", "notin",
+       "vdash", "dashv", "bowtie", ""
 };
 
-static
+int const nr_latex_brel = sizeof(latex_brel) / sizeof(char const *);
+
 char const * latex_dots[] = {
        "ldots", "cdots", "vdots", "ddots"
 };
 
-BitmapMenu * BitmapMenu::active = 0;
+int const nr_latex_dots = sizeof(latex_dots) / sizeof(char const *);
 
-extern "C" void C_MathsSymbolsBitmapCB(FL_OBJECT * ob, long data)
-{
-       BitmapMenu * menu = static_cast<BitmapMenu*>(ob->u_vdata);
-       int const i = menu->GetIndex(ob);
-       string str;
-
-       lyxerr[Debug::GUI] << "Bitmap callback value " << data << endl;
-       if (i < 0) 
-               return;
-       switch (data) {
-               case MM_GREEK:
-                       str = latex_greek[i];
-                       break;
-               case MM_ARROW:
-                       str = latex_arrow[i];
-                       break;
-               case MM_BRELATS:
-                       str = latex_brel[i];
-                       break;
-               case MM_BOP:
-                       str = latex_bop[i];
-                       break;
-               case MM_VARSIZE:
-                       str = latex_varsz[i];
-                       break;
-               case MM_MISC:
-                       str = latex_misc[i];
-                       break;
-               case MM_DOTS:
-                       /* ewww */
-                       str = latex_dots[i - 29];
-                       break;
-               default:
-                       Assert(false);
-                       break;
-       }
-
-       menu->form_->insertSymbol(str);
-       menu->hide();
-}
-
-extern "C" int C_MathsSymbolsPeekCB(FL_FORM *, void * xev)
-{
-       if (!BitmapMenu::active)
-               return 0;
-
-       if (static_cast<XEvent *>(xev)->type == ButtonPress) {
-               BitmapMenu::active->hide();
-               return 1;
-       }
-       if (static_cast<XEvent *>(xev)->type != KeyPress)
-               return 0;
-
-       /* yuck */
-       char c[5];
-       KeySym keysym;
-       XLookupString(&static_cast<XEvent *>(xev)->xkey, &c[0], 5, &keysym, 0);
-       if (keysym == XK_Left)
-               BitmapMenu::active->prev(); 
-       else if (keysym == XK_Right)
-               BitmapMenu::active->next();
-       else
-               BitmapMenu::active->hide();
-       return 1;
-}
-
-
-BitmapMenu::BitmapMenu(FormMaths * f, int n,  FL_OBJECT * bt, BitmapMenu * prevx)
-       : current_(0), bitmaps_(n), form_(f)
-{
-       w = h = 0;
-       form = 0;
-       ww = 2 * FL_abs(FL_BOUND_WIDTH);
-       x = y = ww;
-       y += 8;
-       button = bt;
-       button->u_vdata = this;
-       prev_ = prevx;
-       next_ = 0;
-       if (prev_)
-               prev_->next_ = this;
-}
-
-
-BitmapMenu::~BitmapMenu()
-{
-       delete next_;
-       if (form->visible) 
-               hide();
-       fl_free_form(form);
-}
-
-
-void BitmapMenu::hide()
-{
-       fl_hide_form(form);
-       fl_set_button(button, 0);
-       active = 0;
-}
-
-
-void BitmapMenu::show()
-{
-       if (active)
-               active->hide();
-       active = this;
-       fl_set_button(button, 1);
-       fl_show_form(form, FL_PLACE_MOUSE, FL_NOBORDER, "");
-}
-
-
-FL_OBJECT *
-BitmapMenu::AddBitmap(int id, int nx, int ny, int bw, int bh,
-                     unsigned char const * data, bool vert)
-{
-       if (current_ >= bitmaps_.size())
-               return 0;
-       int wx = bw + ww / 2;
-       int wy = bh + ww / 2;
-       wx += (wx % nx);
-       wy += (wy % ny);
-       FL_OBJECT * obj = fl_create_bmtable(1, x, y, wx, wy, "");
-       fl_set_object_callback(obj, C_MathsSymbolsBitmapCB, id);
-       fl_set_object_lcol(obj, FL_BLUE);
-       fl_set_object_boxtype(obj, FL_UP_BOX);
-       fl_set_bmtable_data(obj, nx, ny, bw, bh, data);
-       if (vert) {
-               y += wy + 8;
-               h = max(y, h);
-               w = max(x + wx + ww, w);
-       } else  {
-               x += wx + 8;
-               w = max(x, w);
-               h = max(y + wy + ww, h);
-       }
-       bitmaps_[current_++] = obj;
-       return obj;
-}
+char const * latex_greek[] = {
+       "Gamma", "Delta", "Theta", "Lambda", "Xi", "Pi",
+       "Sigma", "Upsilon", "Phi", "Psi", "Omega",
+       "alpha", "beta", "gamma", "delta", "epsilon", "varepsilon", "zeta",
+       "eta", "theta", "vartheta", "iota", "kappa", "lambda", "mu",
+       "nu", "xi", "pi", "varpi", "rho", "sigma", "varsigma",
+       "tau", "upsilon", "phi", "varphi", "chi", "psi", "omega", ""
+};
 
+int const nr_latex_greek = sizeof(latex_greek) / sizeof(char const *);
 
-void BitmapMenu::create()
-{
-       Assert(current_ >= bitmaps_.size());
-       form = fl_bgn_form(FL_UP_BOX, w, h);
-       for (current_ = 0; current_ < bitmaps_.size(); ++current_) {
-               fl_add_object(form, bitmaps_[current_]);
-               bitmaps_[current_]->u_vdata = this;
-       }
-       fl_end_form();
-       fl_register_raw_callback(form, KeyPressMask, C_MathsSymbolsPeekCB);
-}
-
+char const * latex_misc[] = {
+       "nabla", "partial", "infty", "prime", "ell",
+       "emptyset", "exists", "forall", "imath",  "jmath",
+       "Re", "Im", "aleph", "wp", "hbar",
+       "angle", "top", "bot", "Vert", "neg",
+       "flat", "natural", "sharp", "surd", "triangle",
+       "diamondsuit", "heartsuit", "clubsuit", "spadesuit", ""
+};
 
-int BitmapMenu::GetIndex(FL_OBJECT * ob)
-{
-       if (active == this) {
-               int k = 0;
-               for (current_ = 0; current_ < bitmaps_.size(); ++current_) {
-                       if (bitmaps_[current_] == ob)
-                               return k + fl_get_bmtable(ob);
-                       k += fl_get_bmtable_maxitems(bitmaps_[current_]);
-               }
-       }
-       return -1;
-}
+int const nr_latex_misc = sizeof(latex_misc) / sizeof(char const *);
 
-/* the below is stuff used by Toolbar to make icons. It should be elsewhere
- * but depends on the name arrays above ...
- */
+char const * latex_varsz[] = {
+       "sum", "int", "oint",
+       "prod", "coprod", "bigsqcup",
+       "bigotimes", "bigodot", "bigoplus",
+       "bigcap", "bigcup", "biguplus",
+       "bigvee", "bigwedge", ""
+};
 
-#include "greek.xbm"
-#include "arrows.xbm"
-#include "brel.xbm"
-#include "bop.xbm"
-#include "misc.xbm"
-#include "varsz.xbm"
-#include "dots.xbm"
-#include "mathed/math_parser.h"
-#include "frac.xpm"
-#include "sqrt.xpm"
-#include "delim.xbm"
-#include "delim.xpm"
-#include "deco.xbm"
-#include "deco.xpm"
-#include "space.xpm"
-#include "matrix.xpm"
-#include "equation.xpm"
+int const nr_latex_varsz = sizeof(latex_varsz) / sizeof(char const *);
 
 static char const ** mathed_get_pixmap_from_icon(int d)
 {
index 749430c37904e221cf8476ecb136ac9b95b632ba..f31a276ba91f80fe4ed32dd71b3951392be9dee0 100644 (file)
 #ifndef MATHS_SYMBOLS_H
 #define MATHS_SYMBOLS_H
 
-#include <vector>
-
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include "bmtable.h"
 
-class FormMaths;
-/// Class to manage bitmap menu bars
-class BitmapMenu {
-       ///
-       friend int peek_event(FL_FORM *, void *);
-       ///
-       typedef std::vector<FL_OBJECT *> bitmaps_type;
-       ///
-       typedef bitmaps_type::size_type size_type;
-       ///
-       BitmapMenu * next_;
-       ///
-       BitmapMenu * prev_;
-       /// Border width
-       int ww;
-       ///
-       int x;
-       ///
-       int y;
-       ///
-       int w;
-       ///
-       int h;
-       ///
-       FL_FORM * form;
-       /// Current bitmap
-       size_type current_;
-       ///
-       bitmaps_type bitmaps_;
-       ///
-       FL_OBJECT * button;
-public:
-       ///
-       BitmapMenu(FormMaths * f, int n, FL_OBJECT * bt, BitmapMenu * prevx = 0);
-       ///
-       ~BitmapMenu();
-       ///
-       FL_OBJECT * AddBitmap(int id,
-                             int nx, int ny, int bw, int bh,
-                             unsigned char const * data,
-                             bool vert = true);
-       ///
-       void create();
-       ///
-       void hide();
-       ///
-       void show();
-       ///
-       void prev();
-       ///
-       void next();
-       ///
-       int GetIndex(FL_OBJECT * ob);
+extern char const * function_names[];
+extern int const nr_function_names;
+extern char const * latex_arrow[];
+extern int const nr_latex_arrow;
+extern char const * latex_bop[];
+extern int const nr_latex_bop;
+extern char const * latex_brel[];
+extern int const nr_latex_brel;
+extern char const * latex_dots[];
+extern int const nr_latex_dots;
+extern char const * latex_greek[];
+extern int const nr_latex_greek;
+extern char const * latex_misc[];
+extern int const nr_latex_misc;
+extern char const * latex_varsz[];
+extern int const nr_latex_varsz;
+
+char const ** get_pixmap_from_symbol(char const *, int, int);
  
-       /// the parent FormMaths 
-       FormMaths * form_;
-       ///
-       static BitmapMenu * active;
-};
-
-
-inline
-void BitmapMenu::prev()
-{
-       hide();
-       if (prev_)
-               prev_->show();
-}
-
-
-inline
-void BitmapMenu::next()
-{
-       hide();
-       if (next_)
-               next_->show();
-}
-
-
 #endif /* MATHS_SYMBOLS_H */
index 7718cbbe654ebd3e2e3cb38d8047be7f7e3c857d..7c7a58e3bc5b447cf9c310c5280093bff07a7232 100644 (file)
@@ -33,8 +33,6 @@
 
 using std::endl;
 
-extern char const ** get_pixmap_from_symbol(char const * arg, int, int);
 extern LyXAction lyxaction;
 
 // some constants
diff --git a/src/frontends/xforms/form_maths.C b/src/frontends/xforms/form_maths.C
deleted file mode 100644 (file)
index 788b67f..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-#include "bmtable.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <stdlib.h>
-#include "form_maths.h"
-#include "FormMaths.h"
-
-FD_form_panel::~FD_form_panel()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_panel * FormMaths::build_panel()
-{
-  FL_OBJECT *obj;
-  FD_form_panel *fdui = new FD_form_panel;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 290, 172);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 290, 172, "");
-  fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 80, 14, 80, 30, _("Close "));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
-  fdui->browser_functions = obj = fl_add_browser(FL_SELECT_BROWSER, 180, 40, 94, 110, _("Functions"));
-    fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_FUNC);
-    fl_set_browser_hscrollbar(obj, FL_OFF);
-  fdui->button_greek = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 90, 50, 30, _("Greek"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lstyle(obj, 15);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_GREEK);
-  fdui->button_arrow = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 120, 50, 30, _("­ Û"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lstyle(obj, 15);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_ARROW);
-  fdui->button_boperator = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 90, 50, 30, _("± ´"));
-    fl_set_object_lsize(obj, 0);
-    fl_set_object_lstyle(obj, 15);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_BOP);
-  fdui->button_brelats = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 50, 30, _("£ @"));
-    fl_set_object_lsize(obj, 0);
-    fl_set_object_lstyle(obj, 15);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_BRELATS);
-  fdui->button_varsize = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 120, 50, 30, _("S  ò"));
-    fl_set_object_lsize(obj, 0);
-    fl_set_object_lstyle(obj, 15);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_VARSIZE);
-  fdui->button_misc = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 120, 50, 30, _("Misc"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_MISC);
-  fdui->button_equation = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 50, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_EQU);
-  fdui->button_sqrt = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 15, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_SQRT);
-  fdui->button_frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 15, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_lcolor(obj, FL_COL1);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_FRAC);
-  fdui->button_delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 50, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_DELIM);
-  fdui->button_matrix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 100, 50, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_MATRIX);
-  fdui->button_deco = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 50, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_DECO);
-  fdui->button_space = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 70, 50, 30, 30, "");
-    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsButtonCB, MM_SPACE);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_delim::~FD_form_delim()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_delim * FormMaths::build_delim()
-{
-  FL_OBJECT *obj;
-  FD_form_delim *fdui = new FD_form_delim;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 250, 260);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 250, 260, "");
-  fdui->bmtable_delim = obj = fl_add_bmtable(FL_PUSH_BUTTON, 40, 70, 170, 140, "");
-    fl_set_object_lcolor(obj, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, 2);
-
-  fdui->lado = fl_bgn_group();
-  {
-    char const * const dummy = N_("Right|#R");
-    fdui->radio_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 40, 40, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, 4);
-  {
-    char const * const dummy = N_("Left|#L");
-    fdui->radio_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 40, 10, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, 3);
-  fl_end_group();
-
-  {
-    char const * const dummy = N_("Cancel|^[");
-    fdui->button_delim_close = obj = fl_add_button(FL_NORMAL_BUTTON, 170, 220, 70, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, MM_CLOSE);
-  fdui->button_delim_pix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 20, 50, 40, "");
-    fl_set_object_color(obj, FL_COL1, FL_COL1);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, MM_APPLY);
-  {
-    char const * const dummy = N_("Apply|#A");
-    fdui->button_delim_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 90, 220, 70, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, MM_APPLY);
-  fdui->button_delim_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 220, 70, 30, _("OK"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDelimCB, MM_OK);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_matrix::~FD_form_matrix()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_matrix * FormMaths::build_matrix()
-{
-  FL_OBJECT *obj;
-  FD_form_matrix *fdui = new FD_form_matrix;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 280, 170);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 280, 170, "");
-  fdui->button_matrix_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 130, 80, 30, _("OK  "));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, MM_OK);
-  {
-    char const * const dummy = N_("Cancel|^[");
-    fdui->button_matrix_close = obj = fl_add_button(FL_NORMAL_BUTTON, 190, 130, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, MM_CLOSE);
-  fdui->slider_matrix_rows = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 30, 160, 30, _("Rows"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, -1);
-    fl_set_slider_precision(obj, 0);
-    fl_set_slider_bounds(obj, 1, 20);
-     fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
-  fdui->slider_matrix_columns = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 90, 160, 30, _("Columns "));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, 2);
-    fl_set_slider_precision(obj, 0);
-    fl_set_slider_bounds(obj, 1, 20);
-     fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
-  {
-    char const * const dummy = N_("Vertical align|#V");
-    fdui->choice_matrix_valign = obj = fl_add_choice(FL_NORMAL_CHOICE, 180, 30, 90, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, -1);
-  {
-    char const * const dummy = N_("Horizontal align|#H");
-    fdui->input_matrix_halign = obj = fl_add_input(FL_NORMAL_INPUT, 180, 90, 90, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_TOP);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, 2);
-  {
-    char const * const dummy = N_("Apply|#A");
-    fdui->button_matrix_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 100, 130, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsMatrixCB, MM_APPLY);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_deco::~FD_form_deco()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_deco * FormMaths::build_deco()
-{
-  FL_OBJECT *obj;
-  FD_form_deco *fdui = new FD_form_deco;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 160, 150);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 160, 150, "");
-  fdui->bmtable_deco = obj = fl_add_bmtable(FL_PUSH_BUTTON, 10, 10, 140, 90, "");
-    fl_set_object_lcolor(obj, FL_BLUE);
-    fl_set_object_callback(obj, C_FormMathsDecoCB, MM_APPLY);
-  fdui->button_deco_close = obj = fl_add_button(FL_RETURN_BUTTON, 30, 110, 100, 30, _("Close"));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsDecoCB, MM_CLOSE);
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
-FD_form_space::~FD_form_space()
-{
-  if ( form->visible ) fl_hide_form( form );
-  fl_free_form( form );
-}
-
-
-FD_form_space * FormMaths::build_space()
-{
-  FL_OBJECT *obj;
-  FD_form_space *fdui = new FD_form_space;
-
-  fdui->form = fl_bgn_form(FL_NO_BOX, 280, 150);
-  fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 280, 150, "");
-  fdui->button_space_menu = obj = fl_add_button(FL_RETURN_BUTTON, 10, 110, 80, 30, _("OK "));
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, MM_OK);
-  {
-    char const * const dummy = N_("Cancel|^[");
-    fdui->button_space_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 190, 110, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, MM_CLOSE);
-  {
-    char const * const dummy = N_("Apply|#A");
-    fdui->button_space_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 100, 110, 80, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, MM_APPLY);
-
-  fdui->spaces = fl_bgn_group();
-  {
-    char const * const dummy = N_("Thin|#T");
-    fdui->radio_space_thin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 10, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 1);
-  {
-    char const * const dummy = N_("Medium|#M");
-    fdui->radio_space_medium = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 40, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 2);
-  {
-    char const * const dummy = N_("Thick|#H");
-    fdui->radio_space_thick = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 70, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 3);
-  {
-    char const * const dummy = N_("Negative|#N");
-    fdui->radio_space_negative = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 10, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 0);
-  {
-    char const * const dummy = N_("Quadratin|#Q");
-    fdui->radio_space_quadratin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 40, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 4);
-  {
-    char const * const dummy = N_("2Quadratin|#2");
-    fdui->radio_space_twoquadratin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 70, 120, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
-    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
-    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormMathsSpaceCB, 5);
-  fl_end_group();
-
-  fl_end_form();
-
-  fdui->form->fdui = fdui;
-
-  return fdui;
-}
-/*---------------------------------------*/
-
diff --git a/src/frontends/xforms/form_maths.h b/src/frontends/xforms/form_maths.h
deleted file mode 100644 (file)
index 3e1e2ae..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_panel_h_
-#define FD_form_panel_h_
-
-/** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormMathsButtonCB(FL_OBJECT *, long);
-
-extern  "C" void C_FormMathsDelimCB(FL_OBJECT *, long);
-
-extern  "C" void C_FormMathsMatrixCB(FL_OBJECT *, long);
-
-extern  "C" void C_FormMathsDecoCB(FL_OBJECT *, long);
-
-extern  "C" void C_FormMathsSpaceCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-struct FD_form_panel {
-       ~FD_form_panel();
-
-       FL_FORM *form;
-       FL_OBJECT *button_close;
-       FL_OBJECT *browser_functions;
-       FL_OBJECT *button_greek;
-       FL_OBJECT *button_arrow;
-       FL_OBJECT *button_boperator;
-       FL_OBJECT *button_brelats;
-       FL_OBJECT *button_varsize;
-       FL_OBJECT *button_misc;
-       FL_OBJECT *button_equation;
-       FL_OBJECT *button_sqrt;
-       FL_OBJECT *button_frac;
-       FL_OBJECT *button_delim;
-       FL_OBJECT *button_matrix;
-       FL_OBJECT *button_deco;
-       FL_OBJECT *button_space;
-};
-struct FD_form_delim {
-       ~FD_form_delim();
-
-       FL_FORM *form;
-       FL_OBJECT *bmtable_delim;
-       FL_OBJECT *lado;
-       FL_OBJECT *radio_right;
-       FL_OBJECT *radio_left;
-       FL_OBJECT *button_delim_close;
-       FL_OBJECT *button_delim_pix;
-       FL_OBJECT *button_delim_apply;
-       FL_OBJECT *button_delim_ok;
-};
-struct FD_form_matrix {
-       ~FD_form_matrix();
-
-       FL_FORM *form;
-       FL_OBJECT *button_matrix_ok;
-       FL_OBJECT *button_matrix_close;
-       FL_OBJECT *slider_matrix_rows;
-       FL_OBJECT *slider_matrix_columns;
-       FL_OBJECT *choice_matrix_valign;
-       FL_OBJECT *input_matrix_halign;
-       FL_OBJECT *button_matrix_apply;
-};
-struct FD_form_deco {
-       ~FD_form_deco();
-
-       FL_FORM *form;
-       FL_OBJECT *bmtable_deco;
-       FL_OBJECT *button_deco_close;
-};
-struct FD_form_space {
-       ~FD_form_space();
-
-       FL_FORM *form;
-       FL_OBJECT *button_space_menu;
-       FL_OBJECT *button_space_cancel;
-       FL_OBJECT *button_space_apply;
-       FL_OBJECT *spaces;
-       FL_OBJECT *radio_space_thin;
-       FL_OBJECT *radio_space_medium;
-       FL_OBJECT *radio_space_thick;
-       FL_OBJECT *radio_space_negative;
-       FL_OBJECT *radio_space_quadratin;
-       FL_OBJECT *radio_space_twoquadratin;
-};
-
-#endif /* FD_form_panel_h_ */
diff --git a/src/frontends/xforms/form_maths_deco.C b/src/frontends/xforms/form_maths_deco.C
new file mode 100644 (file)
index 0000000..27dab33
--- /dev/null
@@ -0,0 +1,42 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+#include "bmtable.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_maths_deco.h"
+#include "FormMathsDeco.h"
+
+FD_form_maths_deco::~FD_form_maths_deco()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_maths_deco * FormMathsDeco::build_maths_deco()
+{
+  FL_OBJECT *obj;
+  FD_form_maths_deco *fdui = new FD_form_maths_deco;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 160, 150);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 160, 150, "");
+  fdui->bmtable = obj = fl_add_bmtable(FL_PUSH_BUTTON, 10, 10, 140, 90, "");
+    fl_set_object_lcolor(obj, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
+  fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 30, 110, 100, 30, _("Close"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_maths_deco.h b/src/frontends/xforms/form_maths_deco.h
new file mode 100644 (file)
index 0000000..c316f17
--- /dev/null
@@ -0,0 +1,21 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_maths_deco_h_
+#define FD_form_maths_deco_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_maths_deco {
+       ~FD_form_maths_deco();
+
+       FL_FORM *form;
+       FL_OBJECT *bmtable;
+       FL_OBJECT *button_cancel;
+};
+
+#endif /* FD_form_maths_deco_h_ */
diff --git a/src/frontends/xforms/form_maths_delim.C b/src/frontends/xforms/form_maths_delim.C
new file mode 100644 (file)
index 0000000..19abad2
--- /dev/null
@@ -0,0 +1,75 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+#include "bmtable.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_maths_delim.h"
+#include "FormMathsDelim.h"
+
+FD_form_maths_delim::~FD_form_maths_delim()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_maths_delim * FormMathsDelim::build_maths_delim()
+{
+  FL_OBJECT *obj;
+  FD_form_maths_delim *fdui = new FD_form_maths_delim;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 250, 260);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 250, 260, "");
+  fdui->bmtable = obj = fl_add_bmtable(FL_PUSH_BUTTON, 40, 70, 170, 140, "");
+    fl_set_object_lcolor(obj, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+
+  fdui->lado = fl_bgn_group();
+  {
+    char const * const dummy = N_("Right|#R");
+    fdui->radio_right = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 40, 40, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+  {
+    char const * const dummy = N_("Left|#L");
+    fdui->radio_left = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 40, 10, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+  fl_end_group();
+
+  {
+    char const * const dummy = N_("Cancel|^[");
+    fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 170, 220, 70, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  fdui->button_pix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 20, 50, 40, "");
+    fl_set_object_color(obj, FL_COL1, FL_COL1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
+  {
+    char const * const dummy = N_("Apply|#A");
+    fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 90, 220, 70, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
+  fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 220, 70, 30, _("OK"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_maths_delim.h b/src/frontends/xforms/form_maths_delim.h
new file mode 100644 (file)
index 0000000..9560584
--- /dev/null
@@ -0,0 +1,29 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_maths_delim_h_
+#define FD_form_maths_delim_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_maths_delim {
+       ~FD_form_maths_delim();
+
+       FL_FORM *form;
+       FL_OBJECT *bmtable;
+       FL_OBJECT *lado;
+       FL_OBJECT *radio_right;
+       FL_OBJECT *radio_left;
+       FL_OBJECT *button_cancel;
+       FL_OBJECT *button_pix;
+       FL_OBJECT *button_apply;
+       FL_OBJECT *button_ok;
+};
+
+#endif /* FD_form_maths_delim_h_ */
diff --git a/src/frontends/xforms/form_maths_matrix.C b/src/frontends/xforms/form_maths_matrix.C
new file mode 100644 (file)
index 0000000..f852ced
--- /dev/null
@@ -0,0 +1,83 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_maths_matrix.h"
+#include "FormMathsMatrix.h"
+
+FD_form_maths_matrix::~FD_form_maths_matrix()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_maths_matrix * FormMathsMatrix::build_maths_matrix()
+{
+  FL_OBJECT *obj;
+  FD_form_maths_matrix *fdui = new FD_form_maths_matrix;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 280, 170);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 280, 170, "");
+  fdui->slider_rows = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 30, 160, 30, _("Rows"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+    fl_set_slider_precision(obj, 0);
+    fl_set_slider_bounds(obj, 1, 20);
+     fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
+  fdui->slider_columns = obj = fl_add_valslider(FL_HOR_NICE_SLIDER, 10, 90, 160, 30, _("Columns "));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+    fl_set_slider_precision(obj, 0);
+    fl_set_slider_bounds(obj, 1, 20);
+     fl_set_slider_return(obj, FL_RETURN_END_CHANGED);
+  {
+    char const * const dummy = N_("Vertical align|#V");
+    fdui->choice_valign = obj = fl_add_choice(FL_NORMAL_CHOICE, 180, 30, 90, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+  {
+    char const * const dummy = N_("Horizontal align|#H");
+    fdui->input_halign = obj = fl_add_input(FL_NORMAL_INPUT, 180, 90, 90, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+  fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 130, 80, 30, _("OK  "));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
+  {
+    char const * const dummy = N_("Apply|#A");
+    fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 100, 130, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
+  {
+    char const * const dummy = N_("Cancel|^[");
+    fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 190, 130, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_maths_matrix.h b/src/frontends/xforms/form_maths_matrix.h
new file mode 100644 (file)
index 0000000..22521a1
--- /dev/null
@@ -0,0 +1,28 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_maths_matrix_h_
+#define FD_form_maths_matrix_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_maths_matrix {
+       ~FD_form_maths_matrix();
+
+       FL_FORM *form;
+       FL_OBJECT *slider_rows;
+       FL_OBJECT *slider_columns;
+       FL_OBJECT *choice_valign;
+       FL_OBJECT *input_halign;
+       FL_OBJECT *button_ok;
+       FL_OBJECT *button_apply;
+       FL_OBJECT *button_cancel;
+};
+
+#endif /* FD_form_maths_matrix_h_ */
diff --git a/src/frontends/xforms/form_maths_panel.C b/src/frontends/xforms/form_maths_panel.C
new file mode 100644 (file)
index 0000000..154c08e
--- /dev/null
@@ -0,0 +1,88 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_maths_panel.h"
+#include "FormMathsPanel.h"
+
+FD_form_maths_panel::~FD_form_maths_panel()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_maths_panel * FormMathsPanel::build_maths_panel()
+{
+  FL_OBJECT *obj;
+  FD_form_maths_panel *fdui = new FD_form_maths_panel;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 290, 172);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 290, 172, "");
+  fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 80, 14, 80, 30, _("Close "));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  fdui->browser_funcs = obj = fl_add_browser(FL_SELECT_BROWSER, 180, 40, 94, 110, _("Functions"));
+    fl_set_object_lalign(obj, FL_ALIGN_TOP);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FUNC);
+    fl_set_browser_hscrollbar(obj, FL_OFF);
+  fdui->button_greek = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 90, 50, 30, _("Greek"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, 15);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_GREEK);
+  fdui->button_arrow = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 120, 50, 30, _("­ Û"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, 15);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_ARROW);
+  fdui->button_boperator = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 90, 50, 30, _("± ´"));
+    fl_set_object_lsize(obj, 0);
+    fl_set_object_lstyle(obj, 15);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BOP);
+  fdui->button_brelats = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 90, 50, 30, _("£ @"));
+    fl_set_object_lsize(obj, 0);
+    fl_set_object_lstyle(obj, 15);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_BRELATS);
+  fdui->button_varsize = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 120, 50, 30, _("S  ò"));
+    fl_set_object_lsize(obj, 0);
+    fl_set_object_lstyle(obj, 15);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_VARSIZE);
+  fdui->button_misc = obj = fl_add_button(FL_NORMAL_BUTTON, 110, 120, 50, 30, _("Misc"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MISC);
+  fdui->button_equation = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 130, 50, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_EQU);
+  fdui->button_sqrt = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 15, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SQRT);
+  fdui->button_frac = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 15, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_lcolor(obj, FL_COL1);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_FRAC);
+  fdui->button_delim = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 50, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DELIM);
+  fdui->button_matrix = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 100, 50, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_MATRIX);
+  fdui->button_deco = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 40, 50, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_DECO);
+  fdui->button_space = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 70, 50, 30, 30, "");
+    fl_set_object_color(obj, FL_MCOL, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SPACE);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_maths_panel.h b/src/frontends/xforms/form_maths_panel.h
new file mode 100644 (file)
index 0000000..1224aba
--- /dev/null
@@ -0,0 +1,34 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_maths_panel_h_
+#define FD_form_maths_panel_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_maths_panel {
+       ~FD_form_maths_panel();
+
+       FL_FORM *form;
+       FL_OBJECT *button_close;
+       FL_OBJECT *browser_funcs;
+       FL_OBJECT *button_greek;
+       FL_OBJECT *button_arrow;
+       FL_OBJECT *button_boperator;
+       FL_OBJECT *button_brelats;
+       FL_OBJECT *button_varsize;
+       FL_OBJECT *button_misc;
+       FL_OBJECT *button_equation;
+       FL_OBJECT *button_sqrt;
+       FL_OBJECT *button_frac;
+       FL_OBJECT *button_delim;
+       FL_OBJECT *button_matrix;
+       FL_OBJECT *button_deco;
+       FL_OBJECT *button_space;
+};
+
+#endif /* FD_form_maths_panel_h_ */
diff --git a/src/frontends/xforms/form_maths_space.C b/src/frontends/xforms/form_maths_space.C
new file mode 100644 (file)
index 0000000..931a336
--- /dev/null
@@ -0,0 +1,104 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_maths_space.h"
+#include "FormMathsSpace.h"
+
+FD_form_maths_space::~FD_form_maths_space()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_maths_space * FormMathsSpace::build_maths_space()
+{
+  FL_OBJECT *obj;
+  FD_form_maths_space *fdui = new FD_form_maths_space;
+
+  fdui->form = fl_bgn_form(FL_NO_BOX, 280, 150);
+  fdui->form->u_vdata = this;
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 280, 150, "");
+
+  fdui->spaces = fl_bgn_group();
+  {
+    char const * const dummy = N_("Thin|#T");
+    fdui->radio_thin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 10, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 1);
+  {
+    char const * const dummy = N_("Medium|#M");
+    fdui->radio_medium = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 40, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 2);
+  {
+    char const * const dummy = N_("Thick|#H");
+    fdui->radio_thick = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 70, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 3);
+  {
+    char const * const dummy = N_("Negative|#N");
+    fdui->radio_negative = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 10, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+  {
+    char const * const dummy = N_("Quadratin|#Q");
+    fdui->radio_quadratin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 40, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 4);
+  {
+    char const * const dummy = N_("2Quadratin|#2");
+    fdui->radio_twoquadratin = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 70, 120, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 5);
+  fl_end_group();
+
+  fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 110, 80, 30, _("OK "));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
+  {
+    char const * const dummy = N_("Cancel|^[");
+    fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 190, 110, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  {
+    char const * const dummy = N_("Apply|#A");
+    fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 100, 110, 80, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
diff --git a/src/frontends/xforms/form_maths_space.h b/src/frontends/xforms/form_maths_space.h
new file mode 100644 (file)
index 0000000..bd4e94d
--- /dev/null
@@ -0,0 +1,31 @@
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_maths_space_h_
+#define FD_form_maths_space_h_
+
+/** Callbacks, globals and object handlers **/
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_maths_space {
+       ~FD_form_maths_space();
+
+       FL_FORM *form;
+       FL_OBJECT *spaces;
+       FL_OBJECT *radio_thin;
+       FL_OBJECT *radio_medium;
+       FL_OBJECT *radio_thick;
+       FL_OBJECT *radio_negative;
+       FL_OBJECT *radio_quadratin;
+       FL_OBJECT *radio_twoquadratin;
+       FL_OBJECT *button_ok;
+       FL_OBJECT *button_cancel;
+       FL_OBJECT *button_apply;
+};
+
+#endif /* FD_form_maths_space_h_ */
diff --git a/src/frontends/xforms/forms/form_maths.fd b/src/frontends/xforms/forms/form_maths.fd
deleted file mode 100644 (file)
index a136f8c..0000000
+++ /dev/null
@@ -1,930 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 5
-Unit of measure: FL_COORD_PIXEL
-SnapGrid: 2
-
-=============== FORM ===============
-Name: form_panel
-Width: 290
-Height: 172
-Number of Objects: 16
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 290 172
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 80 14 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close 
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_close
-callback: C_FormBaseDeprecatedCancelCB
-argument:
-
---------------------
-class: FL_BROWSER
-type: SELECT_BROWSER
-box: 180 40 94 110
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Functions
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: browser_functions
-callback: C_FormMathsButtonCB
-argument: MM_FUNC
-  h_pref: FL_OFF
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 90 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: 15
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Greek
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_greek
-callback: C_FormMathsButtonCB
-argument: MM_GREEK
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 10 120 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: 15
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: ­ Û
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_arrow
-callback: C_FormMathsButtonCB
-argument: MM_ARROW
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 60 90 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: 15
-size: 0
-lcol: FL_BLACK
-label: ± ´
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_boperator
-callback: C_FormMathsButtonCB
-argument: MM_BOP
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 110 90 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: 15
-size: 0
-lcol: FL_BLACK
-label: £ @
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_brelats
-callback: C_FormMathsButtonCB
-argument: MM_BRELATS
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 60 120 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: 15
-size: 0
-lcol: FL_BLACK
-label: S  ò
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_varsize
-callback: C_FormMathsButtonCB
-argument: MM_VARSIZE
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 110 120 50 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_TIMESITALIC_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Misc
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_misc
-callback: C_FormMathsButtonCB
-argument: MM_MISC
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 130 50 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_equation
-callback: C_FormMathsButtonCB
-argument: MM_EQU
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 10 15 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_sqrt
-callback: C_FormMathsButtonCB
-argument: MM_SQRT
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 40 15 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_COL1
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_frac
-callback: C_FormMathsButtonCB
-argument: MM_FRAC
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 10 50 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delim
-callback: C_FormMathsButtonCB
-argument: MM_DELIM
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 100 50 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_matrix
-callback: C_FormMathsButtonCB
-argument: MM_MATRIX
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 40 50 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_deco
-callback: C_FormMathsButtonCB
-argument: MM_DECO
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 70 50 30 30
-boxtype: FL_UP_BOX
-colors: FL_MCOL FL_BLUE
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_space
-callback: C_FormMathsButtonCB
-argument: MM_SPACE
-
-=============== FORM ===============
-Name: form_delim
-Width: 250
-Height: 260
-Number of Objects: 10
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 250 260
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: PUSH_BUTTON
-box: 40 70 170 140
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLUE
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: bmtable_delim
-callback: C_FormMathsDelimCB
-argument: 2
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: lado
-callback: 
-argument: 
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 40 40 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Right|#R
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_right
-callback: C_FormMathsDelimCB
-argument: 4
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 40 10 80 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Left|#L
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_left
-callback: C_FormMathsDelimCB
-argument: 3
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 170 220 70 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delim_close
-callback: C_FormMathsDelimCB
-argument: MM_CLOSE
-
---------------------
-class: FL_PIXMAPBUTTON
-type: NORMAL_BUTTON
-box: 130 20 50 40
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_BOTTOM
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delim_pix
-callback: C_FormMathsDelimCB
-argument: MM_APPLY
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 90 220 70 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delim_apply
-callback: C_FormMathsDelimCB
-argument: MM_APPLY
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 220 70 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_delim_ok
-callback: C_FormMathsDelimCB
-argument: MM_OK
-
-=============== FORM ===============
-Name: form_matrix
-Width: 280
-Height: 170
-Number of Objects: 8
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 280 170
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 130 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK  
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_matrix_ok
-callback: C_FormMathsMatrixCB
-argument: MM_OK
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 190 130 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_matrix_close
-callback: C_FormMathsMatrixCB
-argument: MM_CLOSE
-
---------------------
-class: FL_VALSLIDER
-type: HOR_NICE_SLIDER
-box: 10 30 160 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Rows
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: slider_matrix_rows
-callback: C_FormMathsMatrixCB
-argument: -1
-       bounds: 1 20
-       precision: 0
-       return: FL_RETURN_END_CHANGED
-
---------------------
-class: FL_VALSLIDER
-type: HOR_NICE_SLIDER
-box: 10 90 160 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Columns 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: slider_matrix_columns
-callback: C_FormMathsMatrixCB
-argument: 2
-       bounds: 1 20
-       precision: 0
-       return: FL_RETURN_END_CHANGED
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 180 30 90 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Vertical align|#V
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: choice_matrix_valign
-callback: C_FormMathsMatrixCB
-argument: -1
-
---------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 180 90 90 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Horizontal align|#H
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: input_matrix_halign
-callback: C_FormMathsMatrixCB
-argument: 2
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 100 130 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_matrix_apply
-callback: C_FormMathsMatrixCB
-argument: MM_APPLY
-
-=============== FORM ===============
-Name: form_deco
-Width: 160
-Height: 150
-Number of Objects: 3
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 160 150
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: PUSH_BUTTON
-box: 10 10 140 90
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLUE
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: bmtable_deco
-callback: C_FormMathsDecoCB
-argument: MM_APPLY
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 30 110 100 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_deco_close
-callback: C_FormMathsDecoCB
-argument: MM_CLOSE
-
-=============== FORM ===============
-Name: form_space
-Width: 280
-Height: 150
-Number of Objects: 12
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 280 150
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 10 110 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK 
-shortcut: ^M
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_space_menu
-callback: C_FormMathsSpaceCB
-argument: MM_OK
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 190 110 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Cancel|^[
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_space_cancel
-callback: C_FormMathsSpaceCB
-argument: MM_CLOSE
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 100 110 80 30
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_space_apply
-callback: C_FormMathsSpaceCB
-argument: MM_APPLY
-
---------------------
-class: FL_BEGIN_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: spaces
-callback: 
-argument: 
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 20 10 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Thin|#T
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_thin
-callback: C_FormMathsSpaceCB
-argument: 1
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 20 40 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Medium|#M
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_medium
-callback: C_FormMathsSpaceCB
-argument: 2
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 20 70 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Thick|#H
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_thick
-callback: C_FormMathsSpaceCB
-argument: 3
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 140 10 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Negative|#N
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_negative
-callback: C_FormMathsSpaceCB
-argument: 0
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 140 40 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Quadratin|#Q
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_quadratin
-callback: C_FormMathsSpaceCB
-argument: 4
-
---------------------
-class: FL_CHECKBUTTON
-type: RADIO_BUTTON
-box: 140 70 120 30
-boxtype: FL_NO_BOX
-colors: FL_MCOL FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: 2Quadratin|#2
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: radio_space_twoquadratin
-callback: C_FormMathsSpaceCB
-argument: 5
-
---------------------
-class: FL_END_GROUP
-type: 0
-box: 0 0 0 0
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
-==============================
-create_the_forms
diff --git a/src/frontends/xforms/forms/form_maths_deco.fd b/src/frontends/xforms/forms/form_maths_deco.fd
new file mode 100644 (file)
index 0000000..b113009
--- /dev/null
@@ -0,0 +1,71 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 2
+
+=============== FORM ===============
+Name: form_maths_deco
+Width: 160
+Height: 150
+Number of Objects: 3
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 160 150
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: PUSH_BUTTON
+box: 10 10 140 90
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLUE
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: bmtable
+callback: C_FormBaseDeprecatedApplyCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 30 110 100 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Close
+shortcut: ^M
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_cancel
+callback: C_FormBaseDeprecatedCancelCB
+argument
+
+==============================
+create_the_forms
diff --git a/src/frontends/xforms/forms/form_maths_delim.fd b/src/frontends/xforms/forms/form_maths_delim.fd
new file mode 100644 (file)
index 0000000..59455a5
--- /dev/null
@@ -0,0 +1,197 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 2
+
+=============== FORM ===============
+Name: form_maths_delim
+Width: 250
+Height: 260
+Number of Objects: 10
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 250 260
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: PUSH_BUTTON
+box: 40 70 170 140
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLUE
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: bmtable
+callback: C_FormBaseDeprecatedInputCB
+argument:
+
+--------------------
+class: FL_BEGIN_GROUP
+type: 0
+box: 0 0 0 0
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: lado
+callback: 
+argument: 
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 40 40 80 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Right|#R
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_right
+callback:
+argument:
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 40 10 80 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Left|#L
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_left
+callback:
+argument:
+
+--------------------
+class: FL_END_GROUP
+type: 0
+box: 0 0 0 0
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 170 220 70 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Cancel|^[
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_cancel
+callback: C_FormBaseDeprecatedCancelCB
+argument: 
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 130 20 50 40
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_pix
+callback: C_FormBaseDeprecatedApplyCB
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 90 220 70 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Apply|#A
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_apply
+callback: C_FormBaseDeprecatedApplyCB
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 10 220 70 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: OK
+shortcut: ^M
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_ok
+callback: C_FormBaseDeprecatedOKCB
+argument: 
+
+==============================
+create_the_forms
diff --git a/src/frontends/xforms/forms/form_maths_matrix.fd b/src/frontends/xforms/forms/form_maths_matrix.fd
new file mode 100644 (file)
index 0000000..19b45c2
--- /dev/null
@@ -0,0 +1,167 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 2
+
+=============== FORM ===============
+Name: form_maths_matrix
+Width: 280
+Height: 170
+Number of Objects: 8
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 280 170
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_VALSLIDER
+type: HOR_NICE_SLIDER
+box: 10 30 160 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Rows
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: slider_rows
+callback: C_FormBaseDeprecatedInputCB
+argument:
+       bounds: 1 20
+       precision: 0
+       return: FL_RETURN_END_CHANGED
+
+--------------------
+class: FL_VALSLIDER
+type: HOR_NICE_SLIDER
+box: 10 90 160 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Columns 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: slider_columns
+callback: C_FormBaseDeprecatedInputCB
+argument:
+       bounds: 1 20
+       precision: 0
+       return: FL_RETURN_END_CHANGED
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 180 30 90 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Vertical align|#V
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: choice_valign
+callback: C_FormBaseDeprecatedInputCB
+argument:
+
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 180 90 90 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Horizontal align|#H
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_halign
+callback: C_FormBaseDeprecatedInputCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 10 130 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: OK  
+shortcut: ^M
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_ok
+callback: C_FormBaseDeprecatedOKCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 100 130 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Apply|#A
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_apply
+callback: C_FormBaseDeprecatedApplyCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 190 130 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Cancel|^[
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_cancel
+callback: C_FormBaseDeprecatedCancelCB
+argument:
+
+==============================
+create_the_forms
diff --git a/src/frontends/xforms/forms/form_maths_panel.fd b/src/frontends/xforms/forms/form_maths_panel.fd
new file mode 100644 (file)
index 0000000..e865337
--- /dev/null
@@ -0,0 +1,306 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 2
+
+=============== FORM ===============
+Name: form_maths_panel
+Width: 290
+Height: 172
+Number of Objects: 16
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 290 172
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 80 14 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Close 
+shortcut: ^M
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_close
+callback: C_FormBaseDeprecatedCancelCB
+argument:
+
+--------------------
+class: FL_BROWSER
+type: SELECT_BROWSER
+box: 180 40 94 110
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_TOP
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Functions
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: browser_funcs
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_FUNC
+  h_pref: FL_OFF
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 10 90 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: 15
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Greek
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_greek
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_GREEK
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 10 120 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: 15
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: ­ Û
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_arrow
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_ARROW
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 60 90 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: 15
+size: 0
+lcol: FL_BLACK
+label: ± ´
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_boperator
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_BOP
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 110 90 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: 15
+size: 0
+lcol: FL_BLACK
+label: £ @
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_brelats
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_BRELATS
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 60 120 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: 15
+size: 0
+lcol: FL_BLACK
+label: S  ò
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_varsize
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_VARSIZE
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 110 120 50 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_TIMESITALIC_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Misc
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_misc
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_MISC
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 130 50 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_equation
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_EQU
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 10 15 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_sqrt
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_SQRT
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 40 15 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_COL1
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_frac
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_FRAC
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 10 50 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_delim
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_DELIM
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 100 50 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_matrix
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_MATRIX
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 40 50 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_deco
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_DECO
+
+--------------------
+class: FL_PIXMAPBUTTON
+type: NORMAL_BUTTON
+box: 70 50 30 30
+boxtype: FL_UP_BOX
+colors: FL_MCOL FL_BLUE
+alignment: FL_ALIGN_BOTTOM
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_space
+callback: C_FormBaseDeprecatedInputCB
+argument: MM_SPACE
+
+==============================
+create_the_forms
diff --git a/src/frontends/xforms/forms/form_maths_space.fd b/src/frontends/xforms/forms/form_maths_space.fd
new file mode 100644 (file)
index 0000000..851810f
--- /dev/null
@@ -0,0 +1,233 @@
+Magic: 13000
+
+Internal Form Definition File
+    (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 2
+
+=============== FORM ===============
+Name: form_maths_space
+Width: 280
+Height: 150
+Number of Objects: 12
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 280 150
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BEGIN_GROUP
+type: 0
+box: 0 0 0 0
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: spaces
+callback: 
+argument: 
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 20 10 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Thin|#T
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_thin
+callback: C_FormBaseDeprecatedInputCB
+argument: 1
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 20 40 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Medium|#M
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_medium
+callback: C_FormBaseDeprecatedInputCB
+argument: 2
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 20 70 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Thick|#H
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_thick
+callback: C_FormBaseDeprecatedInputCB
+argument: 3
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 140 10 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Negative|#N
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_negative
+callback: C_FormBaseDeprecatedInputCB
+argument: 0
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 140 40 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Quadratin|#Q
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_quadratin
+callback: C_FormBaseDeprecatedInputCB
+argument: 4
+
+--------------------
+class: FL_CHECKBUTTON
+type: RADIO_BUTTON
+box: 140 70 120 30
+boxtype: FL_NO_BOX
+colors: FL_MCOL FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 2Quadratin|#2
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: radio_twoquadratin
+callback: C_FormBaseDeprecatedInputCB
+argument: 5
+
+--------------------
+class: FL_END_GROUP
+type: 0
+box: 0 0 0 0
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 10 110 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: OK 
+shortcut: ^M
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_ok
+callback: C_FormBaseDeprecatedOKCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 190 110 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Cancel|^[
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_cancel
+callback: C_FormBaseDeprecatedCancelCB
+argument:
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 100 110 80 30
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Apply|#A
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_apply
+callback: C_FormBaseDeprecatedApplyCB
+argument:
+
+==============================
+create_the_forms
index 03cb90f9038aa72b620d0055013a320ee538335e..97442b0359a73b85097059c4929fd7edaf9065fc 100644 (file)
@@ -31,7 +31,11 @@ SRCS := form_bibitem.fd \
        form_graphics.fd \
        form_include.fd \
        form_index.fd \
-       form_maths.fd \
+       form_maths_deco.fd \
+       form_maths_delim.fd \
+       form_maths_matrix.fd \
+       form_maths_panel.fd \
+       form_maths_space.fd \
        form_paragraph.fd \
        form_preamble.fd \
        form_preferences.fd \