]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormUrl.h
More pref work from Angus
[lyx.git] / src / frontends / xforms / FormUrl.h
index b4a804da2ffce1997c73752e749cf79a6f97564b..3aa21d665be0d47e5f3bb9de0ae8d1d573aec1d3 100644 (file)
 #ifndef FORMURL_H
 #define FORMURL_H
 
-#include "DialogBase.h"
-#include "LString.h"
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-class Dialogs;
-class LyXView;
-class InsetCommandParams;
-class InsetUrl;
+#include "FormInset.h"
 struct FD_form_url;
 
 /** This class provides an XForms implementation of the FormUrl Dialog.
  */
-class FormUrl : public DialogBase {
+class FormUrl : public FormCommand {
 public:
-       /**@name Constructors and Destructors */
-       //@{
        ///
        FormUrl(LyXView *, Dialogs *);
        ///
        ~FormUrl();
-       //@}
-
-       /**@name Real per-instance Callback Methods */
-       //@{
-       static  int WMHideCB(FL_FORM *, void *);
-       static void OKCB(FL_OBJECT *, long);
-       static void CancelCB(FL_OBJECT *, long);
-       //@}
-
 private:
-       FormUrl() {}
-       FormUrl(FormUrl &) : DialogBase() {}
-       
-       /**@name Slot Methods */
-       //@{
-       /// Create the dialog if necessary, update it and display it.
-       void createInset( string const & );
-       /// 
-       void showInset( InsetUrl * );
-       /// 
-       void show();
-       /// Hide the dialog.
-       void hide();
-       ///
-       void update();
-       //@}
-
-       /**@name Dialog internal methods */
-       //@{
-       /// Apply from dialog
-       void apply();
+       /// Connect signals etc. Set form's max size.
+       virtual void connect();
        /// Build the dialog
-       void build();
+       virtual void build();
+       /// Update dialog before showing it
+       virtual void update();
+       /// Apply from dialog (modify or create inset)
+       virtual void apply();
+       /// Pointer to the actual instantiation of the xform's form
+       virtual FL_FORM * form() const;
        ///
        FD_form_url * build_url();
-       /// Explicitly free the dialog.
-       void free();
-       //@}
-
-       /**@name Private Data */
-       //@{
        /// Real GUI implementation.
        FD_form_url * 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_;
-       /// Update connection.
-       Connection u_;
-       /// Hide connection.
-       Connection h_;
-       /// inset::hide connection.
-       Connection ih_;
-       ///
-       InsetUrl * inset_;
-       ///
-       bool dialogIsOpen;
-       ///
-       InsetCommandParams * params;
-       //@}
 };
 
 #endif