2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
15 #include "DialogBase.h"
17 #include "support/utility.hpp"
18 #include "insets/insetcommand.h"
27 /** This class is an XForms GUI base class to insets derived from
30 class FormCommand : public DialogBase, public noncopyable {
33 FormCommand(LyXView *, Dialogs *, string const & );
35 /**@name Real per-instance Callback Methods */
37 static int WMHideCB(FL_FORM *, void *);
38 static void OKCB(FL_OBJECT *, long);
39 static void ApplyCB(FL_OBJECT *, long);
40 static void CancelCB(FL_OBJECT *, long);
41 static void InputCB(FL_OBJECT *, long);
45 /**@name Slot Methods */
47 /// Create the dialog if necessary, update it and display it.
48 void createInset( string const & );
50 void showInset( InsetCommand * const );
55 /// Explicitly free the dialog.
58 virtual void input( long ) = 0;
60 virtual void update() = 0;
62 virtual void apply() = 0;
64 virtual void build() = 0;
66 virtual FL_FORM * const form() const = 0;
69 /**@name Private Data */
71 /** Which LyXFunc do we use?
72 We could modify Dialogs to have a visible LyXFunc* instead and
73 save a couple of bytes per dialog.
76 /** Which Dialogs do we belong to?
77 Used so we can get at the signals we have to connect to.
80 /// Update connection.
84 /// inset::hide connection.
87 InsetCommand * inset_;
91 InsetCommandParams params;