X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormExternal.h;h=35c39958960f655cb5a1a02d62480b589b38c16e;hb=06c830f488023d8ff5c22cccee22c4effc8f65c3;hp=b6f95f7103fa003c7a1742f4682f6af55d850dca;hpb=5e188707552835c6de411a7f76566b14c78238e3;p=lyx.git diff --git a/src/frontends/xforms/FormExternal.h b/src/frontends/xforms/FormExternal.h index b6f95f7103..35c3995896 100644 --- a/src/frontends/xforms/FormExternal.h +++ b/src/frontends/xforms/FormExternal.h @@ -1,99 +1,56 @@ -/** - * \file FormExternal.h - * Copyright 2001 the LyX Team - * Read the file COPYING +// -*- C++ -*- +/* This file is part of + * ====================================================== + * + * LyX, The Document Processor + * + * Copyright 2000-2001 The LyX Team. * - * \author unknown + * ====================================================== + * + * \file FormExternal.h + * \author Asger Alstrup * \author John Levon + * \author Angus Leeming, a.leeming@ic.ac.uk */ #ifndef FORMEXTERNAL_H #define FORMEXTERNAL_H -#include "FormBase.h" -#include "insets/insetexternal.h" - -#include "form_external.h" - #ifdef __GNUG__ #pragma interface #endif -/// The class for editing External insets via a dialog -class FormExternal : public FormBaseBD { -public: - FormExternal(LyXView *, Dialogs *); - - ~FormExternal(); - - /// Connect signals. Also perform any necessary initialisation. - virtual void connect(); - - /// Disconnect signals. Also perform any necessary housekeeping. - virtual void disconnect(); - - /// Slot launching dialog to an existing inset - void showInset(InsetExternal *); - - /// bool indicates if a buffer switch took place - virtual void updateSlot(bool); - - /// Callback function for the template drop-down - static void templateCB(FL_OBJECT *, long); - - /// Callback function for the browse button - static void browseCB(FL_OBJECT *, long); - - /// Callback function for the edit button - static void editCB(FL_OBJECT *, long); - - /// Callback function for the view button - static void viewCB(FL_OBJECT *, long); +#include "FormBase.h" +#include "insets/insetexternal.h" - /// Callback function for the update production button - static void updateCB(FL_OBJECT *, long); +class ControlExternal; +struct FD_form_external; - /// Pointer to the actual instantiation of the xform's form - virtual FL_FORM * form() const; +/// The class for editing External insets via a dialog +class FormExternal : public FormCB > { +public: + /// + FormExternal(ControlExternal &); private: - /// calculate the string to set the combo box - string const getTemplatesComboString() const; - - /// get the position in the combo for a given name - int getTemplateComboNumber(string const & name) const; - - /// get a template given its combo position - ExternalTemplate getTemplate(int i) const; + /// apply changes + void apply(); - /// change widgets on change of chosen template - void updateComboChange(); - /// build the dialog void build(); - /// the inset we're modifying - InsetExternal * inset_; - - /// the parameters - InsetExternal::InsetExternalParams params_; - /// update the dialog void update(); - /// apply changes - void apply(); + /// Filter the inputs on callback from xforms + ButtonPolicy::SMInput input(FL_OBJECT *, long); - bool input(FL_OBJECT * obj, long data); - - /// inset::hide connection. - Connection ih_; + /// + void updateComboChange(); - /// build the dialog + /// Fdesign generated method FD_form_external * build_external(); - - /// the dialog implementation - FD_form_external * dialog_; }; #endif // FORMEXTERNAL_H