]> git.lyx.org Git - features.git/commitdiff
Angus's FormBase patch with tiny cleanup
authorAllan Rae <rae@lyx.org>
Wed, 27 Sep 2000 05:40:29 +0000 (05:40 +0000)
committerAllan Rae <rae@lyx.org>
Wed, 27 Sep 2000 05:40:29 +0000 (05:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1045 a592a061-630c-0410-9148-cb99ea01b6c8

33 files changed:
ChangeLog
src/buffer.C
src/frontends/xforms/FormBase.C
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormCommand.C
src/frontends/xforms/FormCommand.h
src/frontends/xforms/FormCopyright.C
src/frontends/xforms/FormCopyright.h
src/frontends/xforms/FormError.C
src/frontends/xforms/FormError.h
src/frontends/xforms/form_citation.C
src/frontends/xforms/form_citation.h
src/frontends/xforms/form_copyright.C
src/frontends/xforms/form_copyright.h
src/frontends/xforms/form_error.C
src/frontends/xforms/form_error.h
src/frontends/xforms/form_index.C
src/frontends/xforms/form_index.h
src/frontends/xforms/form_ref.C
src/frontends/xforms/form_ref.h
src/frontends/xforms/form_toc.C
src/frontends/xforms/form_toc.h
src/frontends/xforms/form_url.C
src/frontends/xforms/form_url.h
src/frontends/xforms/forms/form_citation.fd
src/frontends/xforms/forms/form_copyright.fd
src/frontends/xforms/forms/form_error.fd
src/frontends/xforms/forms/form_index.fd
src/frontends/xforms/forms/form_ref.fd
src/frontends/xforms/forms/form_toc.fd
src/frontends/xforms/forms/form_url.fd
src/frontends/xforms/forms/makefile
src/insets/insetfoot.C

index b3ffb672a4400effa0bfbcf107bbe8a5a10c2f22..3b61f6b1dbb25756868ae5e0a0eb33b7f71e9271 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2000-09-26  Angus Leeming <a.leeming@ic.ac.uk>
+
+       * src/buffer.C (readFile): block-if statement rearranged to minimise
+       bloat. Patch does not reverse Jean-Marc's change ;-)
+
+       * src/frontends/xforms/FormBase.[Ch]: Renamed some of the callbacks.
+       Class rewritten to store pointers to hide/update signals directly,
+       rather than Dialogs *. Also defined an enum to ease use. All xforms
+       forms can now be derived from this class.
+
+       * src/frontends/xforms/FormCommand.[Ch]
+       * src/frontends/xforms/FormCopyright.[Ch]: now derived from FormBase.
+
+       * src/frontends/xforms/FormError.[Ch]: moved inclusion of inseterror.h
+       out of header file.
+
+       * src/frontends/xforms/forms/form_citation.fd
+       * src/frontends/xforms/forms/form_copyright.fd
+       * src/frontends/xforms/forms/form_error.fd
+       * src/frontends/xforms/forms/form_index.fd
+       * src/frontends/xforms/forms/form_ref.fd
+       * src/frontends/xforms/forms/form_toc.fd
+       * src/frontends/xforms/forms/form_url.fd: remamed callbacks
+
+       * src/frontends/xforms/forms/makefile: small change to work with DEC sh.
+
+       * src/insets/insetfoot.C: removed redundent using directive.
+
 2000-09-26  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * lib/layouts/siamltex.layout: new textclass for SIAM journals,
index 6d8b78a8463e9736ac413e3436891c7453d91ca8..9858be66722547721787a08ffa5cdc5318207507 100644 (file)
@@ -937,107 +937,17 @@ void Buffer::readInset(LyXLex & lex, LyXParagraph *& par,
                       << endl;
        }
        
+       Inset * inset = 0;
+
        lex.next();
        string const tmptok = lex.GetString();
        last_inset_read = tmptok;
+
        // test the different insets
-       if (tmptok == "Quotes") {
-               Inset * inset = new InsetQuotes;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "External") {
-               Inset * inset = new InsetExternal;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "FormulaMacro") {
-               Inset * inset = new InsetFormulaMacro;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Formula") {
-               Inset * inset = new InsetFormula;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Figure") {
-               Inset * inset = new InsetFig(100, 100, this);
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Info") {
-               Inset * inset = new InsetInfo;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Include") {
-               InsetCommandParams p( "Include" );
-               Inset * inset = new InsetInclude(p, this);
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "ERT") {
-               Inset * inset = new InsetERT;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Tabular") {
-               Inset * inset = new InsetTabular(this);
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Text") {
-               Inset * inset = new InsetText;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Foot") {
-               Inset * inset = new InsetFoot;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Marginal") {
-               Inset * inset = new InsetMarginal;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Minipage") {
-               Inset * inset = new InsetMinipage;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Float") {
-               lex.next();
-               string const tmptok = lex.GetString();
-               Inset * inset = new InsetFloat(tmptok);
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "List") {
-               Inset * inset = new InsetList;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Theorem") {
-               Inset * inset = new InsetList;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "Caption") {
-               Inset * inset = new InsetCaption;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "GRAPHICS") {
-               Inset * inset = new InsetGraphics;
-               inset->Read(this, lex);
-               par->InsertInset(pos, inset, font);
-               ++pos;
-       } else if (tmptok == "LatexCommand") {
+       if (tmptok == "LatexCommand") {
                InsetCommandParams inscmd;
                inscmd.Read(lex);
-               Inset * inset = 0;
+
                if (inscmd.getCmdName() == "cite") {
                        inset = new InsetCitation(inscmd);
                } else if (inscmd.getCmdName() == "bibitem") {
@@ -1073,11 +983,54 @@ void Buffer::readInset(LyXLex & lex, LyXParagraph *& par,
                } else if (inscmd.getCmdName() == "lyxparent") {
                        inset = new InsetParent(inscmd, this);
                }
-               
-               if (inset) {
-                       par->InsertInset(pos, inset, font);
-                       ++pos;
+       } else {
+               if (tmptok == "Quotes") {
+                       inset = new InsetQuotes;
+               } else if (tmptok == "External") {
+                       inset = new InsetExternal;
+               } else if (tmptok == "FormulaMacro") {
+                       inset = new InsetFormulaMacro;
+               } else if (tmptok == "Formula") {
+                       inset = new InsetFormula;
+               } else if (tmptok == "Figure") {
+                       inset = new InsetFig(100, 100, this);
+               } else if (tmptok == "Info") {
+                       inset = new InsetInfo;
+               } else if (tmptok == "Include") {
+                       InsetCommandParams p( "Include" );
+                       inset = new InsetInclude(p, this);
+               } else if (tmptok == "ERT") {
+                       inset = new InsetERT;
+               } else if (tmptok == "Tabular") {
+                       inset = new InsetTabular(this);
+               } else if (tmptok == "Text") {
+                       inset = new InsetText;
+               } else if (tmptok == "Foot") {
+                       inset = new InsetFoot;
+               } else if (tmptok == "Marginal") {
+                       inset = new InsetMarginal;
+               } else if (tmptok == "Minipage") {
+                       inset = new InsetMinipage;
+               } else if (tmptok == "Float") {
+                       lex.next();
+                       string tmptok = lex.GetString();
+                       inset = new InsetFloat(tmptok);
+               } else if (tmptok == "List") {
+                       inset = new InsetList;
+               } else if (tmptok == "Theorem") {
+                       inset = new InsetList;
+               } else if (tmptok == "Caption") {
+                       inset = new InsetCaption;
+               } else if (tmptok == "GRAPHICS") {
+                       inset = new InsetGraphics;
                }
+               
+               if (inset) inset->Read(this, lex);
+       }
+       
+       if (inset) {
+               par->InsertInset(pos, inset, font);
+               ++pos;
        }
 }
 
index 3f9ed73bf9f33eb356e4799fd8002bb31ce1a3c0..a11d47a0e5cb8cb886fe376af1415d12fa6e2ec5 100644 (file)
 #include "FormBase.h"
 #include "xform_macros.h"
 
-C_RETURNCB(FormBase, WMHideCB)
+C_RETURNCB (FormBase, WMHideCB)
 C_GENERICCB(FormBase, ApplyCB)
-C_GENERICCB(FormBase, CancelCB)
+C_GENERICCB(FormBase, ApplyHideCB)
+C_GENERICCB(FormBase, HideCB)
 C_GENERICCB(FormBase, InputCB)
-C_GENERICCB(FormBase, OKCB)
 
-FormBase::FormBase(LyXView * lv, Dialogs * d, string const & t)
-       : lv_(lv), d_(d), u_(0), h_(0), title(t), dialogIsOpen(false)
-{}
 
+FormBase::FormBase(LyXView * lv, Dialogs * d, BufferDependency bd, string const & t)
+       : dialogIsOpen(false), lv_(lv), u_(0), h_(0), title(t)
+{
+       switch( bd ) {
+       case BUFFER_DEPENDENT:
+               hSignal_ = &d->hideBufferDependent;
+               uSignal_ = &d->updateBufferDependent;
+               break;
+       case BUFFER_INDEPENDENT:
+               hSignal_ = &d->hideAll;
+               uSignal_ = 0;
+               break;
+       }
+}
 
+               
 void FormBase::show()
 {
        if (!form()) {
@@ -52,10 +64,9 @@ void FormBase::show()
                             FL_PLACE_MOUSE | FL_FREE_SIZE,
                             FL_TRANSIENT,
                             title.c_str());
-               u_ = d_->updateBufferDependent.
-                        connect(slot(this, &FormBase::update));
-               h_ = d_->hideBufferDependent.
-                        connect(slot(this, &FormBase::hide));
+               if( uSignal_ )
+                       u_ = uSignal_->connect(slot(this, &FormBase::update));
+               h_ = hSignal_->connect(slot(this, &FormBase::hide));
        }
 }
 
@@ -91,23 +102,23 @@ void FormBase::ApplyCB(FL_OBJECT * ob, long)
 }
 
 
-void FormBase::CancelCB(FL_OBJECT * ob, long)
+void FormBase::ApplyHideCB(FL_OBJECT * ob, long)
 {
        FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
+       pre->apply();
        pre->hide();
 }
 
 
-void FormBase::InputCB(FL_OBJECT * ob, long data )
+void FormBase::HideCB(FL_OBJECT * ob, long)
 {
        FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       pre->input( data );
+       pre->hide();
 }
 
 
-void FormBase::OKCB(FL_OBJECT * ob, long)
+void FormBase::InputCB(FL_OBJECT * ob, long data )
 {
        FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
-       pre->apply();
-       pre->hide();
+       pre->input( data );
 }
index 00774e4cb9e29f0b9fec7835228f5e9253026620..d03525800e975607d63ef50cc65f6285d6d27adb 100644 (file)
@@ -24,30 +24,41 @@ class LyXView;
 #pragma interface
 #endif
 
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Signal0;
+#endif
+
 /** This class is an XForms GUI base class
  */
 class FormBase : public DialogBase, public noncopyable {
 public:
+       ///
+       enum BufferDependency {
+               ///
+               BUFFER_DEPENDENT,
+               ///
+               BUFFER_INDEPENDENT
+       };
+
        /// Constructor
-       FormBase(LyXView *, Dialogs *, string const &);
+       FormBase(LyXView *, Dialogs *, BufferDependency, string const &);
 
        /// Callback functions
        static  int WMHideCB(FL_FORM *, void *);
        ///
        static void ApplyCB(FL_OBJECT *, long);
        ///
-       static void CancelCB(FL_OBJECT *, long);
+       static void ApplyHideCB(FL_OBJECT *, long);
        ///
-       static void InputCB(FL_OBJECT *, long);
+       static void HideCB(FL_OBJECT *, long);
        ///
-       static void OKCB(FL_OBJECT *, long);
+       static void InputCB(FL_OBJECT *, long);
 
 protected:
        /// Create the dialog if necessary, update it and display it.
        void show();
        /// Hide the dialog.
        void hide();
-
        /// Build the dialog
        virtual void build() = 0;
        /// Filter the inputs on callback from xforms
@@ -61,26 +72,25 @@ protected:
        /// Pointer to the actual instantiation of xform's form
        virtual FL_FORM * const form() const = 0;
 
+       /// block opening of form twice at the same time
+       bool dialogIsOpen;
        /** Which LyXFunc do we use?
            We could modify Dialogs to have a visible LyXFunc* instead and
            save a couple of bytes per dialog.
        */
        LyXView * lv_;
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
+
 private:
+       /// Hide signal
+       Signal0<void> * hSignal_;
+       /// Update signal
+       Signal0<void> * uSignal_;
        /// Update connection.
        Connection u_;
        /// Hide connection.
        Connection h_;
        /// dialog title, displayed by WM.
        string title;
-
-protected:
-       /// block opening of form twice at the same time
-       bool dialogIsOpen;
 };
 
 #endif
index cdf64c0840ee0596b44a5903bdcbdc4800eec19e..73021bc8569db23dc611c78f58b4279fb5fe78f2 100644 (file)
 
 #include "Dialogs.h"
 #include "FormCommand.h"
-#include "xform_macros.h"
 
-C_RETURNCB(FormCommand, WMHideCB)
-C_GENERICCB(FormCommand, ApplyCB)
-C_GENERICCB(FormCommand, CancelCB)
-C_GENERICCB(FormCommand, InputCB)
-C_GENERICCB(FormCommand, OKCB)
-
-FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
-       : lv_(lv), d_(d), inset_(0), u_(0), h_(0), ih_(0),
-         dialogIsOpen(false), title(t)
+FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t )
+       : FormBase( lv, d, BUFFER_DEPENDENT, t ),
+         inset_(0), ih_(0)
 {}
 
 
