X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormUrl.h;h=23c984d75ffff884c9e6d1fff6259233507b5c82;hb=3e39bef2c13125023f3b72532d90575bbe307335;hp=c82f4f90254e78979b4e5ba2b5955aabdd7012c3;hpb=0d2e80687d14debf68f82c2282d53577a265b37d;p=lyx.git diff --git a/src/frontends/xforms/FormUrl.h b/src/frontends/xforms/FormUrl.h index c82f4f9025..23c984d75f 100644 --- a/src/frontends/xforms/FormUrl.h +++ b/src/frontends/xforms/FormUrl.h @@ -1,104 +1,40 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== +/** + * \file xforms/FormUrl.h + * Copyright 2000-2001 the LyX Team + * Read the file COPYING * - * LyX, The Document Processor - * - * Copyright 2000 The LyX Team. - * - * ====================================================== + * \author Angus Leeming, a.leeming@ic.ac.uk */ #ifndef FORMURL_H #define FORMURL_H -#include "DialogBase.h" -#include "LString.h" - -#include "support/utility.hpp" - -class Dialogs; -class LyXView; -class InsetCommandParams; -class InsetUrl; -struct FD_form_url; - #ifdef __GNUG__ #pragma interface #endif -/** This class provides an XForms implementation of the FormUrl Dialog. +#include "FormBase.h" + +class ControlUrl; +struct FD_form_url; + +/** This class provides an XForms implementation of the Url Dialog. */ -class FormUrl : public DialogBase, public noncopyable { +class FormUrl : public FormCB > { 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); - //@} + FormUrl(ControlUrl &); private: - /**@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(); + /// Apply from dialog (modify or create inset) + virtual void apply(); /// Build the dialog - void build(); - /// + virtual void build(); + /// Update dialog before showing it + virtual void update(); + /// Filter the inputs on callback from xforms 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 +#endif // FORMURL_H