X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormInclude.h;h=65e4077a1fbbca1dfdd9e31341d8193414d0f60b;hb=2c3af1475e2a408f725b5eea93583ee13e3d09cc;hp=cb046173b973875e37be839ef2d3339f44819303;hpb=9c36dd0f40f2e2e90fce8b2f33519a5d99d9be8b;p=lyx.git diff --git a/src/frontends/xforms/FormInclude.h b/src/frontends/xforms/FormInclude.h index cb046173b9..65e4077a1f 100644 --- a/src/frontends/xforms/FormInclude.h +++ b/src/frontends/xforms/FormInclude.h @@ -5,87 +5,40 @@ * See the file COPYING * * \author Alejandro Aguilar Sierra - * \author John Levon + * \author John Levon, moz@compsoc.man.ac.uk + * \author Angus Leeming */ #ifndef FORMINCLUDE_H #define FORMINCLUDE_H -#include - #ifdef __GNUG__ #pragma interface #endif -#include "FormBaseDeprecated.h" -#include "xformsBC.h" -#include "insets/insetinclude.h" +#include "FormBase.h" +class ControlInclude; struct FD_form_include; -/** This class provides an XForms implementation of the FormInclude Dialog. +/** This class provides an XForms implementation of the Include Dialog. */ -class FormInclude : public FormBaseBD { +class FormInclude : public FormCB > { public: /// - FormInclude(LyXView *, Dialogs *); -private: - /// - enum State { - /// the browse button - BROWSE = 0, - /// the load file button - LOAD = 5, - /// the verbatim radio choice - VERBATIM = 10, - /// the input and include radio choices - INPUTINCLUDE = 11 - }; - - /// Pointer to the actual instantiation of the ButtonController. - virtual xformsBC & bc(); - /// Slot launching dialog to an existing inset - void showInclude(InsetInclude *); - - /// Connect signals. Also perform any necessary initialisation. - virtual void connect(); - /// Disconnect signals. Also perform any necessary housekeeping. - virtual void disconnect(); + FormInclude(ControlInclude &); +private: + /// Set the Params variable for the Controller. + virtual void apply(); /// Build the dialog virtual void build(); - /// Filter the inputs - virtual bool input( FL_OBJECT *, long ); /// 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 xforms form - virtual FL_FORM * form() const; - /// bool indicates if a buffer switch took place - virtual void updateSlot(bool); - + /// Filter the inputs on callback from xforms + virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); - /// Type definition from the fdesign produced header file. + /// Fdesign generated method FD_form_include * build_include(); - - /// Real GUI implementation. - boost::scoped_ptr dialog_; - /// The ButtonController - ButtonController bc_; - - /// inset::hide connection. - Connection ih_; - - /// pointer to the inset passed through showInset - InsetInclude * inset_; - /// the nitty-gritty. What is modified and passed back - InsetInclude::InsetIncludeParams params; }; - -inline -xformsBC & FormInclude::bc() -{ - return bc_; -} #endif