@@ -53,86 +46,3 @@ void FormCommand::createInset( string const & arg )
        params.setFromString( arg );
        show();
 }
-
-
-void FormCommand::show()
-{
-       if (!form()) {
-               build();
-               fl_set_form_atclose(form(),
-                                   C_FormCommandWMHideCB, 0);
-       }
-
-       fl_freeze_form( form() );
-       update();  // make sure its up-to-date
-       fl_unfreeze_form( form() );
-
-       dialogIsOpen = true;
-       if (form()->visible) {
-               fl_raise_form(form());
-       } else {
-               fl_show_form(form(),
-                            FL_PLACE_MOUSE | FL_FREE_SIZE,
-                            FL_TRANSIENT,
-                            title.c_str());
-               u_ = d_->updateBufferDependent.
-                        connect(slot(this, &FormCommand::update));
-               h_ = d_->hideBufferDependent.
-                        connect(slot(this, &FormCommand::hide));
-       }
-}
-
-
-void FormCommand::hide()
-{
-       if (form() && form()->visible) {
-               fl_hide_form(form());
-               u_.disconnect();
-               h_.disconnect();
-       }
-
-       // free up the dialog for another inset
-       inset_ = 0;
-       ih_.disconnect();
-       dialogIsOpen = false;
-       clearStore();
-}
-
-
-int FormCommand::WMHideCB(FL_FORM * form, void *)
-{
-       // Ensure that the signals (u and h) are disconnected even if the
-       // window manager is used to close the dialog.
-       FormCommand * pre = static_cast<FormCommand*>(form->u_vdata);
-       pre->hide();
-       return FL_CANCEL;
-}
-
-
-void FormCommand::ApplyCB(FL_OBJECT * ob, long)
-{
-       FormCommand * pre = static_cast<FormCommand*>(ob->form->u_vdata);
-       pre->apply();
-}
-
-
-void FormCommand::CancelCB(FL_OBJECT * ob, long)
-{
-       FormCommand * pre = static_cast<FormCommand*>(ob->form->u_vdata);
-       pre->hide();
-}
-
-
-void FormCommand::InputCB(FL_OBJECT * ob, long data )
-{
-       FormCommand * pre = static_cast<FormCommand*>(ob->form->u_vdata);
-       pre->input( data );
-}
-
-
-void FormCommand::OKCB(FL_OBJECT * ob, long)
-{
-       FormCommand * pre = static_cast<FormCommand*>(ob->form->u_vdata);
-       pre->apply();
-       pre->hide();
-}
index 6fedf5e668bbb92ad5832d4f10a0046627564d94..0818a6e6d185553edc617e84c61391918968b7a1 100644 (file)
 #ifndef FORMCOMMAND_H
 #define FORMCOMMAND_H
 
-#include "DialogBase.h"
-#include "LString.h"
-#include "support/utility.hpp"
+#include "FormBase.h"
 #include "insets/insetcommand.h"
 
-class Dialogs;
-class LyXView;
-
 #ifdef __GNUG__
 #pragma interface
 #endif
@@ -27,20 +22,10 @@ class LyXView;
 /** This class is an XForms GUI base class to insets derived from
     InsetCommand
  */
-class FormCommand : public DialogBase, public noncopyable {
+class FormCommand : public FormBase {
 public:
        /// Constructor
-       FormCommand(LyXView *, Dialogs *, string const & );
-       ///
-       static  int WMHideCB(FL_FORM *, void *);
-       ///
-       static void ApplyCB(FL_OBJECT *, long);
-       ///
-       static void CancelCB(FL_OBJECT *, long);
-       ///
-       static void InputCB(FL_OBJECT *, long);
-       ///
-       static void OKCB(FL_OBJECT *, long);
+       FormCommand( LyXView *, Dialogs *, string const & );
 
 protected:
        /// Slot launching dialog to (possibly) create a new inset
@@ -48,48 +33,12 @@ protected:
        /// Slot launching dialog to an existing inset
        void showInset( InsetCommand * const );
 
-       /// Build the dialog
-       virtual void build() = 0;
-       /// Filter the inputs on callback from xforms
-       virtual void input( long ) = 0;
-       /// Update dialog before showing it
-       virtual void update() = 0;
-       /// Apply from dialog (modify or create inset)
-       virtual void apply() = 0;
-       /// delete derived class variables from hide()
-       virtual void clearStore() {}
-       /// Pointer to the actual instantiation of the xform's form
-       virtual FL_FORM * const form() const = 0;
-
-       /** Which LyXFunc do we use?
-           We could modify Dialogs to have a visible LyXFunc* instead and
-           save a couple of bytes per dialog.
-       */
-       LyXView * lv_;
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
        /// pointer to the inset passed through showInset (if any)
        InsetCommand * inset_;
        /// the nitty-griity. What is modified and passed back
        InsetCommandParams params;
-private:
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-
-       /// Update connection.
-       Connection u_;
-       /// Hide connection.
-       Connection h_;
        /// inset::hide connection.
        Connection ih_;
-       /// block opening of form from more than one inset
-       bool dialogIsOpen;
-       /// dialog title, displayed by WM.
-       string title;
 };
 
 #endif
index 75488fdbf9f9fce70e77dd162a9b7d70be44e024..9d0bef431dbea2a7826bef89a519226201fee27e 100644 (file)
 #pragma implementation
 #endif
 
-#include "xform_macros.h"
-#include "form_copyright.h"
-#include "FormCopyright.h"
 #include "Dialogs.h"
 #include "LyXView.h"
-#include "lyx_gui_misc.h"
 #include "gettext.h"
+#include "form_copyright.h"
+#include "FormCopyright.h"
 
-C_RETURNCB(FormCopyright, WMHideCB)
-C_GENERICCB(FormCopyright, OKCB)
-
-FormCopyright::FormCopyright(LyXView * lv, Dialogs * d)
-       : dialog_(0), lv_(lv), d_(d), h_(0)
+FormCopyright::FormCopyright( LyXView * lv, Dialogs * d        )
+       : FormBase( lv, d, BUFFER_INDEPENDENT, _("Copyright and Warranty") ),
+         dialog_(0)
 {
        // let the dialog be shown
        // This is a permanent connection so we won't bother
@@ -40,52 +36,13 @@ FormCopyright::~FormCopyright()
 void FormCopyright::build()
 {
        dialog_ = build_copyright();
-       fl_set_form_atclose(dialog_->form,
-                           C_FormCopyrightWMHideCB, 0);
-}
-
-
-void FormCopyright::show()
-{
-       if (!dialog_) {
-               build();
-       }
-
-       if (dialog_->form->visible) {
-               fl_raise_form(dialog_->form);
-       } else {
-               fl_show_form(dialog_->form,
-                            FL_PLACE_MOUSE,
-                            FL_FULLBORDER,
-                            _("Copyright and Warranty"));
-               h_ = d_->hideAll.connect(slot(this, &FormCopyright::hide));
-       }
-}
-
-
-void FormCopyright::hide()
-{
-       if (dialog_
-           && dialog_->form
-           && dialog_->form->visible) {
-               fl_hide_form(dialog_->form);
-               h_.disconnect();
-       }
-}
-
-
-int FormCopyright::WMHideCB(FL_FORM * form, void *)
-{
-       // Ensure that the signal h is disconnected even if the
-       // window manager is used to close the dialog.
-       FormCopyright * pre = static_cast<FormCopyright*>(form->u_vdata);
-       pre->hide();
-       return FL_CANCEL;
 }
 
 
-void FormCopyright::OKCB(FL_OBJECT * ob, long)
+FL_FORM * const FormCopyright::form() const
 {
-       FormCopyright * pre = static_cast<FormCopyright*>(ob->form->u_vdata);
-       pre->hide();
+       if( dialog_ ) // no need to test for dialog_->form
+               return dialog_->form;
+       else
+               return 0;
 }
index eb623e93114a6ac6cedd48a0fbdf23d07032face..fc56a2d9d1ca99066d616666f10a9cba262b1d07 100644 (file)
 #ifndef FORMCOPYRIGHT_H
 #define FORMCOPYRIGHT_H
 
-#include "DialogBase.h"
+#include "FormBase.h"
 #include "form_copyright.h"
-#include "support/utility.hpp"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-class Dialogs;
-class LyXView;
 struct FD_form_copyright;
 
 /** This class provides an XForms implementation of the FormCopyright Dialog.
  */
-class FormCopyright : public DialogBase, public noncopyable {
+class FormCopyright : public FormBase {
 public:
        /// #FormCopyright x(LyXFunc ..., Dialogs ...);#
        FormCopyright(LyXView *, Dialogs *);
        ///
        ~FormCopyright();
 
-       ///
-       static  int WMHideCB(FL_FORM *, void *);
-       ///
-       static void OKCB(FL_OBJECT *, long);
 private:
-       /// Create the dialog if necessary, update it and display it.
-       void show();
-       /// Hide the dialog.
-       void hide();
-       /// Not used but we've got to implement it.
-       void update() {}
-
        /// Build the dialog
        void build();
-       ///
+       /// Pointer to the actual instantiation of the xform's form
+       FL_FORM * const form() const;
+       /// Fdesign generated method
        FD_form_copyright * build_copyright();
 
        /// Real GUI implementation.
        FD_form_copyright * dialog_;
-       /** Which LyXFunc do we use?
-           We could modify Dialogs to have a visible LyXFunc* instead and
-           save a couple of bytes per dialog.
-       */
-       LyXView * lv_;
-       /** Which Dialogs do we belong to?
-           Used so we can get at the signals we have to connect to.
-       */
-       Dialogs * d_;
-       /// Hide connection.
-       Connection h_;
 };
 
 #endif
index 094d7188473c533ae39d09d2a107be76fdb23933..861c87080278ff4df5a0cfae53d4f89281bb8362 100644 (file)
 #include "Dialogs.h"
 #include "FormError.h"
 #include "form_error.h"
+#include "insets/inseterror.h"
 
 static int minh, minw;
 
-FormError::FormError(LyXView * lv, Dialogs * d)
-       : FormBase(lv, d, _("LaTeX Error")),
+FormError::FormError( LyXView * lv, Dialogs * d )
+       : FormBase( lv, d, BUFFER_DEPENDENT, _("LaTeX Error") ),
          dialog_(0), ih_(0), message_("")
 {
        // let the dialog be shown
index 522ac134c7717b3080e32bdffb7bda89ba7df34e..d84e098e10eda29bd499ad509b37e6c897c284f4 100644 (file)
@@ -17,8 +17,8 @@
 #endif
 
 #include "FormBase.h"
-#include "insets/inseterror.h"
 
+class InsetError;
 struct FD_form_error;
 
 /** This class provides an XForms implementation of the FormError Dialog.
index f0d88e80280a893dd693034ac386ec94cbed0da7..fb662bb87417bd7dcbd5d7c05cbdba15ccde7a27 100644 (file)
@@ -29,23 +29,23 @@ FD_form_citation * FormCitation::build_citation()
   fdui->citeBrsr = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 30, 180, 300, _("Inset keys"));
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormCommandInputCB, CITEBRSR);
+    fl_set_object_callback(obj, C_FormBaseInputCB, CITEBRSR);
   fdui->bibBrsr = obj = fl_add_browser(FL_HOLD_BROWSER, 240, 30, 180, 300, _("Bibliography keys"));
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormCommandInputCB, BIBBRSR);
+    fl_set_object_callback(obj, C_FormBaseInputCB, BIBBRSR);
   fdui->addBtn = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 30, 30, 30, _("@4->"));
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, ADD);
+    fl_set_object_callback(obj, C_FormBaseInputCB, ADD);
   fdui->delBtn = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 65, 30, 30, _("@9+"));
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, DELETE);
+    fl_set_object_callback(obj, C_FormBaseInputCB, DELETE);
   fdui->upBtn = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 100, 30, 30, _("@8->"));
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, UP);
+    fl_set_object_callback(obj, C_FormBaseInputCB, UP);
   fdui->downBtn = obj = fl_add_button(FL_NORMAL_BUTTON, 200, 135, 30, 30, _("@2->"));
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, DOWN);
+    fl_set_object_callback(obj, C_FormBaseInputCB, DOWN);
   fdui->infoBrsr = obj = fl_add_browser(FL_NORMAL_BROWSER, 10, 360, 410, 80, _("Info"));
     fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
     fl_set_object_resize(obj, FL_RESIZE_X);
@@ -58,11 +58,11 @@ FD_form_citation * FormCitation::build_citation()
     fl_set_object_resize(obj, FL_RESIZE_X);
   fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 230, 630, 90, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
   fdui->cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 630, 90, 30, _("Cancel"));
     fl_set_button_shortcut(obj, _("^["), 1);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 433f10c9c96eb1d01c3b28381bb95ac20b683abd..dfc2b889b482a16a0a1cd88059bc1a9bc1a63c7a 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_citation_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCommandInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 2909b4ff20cb44567d2a0a1e5972feff5b942498..f47d7ea012154c7c3c165faf83f53422d99ee899 100644 (file)
@@ -38,7 +38,7 @@ FD_form_copyright * FormCopyright::build_copyright()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_South, FL_South);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCopyrightOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   obj = fl_add_text(FL_NORMAL_TEXT, 10, 190, 430, 190, _("LyX is distributed in the hope that it will\nbe useful, but WITHOUT ANY WARRANTY;\nwithout even the implied warranty of MERCHANTABILITY\nor FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of\nthe GNU General Public License\nalong with this program; if not, write to\nthe Free Software Foundation, Inc., \n675 Mass Ave, Cambridge, MA 02139, USA."));
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
index 11a09e3fc1c853824d8c98cf457752b5cf99d13c..28f25ea400752c7498799c26a5d2a321adcdfffd 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_copyright_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCopyrightOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 7bd23ef3547fa8d9c62b8110b3963529961df44d..4b25c96cde0aa02247a8918e94f360934cfabb2d 100644 (file)
@@ -30,7 +30,7 @@ FD_form_error * FormError::build_error()
   obj = fl_add_button(FL_RETURN_BUTTON, 135, 200, 130, 30, _("Close"));
     fl_set_object_gravity(obj, FL_South, FL_South);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 7df3f4e4dce4f57d3e28823bbf35fe813bdc7766..e223e2d258530906264aae26225ebd55d8c0ced5 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_error_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index b814732bfd5313936457acd61b159a55aaf9ec21..17446bebe6c8fd89df8c25ed0e8f6e3cbc98757c 100644 (file)
@@ -33,10 +33,10 @@ FD_form_index * FormIndex::build_index()
     fl_set_button_shortcut(obj, _("^["), 1);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 300, 60, 100, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index ff0d71e4075d7115348647d8bb02b527492fd974..a824df1ad7ca3dfc2741d10e2f6aa6caf5e59a97 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_index_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCommandCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 67fa3b0ebb36851aa9ea320e2a567b7fbf83e59f..b28f33e32b67781727293d1e325f5377c3a8ce3a 100644 (file)
@@ -28,15 +28,15 @@ FD_form_ref * FormRef::build_ref()
   fdui->browser = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 10, 270, 280, "");
     fl_set_object_gravity(obj, FL_NorthWest, FL_NoGravity);
     fl_set_object_resize(obj, FL_RESIZE_X);
-    fl_set_object_callback(obj, C_FormCommandInputCB, 2);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 2);
   fdui->update = obj = fl_add_button(FL_NORMAL_BUTTON, 40, 300, 90, 30, _("Update"));
     fl_set_button_shortcut(obj, scex(_("Update|#U#u")), 1);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, 3);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 3);
   fdui->sort = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 170, 300, 30, 30, _("Sort"));
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_resize(obj, FL_RESIZE_NONE);
-    fl_set_object_callback(obj, C_FormCommandInputCB, 3);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 3);
   fdui->name = obj = fl_add_input(FL_NORMAL_INPUT, 370, 10, 150, 40, _("Name:"));
     fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast);
   fdui->ref = obj = fl_add_input(FL_NORMAL_INPUT, 370, 60, 150, 40, _("Reference:"));
@@ -46,17 +46,17 @@ FD_form_ref * FormRef::build_ref()
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lalign(obj, FL_ALIGN_TOP);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandInputCB, 4);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 4);
   fdui->go = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 200, 140, 40, _("Goto reference"));
     fl_set_button_shortcut(obj, scex(_("Goto reference|#G")), 1);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandInputCB, 1);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 1);
   fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 330, 300, 90, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
   fdui->cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 300, 90, 30, _("Cancel"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 3a3ccbf7b4b0c00728fda152079a5c29a907ff66..b756cef835906c812282baa05e99103dfea869b3 100644 (file)
@@ -5,9 +5,9 @@
 #define FD_form_ref_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCommandInputCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandOKCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 7c0ed2be3d9f55f184bf9dfbc59251ed1e98f9d1..0f5eaf517f28a8178eff4b9a91180f071b0c85a4 100644 (file)
@@ -27,21 +27,21 @@ FD_form_toc * FormToc::build_toc()
   obj = fl_add_box(FL_UP_BOX, 0, 0, 420, 340, "");
   fdui->browser = obj = fl_add_browser(FL_HOLD_BROWSER, 10, 10, 400, 280, "");
     fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
   obj = fl_add_button(FL_RETURN_BUTTON, 310, 300, 100, 30, _("Close"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   obj = fl_add_button(FL_NORMAL_BUTTON, 200, 300, 100, 30, _("Update"));
     fl_set_button_shortcut(obj, scex(_("Update|#U#u")), 1);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
   fdui->type = obj = fl_add_choice(FL_NORMAL_CHOICE, 60, 300, 130, 30, _("Type"));
     fl_set_object_shortcut(obj, scex(_("Type|#T#t")), 1);
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandApplyCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 9dc1db79b3bcb03c2f1b7982ce3700d7ba3ed526..bbaa9c7d57b57d0010ed3b1eea3edd86874abf1e 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_toc_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCommandApplyCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandCancelCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index 7347b055597c4f352e73941927a0754d24668476..00f4dfdadcafb6f0190e38ba4314298d63f1f16b 100644 (file)
@@ -44,10 +44,10 @@ FD_form_url * FormUrl::build_url()
     fl_set_button_shortcut(obj, _("^["), 1);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandCancelCB, 0);
+    fl_set_object_callback(obj, C_FormBaseHideCB, 0);
   fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 300, 100, 100, 30, _("OK"));
     fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
-    fl_set_object_callback(obj, C_FormCommandOKCB, 0);
+    fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index 848f745721512675e75b93b8ab7f6067415451b0..f0df9c20535bada9a66c65e5a0b701f119195483 100644 (file)
@@ -5,8 +5,8 @@
 #define FD_form_url_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormCommandCancelCB(FL_OBJECT *, long);
-extern  "C" void C_FormCommandOKCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
 
 
 /**** Forms and Objects ****/
index c9cfd956d80d343a1f9b2f09d2b8e38713980a51..c19618d0911b31bb0889686f0fa3ed5c71ae7d8b 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: citeBrsr
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: CITEBRSR
 
 --------------------
@@ -63,7 +63,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NoGravity FL_NoGravity
 name: bibBrsr
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: BIBBRSR
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: addBtn
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: ADD
 
 --------------------
@@ -99,7 +99,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: delBtn
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: DELETE
 
 --------------------
@@ -117,7 +117,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: upBtn
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: UP
 
 --------------------
@@ -135,7 +135,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: downBtn
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: DOWN
 
 --------------------
@@ -225,7 +225,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_SouthEast FL_SouthEast
 name: ok
-callback: C_FormCommandOKCB
+callback: C_FormBaseApplyHideCB
 argument: 0
 
 --------------------
@@ -243,7 +243,7 @@ shortcut: ^[
 resize: FL_RESIZE_ALL
 gravity: FL_SouthEast FL_SouthEast
 name: cancel
-callback: C_FormCommandCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 ==============================
index c412ad3d62ec4f7a10df12041d0eec05ad793d61..b97de7c6bb2ad15aa389418fad4c2b05f428a5f6 100644 (file)
@@ -81,7 +81,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_South FL_South
 name: button_ok
-callback: C_FormCopyrightOKCB
+callback: C_FormBaseHideCB
 argument: 0
 
 --------------------
index f452762ca9301ae15641a9d89e1aa552d1c0fd6e..dab91912418ef5617339373c9dbf6db37661f3ec 100644 (file)
@@ -63,7 +63,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_South FL_South
 name: 
-callback: C_FormBaseCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 ==============================
index 996cf87fa58fb0d1fb979bff120d357e18226986..2dd81da7a9c6a6f6cd1481fb428a02e9a4dce500 100644 (file)
@@ -63,7 +63,7 @@ shortcut: ^[
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: cancel
-callback: C_FormCommandCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_SouthEast FL_SouthEast
 name: ok
-callback: C_FormCommandOKCB
+callback: C_FormBaseApplyHideCB
 argument: 0
 
 ==============================
index 7ae42d51134d44c93900e8da5ce7710e536b3487..4356a56dd3594179d7532cb721641ea282ac7a9b 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_X
 gravity: FL_NorthWest FL_NoGravity
 name: browser
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: 2
 
 --------------------
@@ -63,7 +63,7 @@ shortcut: Update|#U#u
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: update
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: 3
 
 --------------------
@@ -81,7 +81,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_NoGravity FL_NoGravity
 name: sort
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: 3
 
 --------------------
@@ -135,7 +135,7 @@ shortcut: Reference type|#t
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: type
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: 4
 
 --------------------
@@ -153,7 +153,7 @@ shortcut: Goto reference|#G
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: go
-callback: C_FormCommandInputCB
+callback: C_FormBaseInputCB
 argument: 1
 
 --------------------
@@ -171,7 +171,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: ok
-callback: C_FormCommandOKCB
+callback: C_FormBaseApplyHideCB
 argument: 0
 
 --------------------
@@ -189,7 +189,7 @@ shortcut:
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: cancel
-callback: C_FormCommandCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 ==============================
index 50f1343f94b23363ed9917314e1da4590c6c1d78..a105682ecdc66deb6443d8f08d18f94ad308acc1 100644 (file)
@@ -45,7 +45,7 @@ shortcut:
 resize: FL_RESIZE_ALL
 gravity: FL_NorthWest FL_SouthEast
 name: browser
-callback: C_FormCommandApplyCB
+callback: C_FormBaseApplyCB
 argument: 0
 
 --------------------
@@ -63,7 +63,7 @@ shortcut: ^M
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: 
-callback: C_FormCommandCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 --------------------
@@ -81,7 +81,7 @@ shortcut: Update|#U#u
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: 
-callback: C_FormCommandApplyCB
+callback: C_FormBaseApplyCB
 argument: 0
 
 --------------------
@@ -99,7 +99,7 @@ shortcut: Type|#T#t
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: type
-callback: C_FormCommandApplyCB
+callback: C_FormBaseApplyCB
 argument: 0
 
 ==============================
index c16c5b83a93c60a588ce0f0c1b6428fa6489b1df..d60f5c1a90a59b7e4a982cc9537678f29ccd36f8 100644 (file)
@@ -99,7 +99,7 @@ shortcut: ^[
 resize: FL_RESIZE_NONE
 gravity: FL_SouthEast FL_SouthEast
 name: cancel
-callback: C_FormCommandCancelCB
+callback: C_FormBaseHideCB
 argument: 0
 
 --------------------
@@ -117,7 +117,7 @@ shortcut: ^M
 resize: FL_RESIZE_ALL
 gravity: FL_SouthEast FL_SouthEast
 name: ok
-callback: C_FormCommandOKCB
+callback: C_FormBaseApplyHideCB
 argument: 0
 
 ==============================
index c53066e9d4d1e00095d79bc47c20ae8aef98c834..6c24c3f9cb10b0213059d63e550486d521111240 100644 (file)
@@ -44,15 +44,15 @@ all:
 test: clean $(OBJS)
 
 updatesrc: test
-       for fil in *.C *.h ; do \
-               cmp -s $$fil ../$$fil || mv $$fil .. \
+       for fil in *.C *.h; \
+               do cmp -s $$fil ../$$fil || mv $$fil ..; \
        done
 
 .fd.C:
        ${SHELL} ./fdfix.sh $<
 
 clean:
-       rm -f *.[hcC] *.bak
+       rm -f *.[hHcC] *.bak
 
 distclean: clean
        rm -f *.orig *.rej *~
index c806568c2eefbeb1679ae891151818aff10f2ba7..03f3fae71440ce1b2c7a1dafdc52b847baaa4d43 100644 (file)
@@ -24,7 +24,6 @@
 #include "debug.h"
 
 using std::ostream;
-using std::endl;
 
 
 InsetFoot::InsetFoot()